12

Fucking asynchronous javascript

Comments
  • 4
    what annoys you?
  • 3
    @heyheni there's a function that I need to call synchronously but I am too pissed to read online on how to call it like that. I am taking a break now, hopefully I'll have more patience later.
  • 2
    @jespersh it is
  • 1
    @xugS6fz6A7P8cL5 See if you had said it you might have had some help by now
  • 1
    let a = await async_function();

    What's the problem here?
  • 2
    probably has to do with promises?
  • 2
    @olback I somehow managed to fix my problem, but I swear something's fucked up in node v11.13.0.

    I looked at documentation, watched talks, watched tutorials and I understand it all now, but it still seems like node just doesn't care and runs functions asynchronously anyway.

    I don't want to blame node though, I am 100% missing something because I'm tired and also I've got some brain fog.
  • 1
    @xugS6fz6A7P8cL5 What. Are. You. Doing!
  • 1
    @inaba scraping YouTube :)
  • 1
    undefined
  • 0
    @xugS6fz6A7P8cL5 No I mean what are you doing in Javascript. What function are you calling.
  • 1
    @inaba function that fetches data from a video
  • 0
    sounds interesting
  • 0
    @xugS6fz6A7P8cL5 Yeah, duh, I could have figured that out myself
  • 0
    @inaba why did you ask then?
  • 0
    @xugS6fz6A7P8cL5 Are you being dense on purpose? Like you obviously did something in javascript, and to clarify when I say that you did something I mean you called some functions and/or methods and it didn't work for you, and that's why I asked about what you did (and stressing again which functions you called and not some vague description that doesn't help me help you) so that I could help you.

    When I asked what you did I did it because 1. I know Javascript and 2. I like to help people with stuff.
  • 0
    @inaba thank you very much for willing to help me but I have resolved my issue already. I get that you wanted me to be a bit more descriptive but honestly I don't know how to explain it better. I am calling a function provided by a library I'm using (youtube-dl) that fetches some data from a url and returns an object with that data.
  • 2
    @xugS6fz6A7P8cL5 inaba is actually a principal staff engineer at Google, and was on the ECMA-262 specification panel. So you can say he's a JavaScript God.

    The confusion is due to you guys being at different use case levels. Inaba didn't envision your problem being a high level API case (youtube-dl library). So it would've helped for you to mention it. Not exactly intuitive, I know.
Add Comment