HNHacker News
TopNewBestAskShowJobs

avolcano

3,882 karma · joined March 12, 2011

I write JavaScript and Python and other languages sometimes.

website: thomasboyt.com

submissionscomments
avolcano··on Performance Engineering with React, Part 1
That looked interesting but I didn't need the most important functionality it provides (click/touch handling, fancy text rendering, etc) so I stuck with just using the Canvas API. It's pretty simple to do in React: https://gist.github.com/thomasboyt/bcc496c823a01ac5f648
avolcano··on Performance Engineering with React, Part 1
I've been using React to make a 60fps music game, and this article covers basically all of the issues I ran into:

- Originally, the game was rendered with SVG elements, so it was very important to use the shouldComponentUpdate hook to ensure elements weren't rendering unnecessarily (and using CSS transformations to position them where possible, as that's way faster than updating SVG coordinates!)

- I had something similar to the function.bind problem since some of my components had a map of hotkey handlers that I was (naively) returning from a `getHotKeyHandlers` function, meaning the handlers were redefined every render.

- I wasn't caching/memoizing calculations done to the Redux state as well as I should have (Reselect is very useful for this!)

I ended up deciding SVG wasn't fast enough for my use case and rewriting the core game loop rendering to use Canvas, which was so much faster that I could be a lot lazier about optimizing things. Everything around the canvas is still rendered through React components (i.e. in game UI and menu screens), and the state is still handled through Redux. It's a very fun way to write a game :)

avolcano··on Facebook is closing Parse
To be fair, those exact same abandoned apps would just as easily stop working because their developer didn't upkeep their custom backend - or worse, those abandoned backends could fall behind on security updates and get hacked.
avolcano··on Letter of Recommendation: Sleep, ‘Dopesmoker’
I don't listen to a lot of stoner/doom metal (Pallbearer's about the closest I get, really), but I absolutely adore this album. It's so extreme in concept, but very easy to digest. It's an absolute masterpiece of musicianship (and has some of the funniest lyrics I've ever heard). Very happy to see the Times, of all places, give it a plug.
avolcano··on David Bowie Has Died
the full recording survives in mixed quality, but his performance of I Got You Babe with Marianne is relatively-well preserved. great hidden gem in his back catalogue :)

https://youtu.be/EeBTz8n0vzw?t=2085

avolcano··on David Bowie Has Died
It's funny, these threads always devolve into comparisons to modern day pop stars, how none of them compare.

And you're all right, of course, no one could ever compare. He was the best, period, in my mind, and while he may not be in your mind, but his accomplishments and career are undeniable.

But every rock and pop singer today has something from Bowie. Kanye and Gaga found ways to navigate both pop stardom and the art world; bands like Of Montreal incorporated theatricality blended with musicianship in their records and live shows. I could list, so, so many more, from Janelle Monae to St Vincent, but unfortunately I think a list of every rock or pop musician since 1970 would take up significantly more room than I have in this comment box. They created something new using his life and music as inspiration - and that's fine.

Because we like to act as if Bowie is this fount of perfect originality, ideas springing from the ether - and, don't get me wrong, he certainly was inventive - but to ignore his influences is to create a myth. We talk about him as the chameleon, but he never morphed into truly untread ground - he always found what was there, and improved, innovated, found new ways to incorporate it. Young Americans followed Philadelphia soul. "Blackout" followed "Nite Flights". The man operated a goddamn ISP in the late 90s, as another comment mentioned. Blackstar followed experimental jazz and had inspiration from everyone from Kendrick Lamar to James Murphy.

I wouldn't dare to try to distill his life into a single takeaway, as there's far, far too many angles to cover. But here's the lesson that springs to mind first, which, now that I write it, comes out slightly more inspirational-poster than I'd like, but maybe that's okay:

Creative work isn't made in a vacuum, and to try is futile. Embrace what's next, no matter how different, how weird. Keep your eyes forward and your ears and mind open.

avolcano··on A rant about application configuration
> All your ideas are nice, but you obviously have never programmed a thing that other people use.

This is an unnecessarily rude assumption. Even the most rudimentary glance at the author's Github page, linked at the bottom of their blog, would have shown you that the author has created and contributed to multiple popular applications and libraries.

avolcano··on Did we reached webdesign's coolness boundaries?
Bloomberg has a lot of fascinating web design. Their homepage has been walked down from the height of its punk-rock-ness, but I've always appreciated how bright and lively their site is, especially for an incredibly boring business/finance website.

