About to head to dinner, but regarding the flea, jacket, roller blades game, a veterinarian said it's impossible to make a game starring a flea that is enticing. I think the flea should be a messenger flea between different flea colonies on different animals. It uses roller blades to go faster and the jacket to stay warm when scouting at the top of a dog hair.
fyi, numbers of symbols in V10 counted is 8579, in V9.01: 7919. About 650 more symbols. I could not get the list of all the functions yes, the script I used for V9 does not work in V10, need to find out what changed. So I just now have count of symbols in each context 12000.org/my_notes/compare_mathematica/V10/main.html
any one knows if Mathematica graphics are automatically rendered on the GPU? (hardware accelerated) and if not, is there a way to configure it to do so?
also FrontEnd`FileName[{$InstallationDirectory, "AddOns", "Autoload"}] does not seem to exist (I guess read FileNameJoin instead of FrontEnd`FileName)
I hope no system function depends on the existence of z or rhs in Global. For example if you set
sys`f[Global`xxxx]:=Global`xxxx
and then remove Global`xxxx, sys`f // Information will look all funny, and I think it can lead to trouble if you use Save. The function still works with the definition with Removed in it though
If I evaluate, with a fresh kernel
Names["Global`*"]
I get
{"rhs", "z"}
I think this is not caused by any packages in $UserBaseDirectory or $BaseDirectory, because if I evaluate the same expression under V9.0.1, which has the same strings for these variables (directories), I get
Names["G...
Yeah, and after calling CloudEvaluate my Global space back home is also dirtier than before
Hm.. When I give Trace more than one option, all but the first options turn red. But they still have effect. I suppose they become red because SyntaxInformation[Trace] tells us that there can be only up to two arguments. Also seems like a bug to me
no difference between V9 and V10... still I'm confused
Hmm.. I'm probably not going crazy. In the docs of SyntaxInformation, there is an example that should turn red, but doesn't. It even doesn't turn red in 9, and I expect installing V10 somehow interferes with V9.
Mathematica version 10 has been released, with new functions and operators.
The syntax highlighter on this site needs to be updated.
The highlighter that is being used is already updated in the GitHub repo. The new version simply needs to be added to this site.
I find it weird and uncomfortable that applying Normal to a Dataset gives associations, but applying Normal to associations gives a list of rules. Aren't these two effects of Normal going to interact badly at some point? I wish there were two separate functions for these two types of conversions.
Also, Normal@Dataset[...] does convert the Dataset, but Normal@{Dataset[...]} does not convert anything. This is not how Normal works in all other situations I know of (including SeriesData, Graphics, Association, SparseArray).
upgrade seems to be cheaper now i tried my V9->V10 and they quoted me 65£ for home user license, ref my earlier mullings about they asking full price for a upgrade
This may have been discussed before, if so, please let me know.
Consider the following example:
x = 5
Dynamic[{Clock[], x}]
This will always display the current value of x.
Now evaluate
Block[{x}, Pause[5]]
Notice that x loses its global value!
Question:
Block is commonly used to t...
@Szabolcs I think this is rather logical, at least the first two cases. Frequent semantics of Normal is to reduce some object to its core constituents, and in this sense, the behavior of Normal for both Dataset and Association seems logical. Since Normal is always some kind of reduction, in either case this is not an equivalence transform, but you can reconstruct back both Association and Dataset by using the constructors.
@Szabolcs The last case (Normal[{Dataset}]) - I don't have a strong opinion here. But, in general, I don't think we should expect from normal to perform some inner scan for the constituents which are amenable to it (in other words, I actually don't support the idea of Normal to be recursive, except in certain special cases. The reason is that while one can easily build a user-level version of Normal which would be recursive, from a non-recursive one, it would be much harder to disable recursion)
@Szabolcs So, in summary, I think this behavior is fine.
@LeonidShifrin I agree about that for Dataset, but in many cases it's very useful actually. It's quite useful with Graphics, which have nested GraphicsComplex. And also this (at the very end).
Isn't the real problem that very different uses are all tied to the same function?
In some cases the recursive behaviour is quite desirable. But once it's made recursive, it may affect several different data structures that are part of the same expression. It may e.g. convert both associations and GraphicsComplex within the same expression. Then one has to be vry careful and use ReplaceAll to only apply it where it's needed.
@Szabolcs I think it is. But in Mathematica model, that's what we have - generic functions (rather than say objects). In the OO world, the same method names are Ok because they are always used on specific object instances. In Mathematica, one can only come up with a new function with another name, or leave with strongly overloaded general function.
@Leonid Something related to that. What do you think about the "methods" and "properties" that can be used with InterpolatingFunction, FittedModel, etc.? E.g. if = Interpolation@Range[10] and then if["Domain"]. These are very rarely documented, but are commonly used internally. I think they're only documented for FittedModel.
They still seem to be a good way to tie names to a certain kind of object, and not have too may things in the system namespace.
For example, Length@Names@"MeshCell*" is 9. When these prefixes (like MeshCell) start to proliferate, it's a sign that some sort of object oriented approach that ties methods to a certain class would be needed. Just for organization.
@Szabolcs Ok, first this note (typing fourth time now) about recursive functions problem (like for Normal) - it is all due to the "over=transparent" nature of Mma w.r.t expressions and their inner parts. Often this is a big win, but we also pay for it in many ways (broken lexical scope in Function is one example of this payback)
@Szabolcs They were just some meaningless parts of words - I encountered a pretty bad bug in Safari, obviously. Now switched to Firefox.
@Szabolcs Yes, I agree, they are a good way to do things. This is pretty similar to properties of objects in javascript. But always using strings is a bit annoying (purely on the syntax level), in js at least you can often omit strings (it auto-stringifies)
@Szabolcs This is inevitable, because the more Mathematica moves into applied domains, the more there is a need to keep collections of pre-computed properties, which can be easily accessed. Mathematica would certainly benefit from some kind of object model. Recently I have been thinking that prototype model of inheritance (like in js) would suit it better than the classical one.
@LeonidShifrin This is what prompted my question. What if InheritedBlock gets iterrupted by a pre-emptive evaluation, and the pre-emptive evaluation ends up using a modified Rule?
@Szabolcs Good point. This also applies to other Block-like constructs we often use. I actually never bothered, but your version is probably more careful. I just don't see whether it can ever lead to some kind of locks or blocking. Don't have a good enough understanding of Dynamic etc to see that on the spot.
(Yes, I was looking to break it, while trying to figure out if keys evaluate further, once they're part of the association)
Maybe Compress needs a separate atomic representation for it instead of decomposing it into a compound expression with head Association and no Hold* attribute ...
@Szabolcs : This would actually be better, since external reports are often given more weight, at least unless there appears a specific internal discussion thread on the issue.
@Szabolcs I can start such a thread too, hope I will remember to do that.
@kguler SSSTriangle[3,4,5] gives Triangle[{{0, 0}, {5, 0}, {16/5, 12/5}}]. Have you found a simple way to convert this to a MeshRegion which contains a single triangle only, i.e. mesh = MeshRegion[{{0, 0}, {5, 0}, {16/5, 12/5}}, Triangle[{1, 2, 3}]] ?
If we had that, then there should be a better way to solve this with HighlightMesh. But I'm struggling with that too to get a really simple solution. So far I only have:
The simpler HighlightMesh[mesh, Labeled[1, "Index"]] labels with the indices, but I'd really like to use a function (RegionMeasure?) instead of "Index".
Hi @kguler! I'm also just learning this new geometry functionality, and it's really bothering me that I can't come up with a simpler and shorter solution for this labelling problem. I was wondering if you came up with anything better or if you will come up with something better based on the above.
The solution you posted of course works well, but it's not simple and general. I'm trying to find the best way possible with the new functions.
Neat idea .. MeshRegion , HighlightMesh are all new to me -- it looks/feels like GraphicsComplex?. I thought working with the coordinates of the Triangle object directly was simple for OP's specific question. I will to study/play-with Mesh-- stuff more to see we can make something like HighlightMesh[mesh, ...] work.
@Szabolcs, thank you for the many TILs re these new functions. If you go with "Index" for labeling it can be also be done using the MeshCellLabel option: MeshRegion[{{0, 0}, {5, 0}, {16/5, 12/5}}, Triangle[{1, 2, 3}], MeshCellLabel -> { 1 -> "Index"}]
Oh okay Thanks. They say that we get Mathematica 10 when we pay for a subscription to the Web Cloud. If we have Mathematica 10, do we get one year of web cloud? Probably not but just wanted to make sure