Reputation
28,386
Next tag badge:
149/100 score
18/20 answers
Badges
2 60 130
Impact
~138k people reached

2d
comment Time Zone Conversion
@GiacomoCiani You are correct. I added a section that shows how to obtain time zone offset information using the V10 entity framework.
Aug
29
comment Access interactive web forms
Also related: (2362).
Aug
27
comment CountryData vs EntityProperty: why do different data access methods produce different results?
The case of CountryData is discussed in both responses to Finding out all undocumented values for “Properties” in XxxData functions. It is not clear to me whether or not the present question should be considered a duplicate.
Aug
26
comment How to ValueQ a symbol, constructing the symbol name from strings?
You need to use ToExpression["box`" <> name, InputForm, ValueQ]. This question is essentially a duplicate of How can I test properties of a symbol from the string name without the symbol completely evaluating. Voting to close.
Aug
15
comment ToExpression processing errors
I added an example of what I meant by "more elaborate error-handling". This is probably about as bullet-proof as we can get in high-level Mathematica code, without access to the internal C++ parsing code.
Aug
10
comment Operating on a dataset named “data” triggers an error message
The result of the GroupBy operation is actually correct. The message data::shdw is a known V10.2 bug discussed in (88393). See that question for a work-around. Voting to close as a duplicate.
Aug
8
comment Removing elements from a nested list based on their global count
The pronunciation of (##&[]) cannot be uttered in polite company. It is a rather harsh colloquial synonym for Nothing. ;)
Aug
6
comment Why this shadowing when dealing with a dataset?
This is essentially the same problem as reported in Streaming`LazyList`Testing may have a leak. Voting to close as a duplicate.
Aug
5
comment Windows command line arguments, stdin & stdout
@William Streams named "stdout" and "stderr" are available, e.g. WriteString["stderr", "bad news!"]. As to re-using a session using only streams and strings, the only approach that comes to mind at the moment is to implement a Telnet-like protocol where Mathematica and the other process take turns sending commands and responses back and forth. MathLink would give complete fine-grained control but would take more effort to set up.
Jul
31
comment Creating a generic empty list with JLink
@mfvonh If you are referring to implementing a Java interface in JLink, and the API requires the implementations to carry annotations then, yes, we are out of luck. JLink has no current support for implementing annotations.
Jul
31
comment Creating a generic empty list with JLink
@mfvonh The generic type arguments are inaccessible to such APIs -- even in Java. In the absence of source preprocessing or other out-of-band information, those APIs will require us to pass class objects as explicit method arguments somewhere along the line. JLink allows us to pass class arguments provided we recover the native class objects using JLinkClassLoader. For example, see (22730). [...continued...]
Jul
28
comment Visualizing Type System Operations
@Leonid I look forward to the prospect.
Jul
24
comment Dataset seems to break Information
@StefanR You have an incoming "feedback" email from me as well, CASE:3391689 :) With more details coming.
Jul
24
comment Dataset seems to break Information
@StefanR Indeed, that was my point about the similarity to Graphics. In fact, Dataset is a little better than Graphics in that it only renders when it is the outermost head. That is why the original problem is surprising: a Dataset is being rendered even though it appears in a non-top-level context, namely the right-hand-side of a definition. This is potentially dangerous, and a regression from v10.1.
Jul
22
comment Using Merge[Identity] and Transpose on a Dataset
As @halirutan says, Transpose within a query is actually transformed to another function, namely GeneralUtilities`AssociationTranspose. We can see this by evaluating Query[Transpose] // Normal. Thus, we must write data[f] /. f -> GeneralUtilities`AssociationTranspose to get something essentially equivalent to data[Transpose] // Normal. Another way would be to write Unevaluated[data[f]] /. f -> Transpose, which would leave the result as a dataset.
Jul
21
comment How to Negate a Pattern Test and Transform a List of Strings to a JSON array
+1 Unrelated to "negating a pattern test", but incidentally it is unnecessary to check listEmptyQ for the pattern {__String} (two underscores) since it will only match non-empty lists. The pattern {___String} (three underscores) will match both empty and non-empty lists.
Jul
21
comment Inserting symbols' definitions during read time of the code
@Kuba Yes, but testFunction as written is defined to use Test`Private`explicitvalue (I'm thinking defensively).
Jul
21
comment Inserting symbols' definitions during read time of the code
The example as written defines explicitvalue in the private part of the package. We need to reference it in the public part, e.g. add explicitvalue::usage = "..." before the private part.
Jul
21
comment Given the OneIdentity attribute why is GCD[a] evaluated to GCD[a]?
@Praan Yes, that is a better way to phrase the rule. I have adjusted the wording and added two more examples. Thanks.
Jul
19
comment 10.2 Dataset extraneous print using Transpose
@chris Personally, I think the patch is perfectly safe. But obviously WRI aren't going to support it.