Reputation
9,016
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
32 58
Newest
 Nice Answer
Impact
~39k people reached

Dec
31
comment How to have an Input cell that doubles as an Output
I would have thought that the ability to close a cell group, alternatively on the Input cell or reverse-closing on an Output cell, would have been pretty close to what you're looking for without trying to invent a new interface. Certainly I see reverse-closing as a very common way of hiding implementation in notebooks.
Dec
31
comment Optional throws error when called from a package. Workaround?
I agree that the StandardForm ToExpression output seems wrong. I couldn't find an existing bug report about this, although it's likely to be an old bug. I've opened the bug report. Any licensed user who is interested in being notified when this bug is resolved can ask Tech Support to attach their contact information to bug 305932.
Nov
15
awarded  Nice Answer
Oct
8
comment How to run existing mathematica nb from Java
@KonstantinStolpovsky, in the short run, you're probably going to have to work with Szabolcs' solution, which is to use a package file. Because of bugs I mentioned in my previous comment. But that having been said, your code has a completely unnecessary reference to EvaluatePacket in it. You may wish to correct it in your question.
Oct
8
comment How to run existing mathematica nb from Java
Actually, @Szabolcs, I would claim that this code should work. But it is an unfortunate truth that the history of NotebookEvaluate running from a standalone kernel is a troubled one. I believe the relevant issue here is that there is a known and reported bug that, if a kernel has a parent link other than the FE, then UsingFrontEnd[NotebookEvaluate[...]] can fail. I partially fixed this for 10.3, but troubles remain. That having been said, there is a minor bug in the code here. See next comment.
Oct
8
awarded  Necromancer
Oct
8
comment What is the point of Refresh if Dynamic has an UpdateInterval option?
@RolfMertig, Refresh is not widely deployed in v10. It is deployed where necessary. Your speculation about widespread slowdowns, if warranted generally, is not applicable to a connection with Refresh specifically (particularly since v10 has nothing new in regards to Dynamic).
Oct
8
comment What is the point of Refresh if Dynamic has an UpdateInterval option?
@AlbertRetey, I'm talking about a situation where a developer is making f available for your use by users. If I don't have end-to-end control, then I have to anticipate any usage. It's not reasonable for me to tell users to hack around my problems. That having been said, this certainly does not arise in many functions. Functions developed with no side effects (which is quite a lot of them) won't exhibit this behavior. For example, in 10.0.0, there was an infinite Dynamic triggering bug in GeoGraphics. The solution finding the accidental side effects and removing them, not Refresh.
Oct
8
answered What is the point of Refresh if Dynamic has an UpdateInterval option?
Oct
8
comment What is the point of Refresh if Dynamic has an UpdateInterval option?
@Kuba Dynamic evaluates to a thing with head Dynamic. Refresh evaluates to its contents. If you are implementing a function which can be used anywhere, but which must not trigger any enclosing Dynamic unnecessarily, the only way to do this is Refresh. It is literally impossible to do this with Dynamic. Consider, for example, a function which memoizes its results. Inside of a Dynamic, such a function triggers twice because the act of memoization produces a global side effect in the symbol table which will retrigger enclosing Dynamics. Refresh can stop that dead.
Oct
7
comment What is the point of Refresh if Dynamic has an UpdateInterval option?
This is an underrated answer. We do this all the time in Mathematica code. If you have any function which modifies any non-localized symbol for any reason, this is the only way to prevent it from non-stop tickling parent Dynamics. I have, many times, reported bugs to developers around the company for which the fix is to wrap their code in Refresh[#, None]&. Such a change has no effect outside of Dynamic, but exactly the desired effect inside Dynamic.
Oct
7
revised What is the point of Refresh if Dynamic has an UpdateInterval option?
Typo
Oct
7
revised How to Initiate a queued evaluation from a Dynamic GUI without using a Button
Update answer for new versions.
Aug
26
awarded  Informed
Aug
20
awarded  Good Answer
Aug
14
awarded  Revival
Aug
14
answered Hidden parent stylesheet?
Aug
14
comment Reference to multiple stylesheets
@Kuba, my last paragraph indicates that multiple stylesheets lets you mix in "new styles". What I mean by this is stylenames which have not been previously defined. Input/Output are defined in Core.nb, which is ultimately inherited by nearly every stylesheet in the system. Not many styles you've heard of get defined in Core.nb because we don't want to insert hard-coded stylenames into effectively every stylesheet. So, you won't find Section or Title or Code, for example. But Input and Output are so universal to the way the system works, it seemed better just to put them in Core.nb.
Jun
26
comment Reference to multiple stylesheets
That having been said, your statement that multiple stylesheets "don't work" is not strictly true. They don't work for your purposes. But they do work. You can use multiple StyleData[StyleDefinition->...] cells to mix in new styles. So if, in your example, "StyleSheet2.nb" has styles which don't exist in "StyleSheet1.nb", then they will be amalgamated together in your new stylesheet. So it does do something, just not what you were hoping for. Sorry for the multiple commenting, but I don't feel like I'm actually answering your question. Unless you'd accept "no" as an answer. :)
Jun
26
comment Reference to multiple stylesheets
...and these particular computations, although we cache them as much as possible, are one of the most expensive computations in the system. Not to mention the amount of effort to implement which, as has been pointed out in this thread, has a very low payoff because very few people would ever use this feature.