HNHacker News
TopNewBestAskShowJobs

brentvatne

309 karma · joined March 14, 2011

submissionscomments
brentvatne··on Using React Native: One Year Later
The Discord iOS app is fantastic! It's a great example of dropping down from JS to native to implement features that aren't yet possible with just JS (in this case, smooth animations while simultaneously doing work in JS and a chat view).

Related to this: I recently did a talk about building an Android app with React Native in pure JS at ReactEurope in Paris, and discussed the main issues that we had encountered -- people interested in this article might also enjoy the talk: https://www.youtube.com/watch?v=cI9bDvDEsYE

brentvatne··on React Native: A year in review
The short answer is that UITableView is an inherently synchronous API whereas the React Native bridge is asynchronous -- UITableView calls cellForRowAtIndexPath:indexPath: and heightForRowAtIndexPath:indexPath: and you need to respond synchronously with the view for and the height of that cell.

One of the problems with this is that under the current React Native architecture we would need to break the async bridge model by synchronously calling into JS in response to these methods. So some people are experimenting with a slightly different architecture that would allow us to respond to them synchronously from the main thread, which seems really promising :)

brentvatne··on React Native: A year in review
For people who read this and are curious for more perspective on React Native and Titanium, there's a nice discussion here on the React Native Community Facebook Group with a developer who used to work at Appcelerator and now runs an agency where they use React Native exclusively: https://www.facebook.com/groups/react.native.community/perma...
brentvatne··on React Native: A year in review
Plenty of people! See: https://facebook.github.io/react-native/showcase.html

