HNHacker News
TopNewBestAskShowJobs

erjiang

1,213 karma · joined December 13, 2011

You can email me by sending mail to erjiang at alumni iu edu
submissionscomments
erjiang··on The emperor's new clothes were built with Node.js
Technically, yes - the workers can be multithreaded. If you put multithreaded workers behind an event-loop web server (both nginx or apache can do this), then they can handle many http keep-alives as well. It's not the same thing as using an event loop throughout the whole stack, but it's pretty effective.
erjiang··on The emperor's new clothes were built with Node.js
I picked Go not because it's my dream tool (not having 'map' is kind of sad) but because it's proof that you can have your cake and eat it too. Otherwise, people think that you have to choose between programming sanely and high-performance, but not both.
erjiang··on The emperor's new clothes were built with Node.js
Those "million wrong ways" are not distributed equally amongst languages/environments :)
erjiang··on The emperor's new clothes were built with Node.js
We usually only refer to OS-level processes as "subprocesses". You'll see terms like "lightweight threads", "greenlets", "fibers" for concurrency units managed by the application runtime instead.
erjiang··on The emperor's new clothes were built with Node.js
I assume you read what I wrote and I wasn't clear enough. Node is actually quite DIFFICULT to learn and use. It's very very easy to write code that's broken in some way if you don't have a deep understanding of Node.js.

Fun unrelated anecdote: someone was showing off their concurrent Node.js web scraper and as requests piled up, it was apparent that it could handle no more than 5 concurrent requests. Why? The HTTP library's internal concurrency limit defaulted to 5.

erjiang··on Your next conference should have real-time captioning
I first encountered steno'd captions in person at Google's TGIF and it was awesome even for the non-hearing-impaired. You get a few seconds of scrollback in case you miss a word, which is easy to do at large gatherings.

The only thing that seems to be missing from the !!Con transcripts are timestamps. I'm not familiar with Plover so it might already be a feature, but being able to output one of the standard subtitle formats (SubRip, timed text, SSA) would make remuxing an MP4/MKV of each talk with subtitles much easier.

erjiang··on Decoupled from IP, TCP is at last able to support multihomed hosts
I was actually working on server-client software in Go to allow multihoming IP connections.[0] The original use case was to load-balance packets across wi-fi + 3G or other connections. It's not quite user-friendly yet, but with a little work it could use new connections as they come up (maybe poll ifconfig?).

You'd of course need to install the software on your outside server that will forward packets for you, but a DO droplet would be great for that. It'd also work for the case where your router is your server and you shift between wired and wireless.

[0] https://github.com/erjiang/tuntuntun

erjiang··on Porting 600k Map Views to OpenStreetMap/MapBox
Dealing with Google was rather weird, but the actual negotiations were handled by someone else in my company.

I think Google's enterprise pricing was targeted towards, say, a long-haul trucking company or a corporate GIS department where the viewers are just some managerial or analyst staff. In cases like that, if they charged the same rates as they did for CraigsPinSquare, they'd make a few pennies. Thus, the solution would be to discriminate pricing between high-volume consumer-facing usage and low-volume internal "enterprise" usage, especially since internal "enterprise" usage wouldn't give Google Maps much publicity.

Google decided that we fell in the "enterprise" bucket, and enterprise sales typically involves private negotiations with pricing. It's very possible that we got wildly different pricing than other companies.

We're still open to using Google products in general, but OSM is more fun.

erjiang··on Porting 600k Map Views to OpenStreetMap/MapBox
I think you'll find that without a data import, address data tends to be forgotten by many mappers. Compare Chicago, which did have a bulk data import, with San Francisco, which did not. In Chicago, every house number and building is mapped, but in SF you'd have to interpolate the numbers.
erjiang··on Porting 600k Map Views to OpenStreetMap/MapBox
It also differs dramatically between regions, since the local governments may have varying amounts of data publicly available.

For example, many cities in OSM have virtually perfect address geocoding because some random person pestered their local government to openly release a dump of addresses and their coordinates, whereas Google is just guessing at house numbers.

erjiang··on Porting 600k Map Views to OpenStreetMap/MapBox
Yep, Mapillary is pretty cool! But in terms of approaching Google Street View, not close yet. I suppose if I get a dash mount for my phone I can contribute some data, but it'd just be along my daily commute.

If anybody comes close, it'd probably be one of the big mapping companies. An armchair OSM contributor can map out a whole city without leaving the desk, but street-level imagery requires systematically visiting each street.

