Reputation
27,616
Next tag badge:
212/100 score
19/20 answers
Badges
2 58 126
Newest
 Good Answer
Impact
~134k people reached

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.
Jul
18
comment Extracting values from nested rules in JSON data
+1 In 10.2, we can use Import[..., "RawJSON"] which automatically returns associations.
Jul
18
comment Streaming`LazyList`Testing may have a leak
@LeonidShifrin I've added a response that contains minimal reproduction steps, a speculative diagnosis and a partial work-around.
Jul
18
comment Streaming`LazyList`Testing may have a leak
I see that the new streaming packages will make for some interesting bedtime reading... ;D
Jul
18
comment Dataset vs an association of associations
@LeonidShifrin I added the section Type System Heuristics to make that discussion more explicit. It uses that first example. Thanks.
Jul
3
comment Dataset vs an association of associations
@gwr That might be better... or perhaps it is better to operate upon the rich structure directly, without wrapping it within Dataset first. This would allow the use of unrestricted operators. Then, if needs be, the final result could be converted to an interchange-friendly (dataset-friendly) format as the last step. Perhaps future releases might perform such conversions as needed automatically?
Jul
2
comment Using .NET 4.0 from NETLink
@RunnyKine Despite appearances to the contrary, there is a good chance that you are getting access to the latest 4.x version. See the new 4.5.x section that I have added at the bottom of the response.
Jun
22
comment Association of Associations : how to permute level 1 and level 2 keys?
@andre Alas, the general form of Transpose does not presently work on associations -- whether specified directly or after being interpreted by Query.
Jun
21
comment Association of Associations : how to permute level 1 and level 2 keys?
@m_goldberg Never thought of DeleteMissing for the DeleteCases... updated and thanks.
Jun
19
comment Dynamic does not update when wrapped in DynamicModule
I suspect that it has something to do with the asynchronous nature of the callback -- somehow Dynamic@choices is not tracking that kind of change. As a quick and dirty work-around, try Dynamic[choices, UpdateInterval->0] instead.