These are chat archives for exceptionless/Discuss

19th
Nov 2015
what did you end up doing for json patch @srijken was wondering
Eric J. Smith
@ejsmith
Nov 19 2015 19:46
reading through the discussion here… @frankebersoll I couldn’t agree more about deleting code. I like deleting code more (especially if it’s @niemyjski ’s code) because most of the time it means you’ve figured out a better simpler way to do things. To me that is the whole goal.
Blake Niemyjski
@niemyjski
Nov 19 2015 19:47
haha
I’ll never ever forget the time you were looking at code and were like WTF is this. I’m going to fire who ever wrote this code and it was blamed to you
Sander Rijken
@srijken
Nov 19 2015 19:48
hehehe classic
Blake Niemyjski
@niemyjski
Nov 19 2015 19:48
probably the most memorable moment of my career. He literally had steam coming from his ears
Eric J. Smith
@ejsmith
Nov 19 2015 19:48
That is the library we are using on the client side.
Sander Rijken
@srijken
Nov 19 2015 19:48
we’re using it as well, thanks for mentioning it a while ago
Eric J. Smith
@ejsmith
Nov 19 2015 19:48
lol, yeah, make sure you leave the part out where I just renamed the file and it wasn’t me. :-)
Blake Niemyjski
@niemyjski
Nov 19 2015 19:48
lol
that part is just extra info :D
Sander Rijken
@srijken
Nov 19 2015 19:49
@ejsmith did you figure out a way to make it generate “move” commands for array ordering?
Eric J. Smith
@ejsmith
Nov 19 2015 19:49
ruins the story, eh? ;-)
Blake Niemyjski
@niemyjski
Nov 19 2015 19:49
yep
Eric J. Smith
@ejsmith
Nov 19 2015 19:49
no, we haven’t had the need for that yet.
would imagine it would be pretty tough for them to figure that out.
Sander Rijken
@srijken
Nov 19 2015 19:50
there’s a few hints about using Array.prototype.observe in the code and also an issue
Eric J. Smith
@ejsmith
Nov 19 2015 19:51
ahh
Blake Niemyjski
@niemyjski
Nov 19 2015 19:51
@srijken not sure I’d use that.. observe was removed from the spec
Sander Rijken
@srijken
Nov 19 2015 19:51
oh, didn’t look that far :)
Blake Niemyjski
@niemyjski
Nov 19 2015 19:51
object.observe I believe was removed from es7
no? or is this something already baked in to es5/es6?
Sander Rijken
@srijken
Nov 19 2015 19:52
what it does now it when you remove item 0 from the array, it applies all the properties from item 1, to item 0, item 2 to item 1, etc
Blake Niemyjski
@niemyjski
Nov 19 2015 19:52
I’d be worried about concurrency tho
Sander Rijken
@srijken
Nov 19 2015 19:52
that’s another thing
Blake Niemyjski
@niemyjski
Nov 19 2015 19:53
eric and I were talking earlier about sending a version along with the patch so you could make sure your patching the right version
Sander Rijken
@srijken
Nov 19 2015 19:53
looks like we’re heading the same direction
are you using this for exceptionless?
Eric J. Smith
@ejsmith
Nov 19 2015 19:53
yeah, we have document versions to make sure no edits have happened in between.
have to do that since the patch generates array index operations.
it’s not in Exceptionless yet, but we want to get it in there.
Sander Rijken
@srijken
Nov 19 2015 19:54
there’s not a lot of changes in Exceptionless documents?
or am I missing something
Blake Niemyjski
@niemyjski
Nov 19 2015 19:55
not in events, but projects, orgs, users and stacks change a lot
Sander Rijken
@srijken
Nov 19 2015 19:55
right
we’re building an e-learning editor, a course is a document iirc.. so the document tends to be large-ish
and we want auto-save behavior, and if at all possible also collaborative features
sending the incoming patches along to the other clients with SignalR to have them applied there seems like great idea
Eric J. Smith
@ejsmith
Nov 19 2015 19:56
in Exceptionless we are doing kind of manual patches.
Sander Rijken
@srijken
Nov 19 2015 19:56
also for that: PuppetJS
Eric J. Smith
@ejsmith
Nov 19 2015 19:56
and last in wins
yeah, that is what I am planning to do as well.
unfortunately, the json patch lib in .net is horrible.
thinking about making my own.
Sander Rijken
@srijken
Nov 19 2015 19:59
what are you using there?
Sander Rijken
@srijken
Nov 19 2015 20:02
Frank Ebersoll
@frankebersoll
Nov 19 2015 20:03
good afternoon
have been looking into the build process of vscode
i don't even...
Sander Rijken
@srijken
Nov 19 2015 20:05
interesting stuff.. and that RFC is very young, compared to JSON, and also how simple/useful it is. Why didn’t this pop up earlier :)
Blake Niemyjski
@niemyjski
Nov 19 2015 20:07
haha
good afternoon
Eric J. Smith
@ejsmith
Nov 19 2015 20:07
is that library any good?
Frank Ebersoll
@frankebersoll
Nov 19 2015 20:09
can those patches be processed with elasticsearch?
Eric J. Smith
@ejsmith
Nov 19 2015 20:09
@srijken haha yeah, that is the lib that they started the aspnet one from.
that one is even worse than the aspnet one.
Sander Rijken
@srijken
Nov 19 2015 20:09
oh right
Eric J. Smith
@ejsmith
Nov 19 2015 20:10
they don’t respect your json contract settings… so unless you just use default json naming conventions then you are screwed.
Sander Rijken
@srijken
Nov 19 2015 20:10
what’s the bad things about them?
Eric J. Smith
@ejsmith
Nov 19 2015 20:10
plus it’s using plain reflection which is going to be slow as heck.
and you can’t diff 2 objects.
and you can’t apply a patch to an object that is different than the generic type you specified.
we do that for our view models.
Sander Rijken
@srijken
Nov 19 2015 20:15
thanks
we’re using one of those for now.. if you have more than plans for creating the other library let me know, could be a nice joint project
Eric J. Smith
@ejsmith
Nov 19 2015 20:17
@srijken yeah, I am trying to resist, but I think it may be necessary.
also, I was thinking about adding a feature to json patch that would allow you to use this: http://www.newtonsoft.com/json/help/html/QueryJsonSelectTokenJsonPath.htm
I want to be able to find an array element that matches some inner value and not use the indexer position.
Sander Rijken
@srijken
Nov 19 2015 20:20
doesn’t that make it incompatible with the RFC
Eric J. Smith
@ejsmith
Nov 19 2015 20:24
it would support the normal json patch stuff plus that format.
so it would be a superset.
I want to use it for bulk updates and the problem with bulk updates is that they will run in a background job and I can’t be using an indexer position when I am not sure that the document hasn’t been modified and the position changes.
Sander Rijken
@srijken
Nov 19 2015 20:28
right
Blake Niemyjski
@niemyjski
Nov 19 2015 22:23
@frankebersoll were you able to run the unit tests with my changes
curious if you had to set anything else up
I never heard back from my friend from google.
Sander Rijken
@srijken
Nov 19 2015 22:47
@niemyjski the MS headers thing is still open, not sure I can respond to that :/
I mean, I don’t know how “open” the issue is, haven’t checked
Blake Niemyjski
@niemyjski
Nov 19 2015 22:55
do you have a link to that by any chance
I’ll check my gmail
Sander Rijken
@srijken
Nov 19 2015 22:56
just a sec
Blake Niemyjski
@niemyjski
Nov 19 2015 22:56
found it
had to tweak my gmail search
juts searching for connect dosen’t work
Sander Rijken
@srijken
Nov 19 2015 22:58
k
also I couldn’t really figure out what more he needs
Blake Niemyjski
@niemyjski
Nov 19 2015 23:13
he doesn’t need anything more from the start
it’s microsofts standard we need more info before we can close this by design
I would really like to know why our exceptionless unit tests keep failing.. I can run them locally with exactly the same settings and they pass every time