I’d like to clarify.

Lukaszewicz: VirtualType.prototype.get = function fn {

Arcega: Alf0nn: with arrow functions, “this” in the functino would be what ever “this” is in the lexical scope

Arcega: Eg, its like if you have; var self = this; whatever.getfunction { return self.field; }

Hellen: Yes but if I want to do ROP

Varone: Thanks for the reply btw

Miro: With function { return this; }

Gerecke: Works correctly but with = is undefined

Arcega: Alf0nn: what the function “get” returns is independent from the function you’re p***ing in to it?

Dorinirl: The get is from a mongoose virtual getter

Cesari: If I understand correctly the question, yes

Arcega: Alf0nn: the “this” in the function fn, can be different to the “this” in get, so that return this should work just fine, irrespective of fn’s this

Schinkel: Rephrase: any idea why they go off screen? http://www.offlinespeedrun.com/index.html Jquery.animate with window.width

Thibault: Beginner question please help, how do i access “b”: http://jsbin.com/cesutavoye/edit?js,console thank you

Arcega: Eplo: you can’t, it only exists with in the scope of the function c

Arcega: Eplo: you’d have to p*** it as an argument to a

Kalinoski: Var e = eval; e’this’ === eval’this’

Mate: Kalinoski: boolean true

Kalinoski: If you access eval through a reference other than “eval” itself it accesses the global scope

Kalinoski: I don’t know how Mate is implemented so I was wondering if that would work

Evelyn: I must run a JS file once per minute. It makes HTTP requests to ensure a JSON file is up-to-date locally. I intend on writing a shell script to run it, and calling the shell script minutely via cron

Jarmin: Does anyone have ideas of how to improve on that design?

Eversoll: Kellytk: use a recursive setTimeout?

Vandenberghe: Hylle: I don’t understand

Siefert: Var request = require’request’; function check{ requestthe.JSON.thenfunction{ setTimeoutcheck, 1000 } }; check;

Boucouvalas: Why not program it through the nodejs instance, instead of using external process to do a http request

Pronovost: Hylle: I’m still new to JS. Could you explain what the point of that code would be?

Waldman: Pikul: That was my original plan, but I had the thought that the web aspect was unnecessary, and so possibly Node.js was as well. What is the advantage of implementing the JS as a Node app?

Insalaco: Well, you have access to the data straight from node

Kuwana: No need to do any request

Heward: This script won’t need to respond to HTTP requests, rather it will initiate them

Vanderlip: Kellytk: Node isn’t a server, it’s a platform for writing JS applications. Just like CPython.

Cornick: I’m not confident we’re talking about the same thing

Prucha: Hylle: Ok, then ***ume this is packaged as a Node.js app

Patanella: When you say, you need to run a js file once a minute what do you mean?

Shaffner: Kellytk: the code above uses a library called request, which makes HTTP requests. It then has a function check, which makes an HTTP request to whatever the.JSON is, and once that is done, it schedules itself to run again after 1 second.

Stramiello: Now I run it each minute, and it performs the necessary HTTP request and processing on the returned JSON file

Mitts: Hylle: Is it correct to see that as event-driven, async implementation of the HTTP request and response’ handling?

Schauer: Pikul: Once per minute I must run code that retrieves a JSON file via HTTP request, and with that file write it locally if it’s newer than the local copy

Brank: Kellytk: there are no events in that code example. But Node itself is an event-driven platform.

Boettner: I’d like to clarify something, the Node.js app will be ran once per minute, it will not be started and run persistently, itself handling the cron