HNHacker News
TopNewBestAskShowJobs

i_am_ralpht

181 karma · joined May 5, 2014

ceo of vehicle.software, creating the next generation of in-car software in rust!
submissionscomments
i_am_ralpht··on Google Play Game Services
I used Google Play Game Services for a turn-based Android game a friend and I made this summer[1]. I like to develop on the PC and have a really fast test cycle, so I made a client implementation for desktop Java using a wrapper around the REST API.

It worked pretty well, except I could never figure out how to be notified that the other player took a turn. On Android there are hooks for this, but on the PC I ended up just polling their API for changes (I figured since it was just me I was unlikely to be tagged for abuse...). Maybe "Pushtokens" is the thing to use? The API documentation doesn't say what a "Pushtoken" is.

[1]: https://play.google.com/store/apps/details?id=com.infinite_i... -- it's inspired by Letterpress. I wrote up some of our other experiences building the game, too, since I did a custom toolkit and physics engine for it: https://medium.com/@i_am_ralpht/building-letterplex-1-0-a78c...

i_am_ralpht··on iPhone 6: Comparing InvenSense and Bosch Accelerometers
Interesting -- I thought someone with deep enough pockets could write their own DMP code for the IMVN part.

I'm sure the Android Wear devices (which mostly use the MPU-6500) must use the DMP to detect when to power on (they can't keep a Cortex-A7 juiced up just to look at gyro/accelerometer numbers), and IMVN didn't have anything like that publicly advertised a few months ago (I haven't looked more recently, and haven't inspected the Android Wear ROMs yet).

i_am_ralpht··on iPhone 6: Comparing InvenSense and Bosch Accelerometers
No, the lag is waiting for the rotation to stop before starting the animation.

If the screen is on then the power drain from the accelerometer running as fast as it can is tiny anyway.

i_am_ralpht··on iPhone 6: Comparing InvenSense and Bosch Accelerometers
The Invensense has an autonomous mode (on Android devices it can count steps without bothering the host CPU) -- does the Bosch do this too?

Apple have a separate Cortex-M3 which is branded as the "M7" or "M8" motion processor. Is this what they use for step counting when the A8 is suspended? Why not use the Invensense for that? Is the M8 + Bosch less power?

i_am_ralpht··on Hands-on with the USB Type-C plug
Anecdotally, the Lightning cable seems to be a bit flaky itself, getting 1.5 stars from 1646 reviews on Apple's store: http://store.apple.com/us/product/MD818ZM/A/lightning-to-usb...

Hopefully Type C will be better than Micro-B and Lightning. Also, Type C can deliver 100W of power, which I'm not sure Lightning could do...

i_am_ralpht··on CoreGraphics Memory Corruption
Is the bug fixed in iOS 8? I didn't see where the page said that...

The author has a reliable exploit for iOS 7.1.x, but that doesn't mean the bug was fixed (maybe other things moved around so the shellcode doesn't work?).

I am genuinely curious though -- I haven't upgraded and don't intend to until a couple of point releases are out, but something like this could prompt me to act sooner.

i_am_ralpht··on Building an Open Source Lockitron with Arduino, BLE, and the Bean
I've spent ages in LightBlue poking at BLE devices. I had no idea there was also a hardware module, the "bean". It looks pretty nice: http://punchthrough.com/bean/ -- definitely a lot easier than manhandling directly on the TI BLE controller...
i_am_ralpht··on First set of Android apps for ChromeOS
Is the source for the app runtime available anywhere?

I've done a bunch of hacking on the Android framework to do things like multitasking before, so I'm really curious to see how they "put Android in a box".

i_am_ralpht··on Hyperlapse, Instagram's new video stabilization app
Hopefully the new Camera API in Android L makes this app possible -- you have much better control of the incoming frames with accurate timestamps, so matching them up to recorded gyroscope information and cropping/offsetting them before writing them out to the encoder would be much easier.
i_am_ralpht··on Toga: A Python native, OS native GUI toolkit
Because the layout that's presented is not native. Actual mac apps don't have tabs and toolbars pushed together like that, and the margins are different.

