These are chat archives for Automattic/mongoose

5th
Nov 2015
Luke A. Greenleaf
@gishmel
Nov 05 2015 00:00
@vkarpov15 do you have plans in the near future to publish docs on monogram?
Valeri Karpov
@vkarpov15
Nov 05 2015 03:46
@gishmel yeah in the next couple months. Monogram has a big problem though now that Object.observe() is headed for the trash can: https://esdiscuss.org/topic/an-update-on-object-observe so I'm not 100% sure what to do with it
Luke A. Greenleaf
@gishmel
Nov 05 2015 03:47
yeah I have been hearing about that every 3 hours in another chat room i am in haha
could you not just utilize the polyfill or do you mean long-term it doesn't look good?
Valeri Karpov
@vkarpov15
Nov 05 2015 03:50
So I've been using https://www.npmjs.com/package/nested-observe, which uses https://github.com/KapIT/observe-shim under the hood, which means it should work fine going forward, especially since there's really no reason why monogram can't just use dirty checking
except for, in theory, a good O.o() implementation would give it exceptional performance and a really small code base, which is why we wanted to use it in the first place
I'm probably gonna see if something like https://www.npmjs.com/package/deep-diff is faster than the O.o() polyfill, especially since I'm deathly allergic to global state
Luke A. Greenleaf
@gishmel
Nov 05 2015 03:52
yeah its quite saddening that because someone decided they no longer wanted to champion the feature they were gonna let it slip away especially if React isn't the fountain of youth it may appear to be on the surface
Valeri Karpov
@vkarpov15
Nov 05 2015 03:53
speaking of global state, please don't suggest I use observe-js: Polymer/observe-js#105
and I really don't understand the reasoning that "oh react makes O.o() obsolete" I think the opposite is true
I'm no expert on flux, but O.o() looks like it would be extremely useful as a means of converting state change to actions
and if you think Rx is the fountain of youth, well, O.o() gives you a mechanism to convert POJOs into change streams at your heart's content
Luke A. Greenleaf
@gishmel
Nov 05 2015 03:56
I completely agree with you and I don't think React is the fountain of youth
Valeri Karpov
@vkarpov15
Nov 05 2015 03:56
and in a much easier and cleaner way than using a proxy
Luke A. Greenleaf
@gishmel
Nov 05 2015 03:56
idk I am very excited about proxies
but thats an entirely different discussion
Valeri Karpov
@vkarpov15
Nov 05 2015 03:57
react has some brilliant ideas, nowadays my angular 1 code looks a lot like react :package:
Luke A. Greenleaf
@gishmel
Nov 05 2015 03:57
haha
good ole Angular 1 days
how bout those Angular .4 days
Valeri Karpov
@vkarpov15
Nov 05 2015 03:58
they're still here, at least until angular2 is formally released
Luke A. Greenleaf
@gishmel
Nov 05 2015 03:58
those were the best when you couldn't have more than 50 bound properties on your scope otherwise your $digest cycle churned for an eternity
Valeri Karpov
@vkarpov15
Nov 05 2015 03:58
and even into the future. Been writing angular code for 5 years now, hard to stop
Luke A. Greenleaf
@gishmel
Nov 05 2015 03:59
yeah I saw your course coming up that looks like fun
if it was monogram I would so be there!!!
Valeri Karpov
@vkarpov15
Nov 05 2015 03:59
well when I figure out what to do with Object.observe()'s impending demise I'll let you know :)
Luke A. Greenleaf
@gishmel
Nov 05 2015 04:00
I am gonna throw it into a simple application I am building and see how far I can get just by using node-inspector and reading through your source code
it looks awesome from what I have seen out of your test cases
Valeri Karpov
@vkarpov15
Nov 05 2015 04:02
I'm glad you found it useful so far, give it a shot and feel free to report any bugs
I'm also gonna be building a couple sample apps with it soon
Luke A. Greenleaf
@gishmel
Nov 05 2015 04:05
I will be sure to keep you updated on my findings via github
but :+1: for lightweight code its a thing of beauty really
Luke A. Greenleaf
@gishmel
Nov 05 2015 04:47
I assume you don't use ES6 on the server?
Luke A. Greenleaf
@gishmel
Nov 05 2015 05:26
does monogram have the same options as Mongoose as far as the Schema is concerned such as unique or required?
Valeri Karpov
@vkarpov15
Nov 05 2015 13:37
@gishmel no I'm all about ES6 on the server, generators, promises, and arrow functions are sweet, I'm just paranoid about transpiling server code :)
Rahul Patil
@Technologeek
Nov 05 2015 16:25
hey
hows everyone doing>
I have a bit of a issue regarding installation of mongoose.Am I at the right place?
Diego Aguilar Aguilar
@diegoaguilar
Nov 05 2015 17:35
yep @Technologeek , just ask
:)
Rahul Patil
@Technologeek
Nov 05 2015 17:36
hey
i tried to install mongoose
via npm
it throws error like guy stack build error and something related to microsoft framework
Luke A. Greenleaf
@gishmel
Nov 05 2015 19:29
@vkarpov15 yeah transpiling is odd but I love async functions like I half contemplate taking your monogram and trying to recreate it using all async functions
This message was deleted
Theo Sherry
@theosherry
Nov 05 2015 20:56
is there a built in function to get a string representation of an ObjectID?
Nick Stefan
@NickStefan
Nov 05 2015 21:53
hey all. I made an MVP version of mongoose in the browser. aka minimongoose: https://github.com/NickStefan/minimongoose
  • basically its the mquery library wrapped around a minimongo-like class and some mongoose stuff
  • re-use your mongoose schemas to perform server queries and populate across collections etc
  • probably not a good production idea until http2, but cool idea nonetheless considering what people are doing with relay etc
Theo Sherry
@theosherry
Nov 05 2015 23:23
@uptownhr thanks