This isn't even a comprehensive list as it doesn't include apps like TaskRabbit Tasker App (http://tech.taskrabbit.com/blog/2016/03/24/react-native-andr...) which aren't public-facing.

brentvatne··on React Native: A year in review
React Native uses a site called ProductPains for people to report the issues that they run into and upvote them, it can give you a good idea of what the problems are: https://productpains.com/product/react-native?tab=top

In my eyes, the biggest pain points right now are: list views and complex gestures. List views don't recycle native views so memory usage can be very high (but there are some people working on solving this), and complex gestures just aren't really supported -- and by that I mean something like multi-touch to drag multiple slides in Keynote and a bunch of the crazy stuff that the Apple Maps app does (see https://www.youtube.com/watch?v=uBYPqb83C7k for more info on this). Also potentially of interest, see these slides: https://www.dropbox.com/s/fr46d25zfm6oaqu/philly.key?dl=0 (warning: requires Keynote and 1.2gb because lots of video!)

brentvatne··on React Native on the Universal Windows Platform
Also see: https://ericroz.wordpress.com/2016/04/11/f8-app-on-windows-1...

> Excluding all the work on core and third party module parity, and store preparation, there was certainly less than 1 week of 1 developers time dedicated to platform customization and style tweaks in JavaScript.

This is huge! Fantastic work everyone.

brentvatne··on ChakraCore GitHub repository is now open
Where can I find side-by-side benchmarks for Chakra, JavaScriptCore and V8?
brentvatne··on MirrorMirror: A Raspberry Pi-Powered Magic Mirror
Cool stuff! ajwhite put something similar together with an old Android tablet and React Native: https://github.com/ajwhite/MagicMirror
brentvatne··on The Nightmare of Replacing a Battery on a Mac Laptop
Great point, I suppose I was just judging it entirely on the end result.
brentvatne··on The Nightmare of Replacing a Battery on a Mac Laptop
A couple of weeks ago I dropped off my well-used, out of warranty, never on AppleCare early-2012 macbook pro to get the keyboard replaced. It turned out that this repair would also, by necessity, replace the battery (it is part of the "top case"). ~$380USD, I was happy to pay that considering that my battery was shot and several of my keys no longer worked at all. A few days later I went to pick it up and they told me that they needed to replace the logic board as well because of an original manufacturing defect, and that I was eligible for a "quality program" screen replacement because the laminate was peeling. Also presumably because of the hassle they decided I was to be charged $235 USD instead of the original amount. I tested it out and bam, kernel panic within seconds of booting into the OS. Same thing on reboot. So they replaced the logic board again, same problem. Formatted the drive and installed the OS from a clean image, same problem. They decided that the best course of action was to replace the laptop entirely. So for $235 I got a brand new 2015 macbook pro.

Apple's in-store repair, in my experience at least, is fantastic. If something goes wrong they do whatever they can to address the issue. I'd recommend going through them if you're considering changing some of the internals of a macbook pro given how easily it can go wrong.

brentvatne··on Trix: A rich text editor for everyday writing
Not sure why so many downvotes -- they build an in-memory representation of the content of the contenteditable, intercept input events to update that representation, and use that to update the actual dom. Presumably they wouldn't just wipe out the entire contents each time either, so it's sending atomic create/update/delete commands to the dom.. So it's like React's vdom just for contenteditable.
brentvatne··on Trix: A rich text editor for everyday writing
Very neat -- seems like React for textarea
brentvatne··on Let's Learn GraphQL
Looks fantastic, thanks! FYI I shared this in Slack and the preview showed up like as "Learn How to Build Fast and Efficient Meteor Apps" - screenshot: http://url.brentvatne.ca/VYvi.png
brentvatne··on React Native for Android
- You can determine the platform with React.Platform -- eg:

var React = require('react-native');

var { Platform } = React;

if (Platform.OS === 'ios') {

  // lol steve jobs
} else {

  // lol robutts
}

Android also has a `Version` property on `Platform`.

- Certain features are not idiomatic on both platforms: where you might use TabBar on iOS you are going to use a Drawer on Android. NavigatorIOS is a wrapper around UINavigationController that is not maintained as part of the core React Native project, but is a community effort -- nobody at Facebook uses it, and nobody who makes any serious apps with React Native use it either; instead, they use the cross-platform Navigator component, written entirely in JS. Similarly, if you really want to use a TabBar on Android, there exists at least one excellent JS implementations of this that you can use: https://github.com/exponentjs/react-native-tab-navigator

- This is still a very early release! In fact, it is the first day it is released. There are plans to bring the APIs together where it makes sense. For example, SwitchAndroid and SwitchIOS will be brought together under a Switch component that has the same API on both platforms but uses their underlying native implementations.

brentvatne··on React Native for Android
`adb reverse tcp:8081 tcp:8081` works like a charm for me
brentvatne··on New React Developer Tools
> Because it's built on the assumption that just because DOM access is slow, then it's a good idea to just add another layer of JS in order to provide a cached-like faster DOM access speed, rather than focusing on fixing DOM access speed issue itself.

The virtual DOM is just an implementation detail. In my eyes, React's big feature is that it is a declarative, component-based UI model. Look at React Native or ComponentKit - they are not built around the idea that CocoaTouch is slow, but rather that there are simpler ways to do UI than the traditional imperative approach.

> React augments the complexity of a stack that it's already too complex, to an unneeded, non-sustainable and dev-unfriendly way in which we are supposed to use HTML tags inside JS scripts.

In my experience, as I mentioned above, React actually provides a fantastic abstraction that makes it simpler to build UIs. I haven't found it to be dev-unfriendly at all, the opposite actually - I find that it is a highly pragmatic, productive and pleasant way to work. But I suppose that's a matter of preference. What do you find unfriendly about it in particular?

> React is not a product of love for a greatly engineered system, but obviously just a product of FB's understandable necessity to work faster "today and here", in order to keep bringing home their daily profit.

This point I must disagree with absolutely. I have had many interactions with people who work on React and from my point of view it is indeed a labor of love as much as any I've seen on an OSS project. Do you have any examples that you can point towards to back up your assertion? Just watch presentations by any of the React team members and you'll see that there are real people behind it that care deeply about it. Better yet, talk to any of them in person and see how excited they are! This isn't a heartless top-down mandated project by a massive organization to squeeze more money out, but rather it started off as a skunkworks project by a single engineer in his spare time who thought that UI could be simpler, that caught on within the company because it turned out to be a great idea.

> React is not a solution, it's a patch, a ugly one. > We are not forced to like it just because FB made it and made it OS.

Well, isn't the world beautiful, so many different opinions! I'm extremely curious what your preferred tooling is, or any suggestions you have to make React better. Maybe you could write a longer form essay to elaborate on your criticisms above?

brentvatne··on Why Are People Still Playing Ultima Online?
Since playing this from 2000-2002 I have all but quit gaming. Ultima Online ruined other games for me in the best way possible. I have tried to play various MMOs since but none of them come close to having the same freedom that UO offered.

There were gangs, rivalries, people would cast invisibility spells on themselves outside of your door to try to break into your house when you open the door, you could be put in prison if you were an asshole or exploited a bug, you could hunt down miners and if you managed to take them out before they entered a city's boundaries (where guards would appear and protect them from "murderers") you would be able to steal all of their clothes, armour, weapons, ore, etc. GameMasters or Counselors (GMs with limited abilities) would host PvP tournaments - round robin duels, capture the flag, etc.

I used my limited knowledge of programming as an early-teen to host a custom "shard" with SphereServer and had an average of about 200 players on at a time, from all over the world. It was a lot of power for a kid to have. Of course the software was unstable and increasingly so with more users and eventually I had to shut it down because it crashed too often. The name was Alphanine UO - named for the web hosting company that decided to give a kid a free server to host a video game server. http://web.archive.org/web/20020923181726/http://uo.alphanin...

brentvatne··on Should I Work for Free?
I agree that open-source is definitely missing from this if it is considered from the perspective of a software developer. "Should I work for free?" is a simple and easy to remember title but it is an oversimplification when the author actually intended on it being something more like "Should I do design work for free?" That said, this was also made in 2011 and I think a lot has changed since then.
brentvatne··on Ask HN: ReactJS – Do you use it? Do you like it?
Hi grandalf! Which sections do you think are most lacking in the react native documentation? I've put some time into improving it this week by adding:

- https://facebook.github.io/react-native/docs/animations.html...

- https://facebook.github.io/react-native/docs/direct-manipula...

- https://facebook.github.io/react-native/docs/navigator-compa...

I'd love to hear where you think I should be spending my efforts next.

brentvatne··on Solved by Flexbox
Used this in my presentation on React Native the other day (http://brentvatne.ca/react-native-intro-talk/) as it demos beautifully how Flexbox fixes some persistent CSS layout problems, thanks!

With vjeux's css-layout library, adoption from React Native on iOS and Android and mentions of perhaps adopting it in AsyncDisplayKit, Flexbox is becoming a valuable layout system to be familiar with.

brentvatne··on Elegant tests with Truth Tables
This type of functionality is built into cljs.test, for example:

https://github.com/r0man/cljs-http/blob/master/test/cljs_htt...

brentvatne··on Introducing Aurelia
This is not mentioned in either the blog post or the docs, at least not easily findable with a cmd+f

"Use some of the libraries on the server with NodeJS. i.e. DI." - some, and I'd expect an explicit mentioning of isomorphism if it were possible at the moment to render it on the server side.

Shadow DOM != Virtual DOM. I mean the React-style Virtual DOM.

brentvatne··on Introducing Aurelia
This looks a bit like Angular 1.3 and 2.0 to me - DI, binding and repeats look like ng-model and ng-repeat.. I'm curious to see more when the full docs are out though. No mention of isomorphism or a virtual DOM, seems to be a bit behind the zeitgeist.
brentvatne··on FlickSurfer – a way to find Netflix gems
Nice work! I did something like this recently in Ionic framework, released it open source and deployed it to the Google Play Store: https://github.com/brentvatne/flix - essentially it allows you to flick through movies as you would people on Tinder, and shows the IMDB rating and a description along with each one. It also allows you to filter by IMDB rating and genre etc.
brentvatne··on Show HN: Tinder for Netflix with AngularJS/Ionic
Thank you! Feel free to contribute to any of the issues listed in the README if you're interested, I'd be happy to review them.
brentvatne··on Show HN: Tinder for Netflix with AngularJS/Ionic
I actually just get all of the data from allflicks.net and supplement that with additional data from trakt

https://github.com/brentvatne/tinder-netflix/blob/master/bac...

https://github.com/brentvatne/tinder-netflix/blob/master/bac...

brentvatne··on Show HN: Tinder for Netflix with AngularJS/Ionic
OP here: quickly put this together to try to solve the all-too-common scenario of sitting around and scrolling through Netflix trying to decide what to watch. You can check out a 6mb demo gif here: http://url.brentvatne.ca/1e8YK
brentvatne··on [dead]
"better known as aaronsw's brother"
brentvatne··on A GitHub command line client written in Go
Great work Owen!
brentvatne··on Friend builds app to help find climbers lost in Peru
Sign up? Why can't I just browse it anonymously?
← PreviousPage 2 of 3Next →