erjiang··on The Longest Conveyor Belt
I shouldn't be surprised, but the second was already mapped in OpenStreetMap,[0] and I've now added the first.[1]

Unfortunately, the default renderer doesn't know how to draw a line of "man_made=conveyor_belt"...

[0] http://www.openstreetmap.org/way/202757736

[1] https://www.openstreetmap.org/way/278131952

erjiang··on An open question (rant) about Node.js
Please stop asking questions like this about Node.js.

The superfluous obtuse complexity that node.js forces is what's keeping ninja programmers like us employed. If we don't keep switching to strange new things every few years, our wages will stagnate as there's less separating our rock-star tech from lower-salaried uncool "enterprise" software.

Being able to manually manage continuations rather than using a language that does it for us is a high barrier that keeps us in demand, the same way that having to manage memory manually keeps people from becoming C programmers. Losing this edge is not something we should encourage.

Just imagine - if all of these "learn to code" programs actually work, the market will be flooded with new programmers. Thankfully, if we make sure that they only learn easy things like Python, we can continue to convince the world that things like Node.js and MongoDB are the future. While the rest of the world is still catching up on basics like Python and Postgres, we'll be one step ahead of them.

People questioning Node.js like this more and more are a sign that we need to find the next hotness and move there if/when node.js sinks. If we can convince people to build more things in the next hotness, then we can get in early before the masses pick up on it, ensuring that we can maintain our spendy lifestyles and free lunches in SF.

(/s)

erjiang··on A brief introduction to Haskell, and why it matters
Don't forget Hoogle[1], the type-based search engine! Let's say that I want to combine a couple of my lists into one list. I know what my inputs look like, and I know what I want my output to look like.

So I go to Hoogle, and search for "[a] -> [b] -> [(a, b)]". First result is "zip".

Or I want to get only the things in a list that satisfy a predicate, but I'm suffering from nominal amnesia. I type in "(a -> Bool) -> [a] -> [a]" and Hoogle lets me know that I meant to write "filter".

[1] http://www.haskell.org/hoogle/?hoogle=%28a+-%3E+Bool%29+-%3E...

erjiang··on OpenStreetMap provider CloudMade shuts its doors on small users
I think there's a decent gap where it doesn't make sense economically to download and run your own OSM tile server. Especially if you need worldwide coverage, the costs of keeping a tile server with a full dataset running plus a redundant spare can easily exceed the cost of paying someone a couple hundred dollars per month to do it for you.

There are hardly any services like what MapBox and CloudMade have. The closest seem to be the various consultancies that will design and host a map for you.

erjiang··on OpenStreetMap provider CloudMade shuts its doors on small users
I was actually planning on writing a CloudMade/MapBox comparison, but it looks like there's no need anymore.

It's tough to compare the two - each has services that the other doesn't (aerial imagery, routing, geocoding, etc.) so you might end up with an implementation that cobbles together things from both.

erjiang··on The rise of OpenStreetMap: A quest to conquer Google’s mapping empire
If you want both OpenStreetMap and satellite imagery, check out MapQuest Open[0]. They provide OSM tiles and satellite imagery for anyone to use for free.[1]

[0] http://open.mapquest.com/ [1] Well, check the terms at http://developer.mapquest.com/web/products/open/map

erjiang··on TCP/IP over audio
As an aside, the tun/tap interface in Linux is a fantastic way to muck around with lower-level networking without getting into the kernel or hardware. Essentially, it creates a virtual network interface, except instead of hardware, data goes to your userspace program. You can then just do a read() to grab packets and do whatever you want with them, using Python, Ruby, or anything other programming language.

I wrote a prototype proxy in Go that can split network traffic over two Internet connections using some hacked-together tun code[0] and everything happens in userspace.

[0] https://github.com/erjiang/tuntuntun

erjiang··on The Anatomy of a Great Stack Overflow Question (After Analyzing 10,000)
Hold on --- the article says that the top questions were asked by people with a lot of reputation. Isn't it the case that the top questions bring the asker a lot of reputation points, which means it's not necessarily the case that their question is a "top" question because of their preexisting reputation?
erjiang··on Show HN: Kurikku – Rap Genius for Code
It's a japanification of the word "click". I don't know of any other meaning beyond that, though.
erjiang··on Interactive SICP
I created an implementation of R5RS in Javascript[1] that perhaps you'd be interested in. I know you already have one, but you might have opinions and needs that could influence my implementation. I got stalled trying to get (real) macros to work, but I already had a Scheme->JS FFI and asynchronous evaluation without the use of web workers.