Previously, in the same vein: http://www.bloomberg.com/graphics/year-ahead-2016/

avolcano··on The Story Behind the New WordPress.com
This must be one of the largest open-sourced React codebases yet, very cool.
avolcano··on Dean Baquet Responds to Jay Carney’s Medium Post
I don't think there's a lot of harm to having additional follow-up posts show up on the front page, especially for stories as big as this one is. With 30 items per page, and items not taking up a lot of real estate, it's not that annoying to skim past the headline if you're not interested.
avolcano··on Dean Baquet Responds to Jay Carney’s Medium Post
This has had 30 upvotes in the past hour and yet is already on the second page.

I don't usually go all tinfoil about HN votes, but it's pretty easy to assume is flagging this one down.

avolcano··on Global coalition tells Facebook to kill its Real Names policy
I'm somewhat optimistic that Facebook will fix this someday, and I didn't want to end on a recruitment blacklist or something in that case. Still, you're right, next time I get one I'll make it clear that this is the biggest reason I'm uninterested, and that if they fix it they should feel free to contact me again :)
avolcano··on Global coalition tells Facebook to kill its Real Names policy
Good, I'm glad this is getting traction. Seems like every week I read about another trans person or someone who uses a psuedonym in day-to-day life getting "reported" by some asshole and getting locked out of their Facebook, and Facebook seems uninterested in fixing the issue.

Honestly, it's heartbreaking, as someone who uses many Facebook open source projects, to talk to engineers at Facebook and find out how many don't know this is even an issue. It's certainly kept me from responding to FB recruitment emails.

avolcano··on Tmux Resurrect – Persists tmux environment across system restarts
I've been using this for a few months, since for some reason my work Macbook really likes to crash when it goes into sleep mode (have a feeling it's related to our Vagrant/VMWare setup, but haven't had a chance to investigate). It works better than any similar tmux plugin I've tried, and is dead-simple to use.

I particularly like that there's a "whitelist" of which running commands it will restore, so I can e.g. restore both VIM sessions and my Webpack watchers when I restore my session.

avolcano··on Redux Blog Example
Yep! It's a bit convoluted at the moment, and I should comment it better, but it basically just does the following:

1. Get a list of all posts and compute their URLs

2. Run each URL against the React app's react-router table (https://github.com/thomasboyt/peridot/blob/master/src/pagesB...). This gets the static markup for each route.

3. Wrap this static markup in a <Page /> container (which has e.g. <script> and <link> tags for assets), and write the resulting output to an HTML file.

That HTML file is what you initially load. It then loads a Webpack bundle of the same React app, and once that's loaded, React on the front-end "re-renders" into the already-rendered React app container (though it doesn't actually re-render the DOM, as it's able to diff against the existing DOM nodes).

There's some more nuance to this - for example, the server-side rendering also passes in a Redux store with the state needed for rendering the page (e.g. the contents of a post), as well as embedding the JSON-serialized state in a <script /> tag so when the front-end code takes over, it can just load the embedded state.