wxWidgets can use the platform native controls, but the apps rarely look native because the layouts and behaviors are non-native. Mac/GNOME/Windows all have different ideal metrics for spacings, control placement and labeling (OK/Cancel vs Cancel/"Do Thing") -- being native means getting all of those details correct.

i_am_ralpht··on A New Bike Lane That Could Save Lives and Make Cycling More Popular
In the bay area the bike lane becomes dashed at intersections meaning anyone can go anywhere.

The disadvantage with going into the lane is that cars have much shorter stopping distances. I had an accident a few months ago where I had just managed to merge into the lane (had to be going at the speed of traffic to do this) when all the cars in front of me slammed on their brakes and skidded to a halt -- I hit the back of the car with my head and smashed my helmet (and got cuts in my head where the helmet cracked; but I'd have been severely worse off without it!).

But right hooks are much more common than what happened to me. We just have a really bad road infrastructure in the US (even for driving -- I'm amazed every time I go back to the UK and can drive for miles through densely populated areas without stopping, all because of the roundabout -- the lockless n-way intersection).

i_am_ralpht··on A New Bike Lane That Could Save Lives and Make Cycling More Popular
Most right-hooks happen when the light is already green, not when starting from a stop. So imagine that the car and bike are moving at the same speed and the driver doesn't check their mirror or doesn't notice the bike before they turn right.
i_am_ralpht··on A New Bike Lane That Could Save Lives and Make Cycling More Popular
I saw it happen to someone two days ago crossing the Caltrain tracks and going over Alma on Meadow in Palo Alto. White van went past the cyclist and then turned right into him -- luckily he just hit his front wheel (though the van drove off, ignorant of everything).

It happens all the time and it's a function of poor design. I'm not sure what the right fix is (preventing right turns on some Alma crossings? Forced right turn lane to the right of a green lane?). With this intersection at least the cyclists start out ahead of the traffic when waiting on a red -- but if the light is green and a cyclist is at the speed of traffic then this design does nothing to prevent right hooks...

i_am_ralpht··on Webkit.js
In Chrome (for me, on 64bit Linux) it consumes 176MB of RAM -- for all of WebKit + Cairo + FreeType/HarfBuzz/etc -- it's most of an OS right there.

GMail, a webapp email reader, is currently taking 368MB of RAM. Insane!

i_am_ralpht··on Adobe's New Pen and Ruler
That's cool; thanks for sharing.

So you could use the accelerometer independently of the touchscreen for gestures like flicking ink blots or swishing the "brush" in "water" -- or maybe you can do some fancy things on the screen like tapping on the same spot for stippling (using the accelerometer to approximate height and velocity, independent of the final pressure on the tip). There's so much fun stuff to do here!

i_am_ralpht··on Adobe's New Pen and Ruler
It's really interesting to me that most of these are just Bluetooth-connected buttons. There's no pressure or angle sensitivity in the FiftyThree Pencil, it's just a button.

I tried to find the "pressure" API in iOS 8, but I just found a new majorRadius field (with an error tolerance). Android supports a bunch of information (including "pressure" and radius) -- I bet you get pretty rich data on devices with dedicated stylus support.

I was able to connect to the Pencil from Android via BTLE and observe the tip being pressed and released (though not the eraser for some reason; maybe I have to write some value out for that characteristic to come alive?) -- maybe later this summer I'll try to make a basic Pencil-compatible Android drawing app :).

i_am_ralpht··on Penny Arcade – Surface Pro 3 update
Interesting that the Surface Pro 2 did so much better in terms of "feel" and "lag". I wonder if the switch to the nTrig panel is behind the regression (I have an old HP TX2 with an nTrig panel; it was always terrible, but maybe they've improved since then...).
i_am_ralpht··on Penny Arcade – Surface Pro 3 update
Yeah, though maybe you could do it with FTIR instead of capacitive, so you wouldn't need external cameras.
i_am_ralpht··on Map label placement in Mapbox GL
I love the work that the Mapbox folks are doing here -- and that they wrote it up so nicely!

I have some questions, though!

* Why can you only shift glyphs along a straight line during render? Is your geometry somewhat scale-invariant?

* Could you keep the spline and relayout the text along the spline during zooming? Then you'd have great layout and no popping.

* How do you handle complex text with really wide glyphs (where a bunch of characters resolved into a single combined glyph, like in arabic)?

i_am_ralpht··on Steady.js – No more scroll jank
sticky isn't expected to change much, and ships prefixed (and with accelerated compositing) in iOS 7.
i_am_ralpht··on iOS 8 randomises the MAC address while scanning for WiFi networks
Many Bluetooth LE devices (including iOS 7) do something similar -- otherwise you'd be able to track people by all of their BT LE devices which are constantly advertising their existence. They cycle their advertised MAC addresses every 15 minutes or so (and some provide a "random resolvable address" which you can use to find out the physical BT MAC address after pairing for easier reconnection).

From my office in downtown Los Altos, I can currently see a FitBit Flex, a FitBit One and a couple of phones -- the randomized MAC address is all that prevents someone bad from tracking them (BTLE scanners/phones are cheap!).

I guess you could still use the 15 minute MAC to track people through a train station or other semi-public space (to gather metrics on where people are coming from and going to). If you had a lot of antennas then you could circumvent the MAC cycling by linking devices in the same area with the same name and similar RSSI...

i_am_ralpht··on Introducing Mapbox GL
I've wanted to write a GLES 2 map renderer for ages -- ever since I saw that the Apple Maps app on iOS uses MSAA for antialiasing (yuck!).

It's funny to see all the usual 2D suspects in the source (clipper, GLU tessellator). They used a distance-based edge shader for antialiasing, so it should look much better than MSAA.

I'm not sure why there's a bias factor of 2 in the "raster" fragment shader -- looks like it might have been added by accident. It's interesting that they use both the stencil and depth buffers for clipping -- I hope they do a write up on some of the techniques they developed!

i_am_ralpht··on A high-profile fork: one year of Blink and Webkit
> the Blink project has been more focused on next-gen webapps with a heavy focus on the compositor, scheduling, and style subsystems.

I thought Blink probably wanted to change some things about the compositor (ScrollingTree/ScrollingConstraints being separate, for example) more than doing new work on it. The WebCore compositor is in pretty good shape (composited position sticky, etc) so I'm curious if there's anything neat I'm missing out on :).

I know that the Chromium Compositor (outside of Blink) has had significant upgrades in the last year, though (Chrome for Android can now scroll without dropping frames on every tile boundary -- huzzah!).

i_am_ralpht··on Osmo
Often school districts have rules on how money can be spent, e.g.: they wont use donations to pay for salaried employees as it creates a liability if they have a shortfall one year and have to pay to lay people off.

So that's why a lot of the donation money goes on interactive whiteboards and iPads, as well as hourly aides/TAs/etc (who might be subject to a limit on their hours...).

i_am_ralpht··on Port of SGI ElectroPaint screensaver made via decompilation
This is awesome! I rewrote EP to use OpenGL (instead of IrisGL) while at SGI, though in retrospect I wish I'd just made it link against Igloo (SGI's IrisGL-on-OpenGL wrapper library). We were moving to supporting commodity graphics (i.e.: not an SGI graphics chip) in IRIX at the time, and I ported a bunch of the IRIX desktop tools over. Electropaint was definitely the most complex IrisGL app that I ported as part of that...

It's super weird that this port is a Windows app, though!

← PreviousPage 2 of 2