[1] https://github.com/erjiang/foxscheme

erjiang··on Poll: What are your liked and disliked programming languages?
I'm not really sure it's fair to say that people hate PHP because of its flexibility. Many other languages are very "flexible", and much more so than PHP for some things (you're less likely to do dumb threading or malloc mistakes in PHP, for example).

I think it's because PHP has a much larger surface area of questionable decisions to attack. When your core language is very, very small (e.g. Scheme), you have less to criticize, but when PHP has everything and the kitchen sink, plus a lack of an overarching philosophy or standard, plus a broken core developers community, it simply generates many more hatable things.

erjiang··on Ask HN: Freelancer? Seeking freelancer? (October 2013)
Addendum: Part-time welcome!

Overwhelmed with all of the responses I've gotten so far - unfortunately I don't have an HR department to handle these, so it's just me going through everything and might take me a few days to reply. Thanks!

erjiang··on Ask HN: Freelancer? Seeking freelancer? (October 2013)
SEEKING FREELANCER - Remote

* Mobile apps - especially iOS, Android, and possibly some jQuery Mobile + Phonegap work

* Web frontend - we're hoping to do more UI work on a PHP/jQuery interface

* Node.js - potentially looking for a dev on a Node.js backend

DoubleMap is a leader in real-time transit technology that puts real-time transit information at the fingertips of transit agencies and riders. We have several different software solutions that handle receiving, processing, and sending real-time geospatial data, and we use a variety of open-source technologies and languages.

We are based in Indiana, USA, and we welcome domestic and international remote workers.

Email if you're interested in working with us - our domain is doublemap.com, and my mailbox is "eric" at that domain.

erjiang··on Trampolines in JavaScript
Here is an example of trampolining in a Scheme interpreter I wrote in JavaScript: https://github.com/erjiang/foxscheme/blob/master/src/system/...

This way, interesting Scheme programs can be written without using the small JavaScript stack.

It uses an infinite loop that's broken out of by throwing an exception. There are also some other tricks that it uses to allow other things to happen on the page while it runs your program.

erjiang··on The Yiynova MSP19U Cintiq Alternative Swings for the Fences
People have been buying cheap drawing tablets powered by UC-Logic digitizers at least as early as 2006. (Aiptek was especially known for selling a large, cheap drawing tablet, the 12000U.) Back then, there were a few caveats depending on the manufacturer, including fragile pens and less-than-stellar driver software.

One thing to note is that the UC-Logic pens use a different tech than Wacom's -- they require a battery inside the pen. And it looks like they still don't have tilt senstivity. But at that price...

erjiang··on The Yiynova MSP19U Cintiq Alternative Swings for the Fences
Yep, I can also confirm that the UC-Logic devices are supported by the wizardpen driver on Linux. I wrote up some instructions a long time ago on getting it to work[1], and I'm sure there are more up-to-date instructions now. The USB protocol is almost trivial to figure out without documentation, and the wizardpen driver has been around for a long time.

[1] http://notes.ericjiang.com/posts/45

erjiang··on Google Apps Moving Onto Microsoft’s Business Turf
Documents in many places complicates things. For example, if you have to go through discovery, all of a sudden you have to make sure you find things on every single service you've stored them. That's (part of) legal's job, and the number of different services you're using is a multiplier on a lot of things.

What gp described just seems inefficient in general.

erjiang··on The Haskell Cheatsheet
I love the idea of a cheatsheet for Haskell, but I'd like to point out that the things covered by the cheatsheet are also the things I had the least trouble with starting out.

Things like the syntax of pattern-matching and datatypes I'd repeatedly Google for until I remembered, but relatively speaking it wasn't a huge time sink. The things that I did burn time on were things like getting types right inside monads, various other type-theory things, and cabal quirks.

I hope this cheatsheet helps people get started with Haskell, but my gut feeling is that the bigger hurdles will need another cheatsheet.

erjiang··on Understanding The Fourier Transform
I nearly got the light blue and green confused, and I have normal color vision. I think there are reasons to prefer tables, or perhaps something animated or interactive would work as well. (e.g. mouseover a term to get its description.)
← PreviousPage 4 of 5Next →