Honestly, though, the isomorphic rendering only took a few hours to implement, and most of that was me figuring out how to use Redux (previously, I'd used other Flux implementations that had somewhat different concepts). The biggest takeaway I've gotten from this project is that React isomorphic rendering is way easier than I thought.

avolcano··on Redux Blog Example
Cool stuff!

In a somewhat similar vein, I've been working on a static site generator (like Jekyll) that uses React/Redux instead of a templating system: https://github.com/thomasboyt/peridot

It actually is very similar to any other isomorphic React app, except instead of hosting an API, it simply renders each page out to a file, as well as a JSON version of each post that acts as the "API" used to retrieve further pages from the frontend app. There's an example site here: http://loudplaces.disco.zone/

avolcano··on Google Hangouts 4.0: now simpler, faster, more beautiful
And here I was excited thinking that they'd finally fixed the terrible performance and interface of the browser app.
avolcano··on GitHub threatens to shut down a repository for using the word 'retard'
But, in this case, GitHub made an effort to get in contact with the repo owner and warn them of their violation of the TOS before taking action. Why do you believe they wouldn't do the same for you?
avolcano··on GitHub threatens to shut down a repository for using the word 'retard'
Oh sure, but that's not the context it was being used here, and there's no indication that this was some sort of automated email that was sent purely because a use of the word was detected.

I don't think anyone's out there trying to ban the word "retard" for its non-derogatory usages. Seems like a weird straw-man to worry about.

avolcano··on GitHub threatens to shut down a repository for using the word 'retard'
Fine with me. It's an offensive term and GitHub has every right to police their service and ban content like this.

Am I supposed to be concerned by this, and if so, why?

avolcano··on What Ticketmaster is doing about technical debt
Ticketfly is doing a good job. They do charge some fees, but not to the egregious extent of Ticketmaster, and have a much better interface that holds up against traffic.

Unfortunately, Ticketmaster has a habit of just buying/merging with competitors (including Live Nation, in a merger that should have never been allowed to go through).

Plus, Live Nation actually owns a lot of venues, so you'll never see them use another ticketing provider: https://en.wikipedia.org/wiki/Live_Nation_Entertainment#Venu...

avolcano··on InfluxDB v0.9.0 released with developer and production support
Blog post with more useful information: http://influxdb.com/blog/2015/06/11/InfluxDB-v0_9_0-released...

The lack of an upgrade path from 0.8.x makes me feel pretty stupid for trying out that version. Then again, they don't have upgraded client libraries for Python either, so we wouldn't be ready to upgrade anyways...

avolcano··on Windows 10: Designed for All Your Devices
Outside of some stability/compatibility issues that I hope are ironed out before release, I've been pretty impressed with Windows 10 preview so far. I only use Windows for games these days, so I can't really speak to it from a productivity standpoint, but the interface is much more intuitive than Windows 8's while still keeping the handful of things I liked.

Ironically, there were a couple of Windows 8 behaviors I had to unlearn (for example, there's no longer the super strange "hot corners" that were the only way to access the shutdown menu). Definitely didn't take as long as initially learning how to navigate Windows 8, though :)

avolcano··on Mr. Rogers Introduces Kids to Experimental Electronic Music (1968)
There's a similar, and also very adorable, video of Herbie Hancock (of "Rockit" fame) on Sesame Street 15 years later: http://www.openculture.com/2012/10/watch_herbie_hancock_rock...
avolcano··on Reasons for Python async/await
I don't think it matters who's first either; I'm just excited that Python's one of the first languages to implement these concepts beyond C#. Only used the term "scripting language" as a way to say "lighter-weight."
avolcano··on Reasons for Python async/await
For context on this, check out PEP 492: https://www.python.org/dev/peps/pep-0492/

It's a really exciting proposal. AFAIK, it'd make Python 3 the first mainstream imperative scripting language to have these async/await concepts built-in (there is a similar proposal for JavaScript/ES7 built on top of generators and promises[1]). While I've commented before about how asyncio is still a bit more nascent than I'd like, I'm really excited to see where the community takes it.

[1]: https://github.com/lukehoban/ecmascript-asyncawait

avolcano··on Yelp Is Exploring a Sale
I don't think Yelp selling to another company with an ad business is going to increase trust.
avolcano··on NoTCP
The CSS for this site is taken from the Github Pages theme "Minimal:" https://github.com/orderedlist/minimal

I have a 3-year old PR here to fix it. Feel free to +1 :) https://github.com/orderedlist/minimal/pull/2

avolcano··on Forgotten Corners of World of Warcraft
I got into WoW for a couple months just before the launch of the newest expansion, though I fell out of it in favor of a few other games before the expansion came out. Even if you're not into the endgame grind of the modern MMO (turns out, I really wasn't, as much as I tried to be), there's just a ton of fantastic content to explore as you level up a character. It's definitely worth picking up on sale and just maxing out a character to explore the world. I plan on getting the new expansion and leveling through Draenor next time I've got a lull in my games backlog.

There's also some great articles about unfinished content in WoW, like this one about a half-implemented zone with lots of lore around it, giving it a particular mystique: http://www.engadget.com/2011/04/05/wow-archivist-the-karazha...

avolcano··on The Python Road Not Taken
asyncio seems to me like it should be the biggest killer app for Python 3 - a universal replacement for the sprawling, confusing, and opposing async options out there for Python 2.x (Twisted, Tornado, gevent...).

I'm hoping that aiohttp, or a similar library, further matures and we start seeing apps built on it. Developing asynchronous HTTP code in Python 2.x is significantly harder than throwing together a Node app, where things are "asynchronous by default" (unlike, say, Flask or Django). Having a universal, built-in event loop removes a huge point of confusion and learning for async development in Python, and can hopefully bring interest from developers who would normally look to Node.

← PreviousPage 5 of 14Next →