Hacker News new | past | comments | ask | show | jobs | submit login

Ah, that's a good catch. Missed that. Calling those in parallel is legitimately a hassle to roll yourself, something like:

              ...
              isPicAVampire thumb, (is_vamp)->
                unless is_vamp
                  mate = userid: u, thumb: thumb
                  finish =-> 
                    return unless mate.personality? and mate.last_talked?
                    soulmates.push mate
                    if soulmates.length >= 10
                      cb(mates)
                    else soulmates(buffy, cb, mates)
                  
                  getPersonality u, (p)->finish mate.personality = p
                  getLastTalked u, match, (lt)->finish mate.last_talked = lt

Anyway, I'll grant you that code is pretty harsh. It's much nicer with syntax highlighting and wide tabs, but still, fair cop. The flip side is that that code compiles into JavaScript that does exactly what it says.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: