Reputation
70,638
Next tag badge:
215/100 score
20/20 answers
Badges
7 213 302
Newest
 Enlightened
Impact
~450k people reached

Aug
27
comment Can a Trie be implemented efficiently?
@belisarius Thanks for the info. I upvoted. Looks to be indeed comparatively one of the cleanest and shortest solutions. The {} -> {} part of my code is rather arbitrary, and partly was dictated by the need of this terminal element to be an (idle) rule - which was only necessary in the original code that used lists of rules. The code using Associations can use some more easy-to-understand expression for a terminal element.
Aug
26
comment Change Notebook's Default Context
You can make an input cell with the CellContext being MyPackage`Private` . Then you can use short names for private functions in that cell. You can automate creation of such cells with a palette or e.g. docked cell in your particular notebook.
Aug
23
awarded  Enlightened
Aug
23
awarded  Good Answer
Aug
22
comment best practices for saving Datasets and TemporalData to a SQL database
@AlbertRetey Yep, we can only hope. I am among those who hope, too. Right now the Streaming functionality is still too raw, there are a bunch of technical issues still to be solved, for it to become ready for production use. I hope to be able to address them soon enough.
Aug
22
comment best practices for saving Datasets and TemporalData to a SQL database
@alancalvitti I am aware of all that, and I also mentioned binary analogs of JSON, although not explicitly. However, people would not typically store really large numerical data sets in any of these, because it is still inefficient, both memory-wise and performance-wise. Mongo does indeed use JSON - like format for storage, but the type of data typically stored in Mongo is different. HDF format exists and is gaining popularity for a reason. This has been my last comment on this topic here.
Aug
21
comment best practices for saving Datasets and TemporalData to a SQL database
@MichaelStern One of the huge advantages of MX format is that you can store arbitrary expressions using it. So, you don't have to decompose your nested data sets, you should be able to save them directly to MX format, and then load from it. Re: speed - MX is a very fast binary format, so if anything, I am surprised that the speed difference is what you said and not larger. One other advantage of MX is that it doesn't unpack packed arrays. It seems to be fastest when you store your data in packed arrays and avoid associations.
Aug
21
comment best practices for saving Datasets and TemporalData to a SQL database
@alancalvitti Once again, JSON is relevant as a communication format, not storage. Your link just confirms it. No one in their right mind would store large datasets (particularly of inherently binary data) in plain JSON. Neither would people transmit Gigabytes of data over http requests on a regular basis. I don't exclude that people may use some JSON-like memory efficient binary formats, but that's not what you mentioned. There is no meaning to the world "relevant" without the context of what is the size and type of data, and how data is supposed to be used.
Aug
21
comment best practices for saving Datasets and TemporalData to a SQL database
@alancalvitti JSON is effective as a communication format, or to store small pieces of data. It is not well suited for storage of large amounts of data, particularly numerical. Besides, I don't see how this is at all relevant to this discussion.
Aug
21
comment best practices for saving Datasets and TemporalData to a SQL database
@AlbertRetey Yes, I agree with you. Your guess is also correct. You can look at my original post via the revision history, to see some of that. In fact, the Streaming module's main role is supposed to be just that: to support out-of-core computations on data not fitting into memory, for Dataset.
Aug
21
revised best practices for saving Datasets and TemporalData to a SQL database
Removed the sections on undocumented stuff
Aug
21
revised best practices for saving Datasets and TemporalData to a SQL database
added 4 characters in body
Aug
21
answered best practices for saving Datasets and TemporalData to a SQL database
Aug
20
comment How do I extract the contents of a selected cell as plain text?
@ibeatty Try the first (shorter) version first, on some sample box expression (can use MakeBoxes on any expression to create it), to see how it works. The longer one simply takes into account certain more complex cases like styled text, multiple input lines, etc. Keep in mind that this is not the recommended way to extract such strings, see the answer of John Fultz for the recommended way.
Aug
20
comment Why is BinaryReadList faster than BinaryRead?
BinaryReadList is faster for a usual (for Mathematica) reason: it operates at a lower level with more data at once. While Table is a top-level iteration, which requires a round-trip to the main evaluator at every iteration - which is the main reason for the slow-down here. As to the stream position, I don't understand your comment: for me, both StreamPosition and SetStreamPosition work perfectly also with BinaryReadList.
Aug
19
awarded  Enlightened
Aug
19
awarded  Nice Answer
Aug
19
revised Strange behavior with Cases and Position with SetDelayed
edited tags
Aug
19
comment How to reference StringExpression named parts from a package without full Context path?
That's great, @AlbertRetey, thanks! I wouldn't have produced such a nice answer for sure, so I am glad to have asked you to do this. I hope this didn't take too much time from you.
Aug
19
comment Strange behavior with Cases and Position with SetDelayed
@belisarius I mentioned in my edited post that there are many possibilities. Yours is surely one of them. What matters is that the relevant consructs won't be able to detect Rule at the time they act. And you probably don't even need Thread.