Open OliverEvans96 opened 4 years ago
This caught my interest so I looked into it. Can't say I'm completely right but here goes. == is overloaded by ganja. === is not. Since they both do ref checks on objects, you, as stated, would expect them to be the same. But if the overload of == finds the types it is interested in, it will do an element by element comparison and if they are all the same return true. You can search ganja.js source code for eq to see the function (which is mapped to ==). Obviously ganja is a learning tool - and a great one at that - so not necc. going to cover every single base. I used the browser debugger to see all this.
Thanks to ganja creator for it and the incredible GAME2020 video. Opened my eyes more than anything else.
Sorry for being late to the party - Ted's analysis is entirely accurate. (and thanks for appreciating the lecture!). While it would not be difficult to add support for the tripple equal operator I'm unsure what the expected behavior should be. The only case that comes to mind where it would differ from the double equal is when comparing a scalar with a multivector-containing-just-a-scalar-coefficient - am I missing something?
Hello,
I'm just beginning to learn how to use ganja.js, and I was playing around in the browser console and noticed the following:
produces:
I'm surprised by (2) and (5) - these are seemingly minor details, but I wonder if anyone could explain whether they are to be expected, or are overlooked implementation details.
In @chakravala's Julia implementation, Grassmann.jl, we do, in fact, have
v1*v2 === v12
, which leads me to expect it here as well.Again, thanks for the really cool software, and I hope you'll excuse my ignorance :)
Cheers, Oliver