Upshaw: I am simply calling a function Beta from within function Alpha, but I want to allow Alpha to finish and close before Beta starts, is this possible?
Meneus: But I don’t think the voice services can exist without that
Meneus: The full voice database is too big
Songy: Tinhatalthough i imagine there are backdoors/tinhat
Kirk: Yeah, but it’s still unnerving
Gearing: Javascript458: not precisely clear what you mean
Gearing: Javascript458: possible answers are “put the call at the end of the function” or “use promises and do something like a.thenb”
Bugayong: Well, I am using Google Scripts to make a copy of a do***ent, edit the copied do***ent, and then email the copied do***ent, but if I run all three in the same function the do***ent I receive via email is empty
Boran: Javascript458: what’s the application of this?
Bahrke: I want to include some charts in my site, what libraries do you use?
Meneus: Javascript458: if you’re asking what I think you are, you can’t call function B directly. You have to defer it so the callstack clears before it runs. You can do that with something like setTimeoutsomeFunction, 0
Meneus: Though in the case of setTimeout, it technically wont’ execute the function until after the callstack clears and anything else in line is also executed
Gearing: Javascript458: mmm, that’s more of an interface issue with google’s thing then
Luckenbach: Well, i wouldn’t rely on that for strictly sequential processing
Meneus: No, you can’t do that and expect it to be sequential
Meneus: That’s really hard to do without wrapping function A first
Gearing: Javascript458: not directly a JS issue
Moler: The only way I can receive the edited do***ent is if I run the email-sending code in a separate function and execute it after the first function finishes
Odam: But why not just something like getDo***ent.thenfunctiondoc { emaileditdoc; };
Gearing: Basically you need to find out how or if you get notifications that these actions are complete
Meneus: I don’t know how google’s API works, but I imagine it either accepts a callback or returns a promise
Konopacki: Javascript458: Continuation-P***ing style is the formal term for the “callback-based” approach to programming. CPS is a heavily used idiom in JavaScript to deal with asynchronous programming. See http://matt.might.net/articles/by-example-continuation-p***ing-style/
Burneisen: If I use Return is ends the execution, but how would I start it again on a new function after Return?
Konopacki: Javascript458: Promises are placeholders for values that are not yet available, and allow one to regain compositionality for asynchronous operations in JavaScript. See: https://blog.domenic.me/youre-missing-the-point-of-promises/, https://t.co/jDfULUSUzB, http://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html contrast with !cps
Konopacki: Hendershott: CSP is a formal model of concurrency based on channels, natural parallelism/non-determinism and no IoC. It’s the major concurrency model in the Go language and Clojure’s core.async, but can be implemented in JS. See: http://jlongster.com/Taming-the-Asynchronous-Beast-with-CSP-in-JavaScript
Zamacona: Ah I see, I’ll look into both Promises and callback
Meneus: Hendershott: you’re gonna blow their mind with that one
Gearing: Javascript458: if you’re calling stuff in google’s api, you are limited to what it provides, probably
Hotrum: Maybe I should add !delimited continuation, !continuation monads, !task comonads, !observables, and similar thingies too 😛
Gearing: Channels aren’t a good fit for languages with mutable state :-
Neuhaus: You’re a mutable state
Meneus: Hendershott: I submitted a PR to transducers.js I think you’ll like
Limberg: Maybe a !comonad cotask codelimited cocontinuation
Sixkiller: Meneus: wut did you do
Landgraf: Code is secretly the dual of german 😛