2,133 reputation
831
bio website
location
age
visits member for 2 years, 5 months
seen 5 hours ago

7h
comment MatchQ-ing Associations (MMA 10)
@alancalvitti -- yes, it can, but, so far as I know, there is no standard for this in JSON and developers often write really bad code for testing equality of JSON objects. Mathematica has a standard (if obscure) order for terms in expressions and freely reorders things for you in evaluation. But an Association is probably reordered in Hash order or Trie order or something else altogether and would have to be reordered for pattern matching. That's my guess -- just a guess -- why Taliesen said it's difficult to be efficient.
8h
comment MatchQ-ing Associations (MMA 10)
A possibly similar problem arises, for instance, in deciding whether the two JSON objects {a: 1, b: 2} and {b: 2, a: 1} are equal; the problem explodes with size, requiring either some arbitrary sort on the keys or considering $n!$ possibilities (modulo nesting).
9h
comment MatchQ-ing Associations (MMA 10)
I can see that pattern-matching over the contents of an Association would be difficult. Thanks for the info!
9h
accepted MatchQ-ing Associations (MMA 10)
17h
asked MatchQ-ing Associations (MMA 10)
1d
comment Struct equivalent in Mathematica?
@Leonid -- I have done some at-scale, production-level systems in Clojure and highly recommend it :)
1d
awarded  Revival
1d
comment Struct equivalent in Mathematica?
The careful handling of mutability, structure-sharing, and software transactional memory in Clojure might be the most sophisticated available in the world today (goo.gl/dG3g3). If I were to go whole-hog in Mathematica with a data-structure library, I would learn from Clojure.
1d
answered Return struct from function (with DownValues)
Jul
19
awarded  Inquisitive
Jul
18
comment Opacity limitations?
@celtschk -- yes, the second is what I wanted. Looks like this is a MMA 10 issue (or at least a non-MMA 8.0.0 issue :) and I'll file a bug.
Jul
18
comment Opacity limitations?
... True, but Rahul's comment is excellent. I'll wait a few days to see whether something new comes up, then ask that @Rahul promote it to an answer.
Jul
18
revised Opacity limitations?
added 299 characters in body
Jul
18
comment Opacity limitations?
oops, my bad. should have been the constant [3]. fixed in the edit (I snipped this code from another context).
Jul
18
revised Opacity limitations?
edited body
Jul
18
asked Opacity limitations?
Jul
5
awarded  Popular Question
Jul
2
awarded  Curious
Jun
4
awarded  Nice Question
Jun
4
awarded  Custodian