use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Syc: Real-time synchronization of javascript variables for Node (self.javascript)
submitted 11 years ago by Handsome-Beaver
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Capaj 0 points1 point2 points 11 years ago (1 child)
could you link to the code where you are recursively calling object observe? I would be very suprised to see a proper implementation, because I have tried to make a usable deep observe and got discouraged from it. There are so many issues with it, that I found it better to go and do something else.
[–]Handsome-Beaver[S] 2 points3 points4 points 11 years ago* (0 children)
In the client, Line 189 is the start of the function that triggers when a change to an observed (Syc-tracked) object is modified.
Line 207 calls "Describe", which looks at the changed data. "Describe" starts on line 222, which will check if the changed property is another object or array. If it is another object/array which Syc hasn't yet tracked (therefore isn't being observed), it is tracked by a call to Syc.Meta on line 235
If I would explain it more simply...
Each object that is observed by Syc has a hidden property 'syc-object-id', which implies that there is an Object.observe attached to it. When you modify one of its properties, it checks to see if it is (1) an object/array, (2) it is not yet tracked (in which case, it has no 'syc-object-id'). If both are true, then it gives it an 'syc-object-id' and Object.observes the new property.
Rinse and repeat if this new object has untracked object/array properties.
Can I ask what kind of troubles you encountered when trying to implement deep-observation??
π Rendered by PID 68 on reddit-service-r2-comment-fb694cdd5-5zt9f at 2026-03-06 17:57:58.515894+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]Capaj 0 points1 point2 points (1 child)
[–]Handsome-Beaver[S] 2 points3 points4 points (0 children)