2
$\begingroup$

This question already has an answer here:

As an intermediate level Mathematica user, I consider one of the greatest barrier on my way to a higher level of programming is the lack of knowledge about extra packages like Internal` package or System` package. Functions in these packages are often without explanation but always useful.

A few problems can sometimes easily be solved by simple usage of Internal` functions. A traditional one is Internal`PartitionRagged which is extremely useful at splitting list into regular parts. At different programming level, different codes may be written:

t = 10000;
(*Novice*)Table[Range[i (i - 1)/2 + 1, i (i + 1)/2], {i, 1, t}]; // Timing
(*Intermediate*)With[{l = Accumulate[Range[1, t]]}, {{1}}~Join~Range @@@ Transpose@{Most[l + 1], Rest[l]}]; // Timing

(*Internal`PartitionRagged*)Internal`PartitionRagged[Range[t (t + 1)/2], Range@t]; // Timing

But it’s clear that the last one is the best one, at least in terms of readability.

Similar cases exist like Internal`ToPackedArray or Internal`AddHandler(which I still don’t know how to use, though I’m sure that it’s useful in advanced interface control).

I’ve discussed with many other users about this problem, but most of them said these knowledges could only be gotten via viewing formidable amount of Q&As.

Can anyone here list some explanation and examples of frequently used Internal` (or other packages) functions or give some websites including these information?

It would be really helpful on my way to a higher level of Mathematica programming!

$\endgroup$

marked as duplicate by MarcoB, user9660, ilian, Community Jun 5 '16 at 23:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Wouldn't this be a dupe? $\endgroup$ – J. M. is away Jun 5 '16 at 13:56
  • $\begingroup$ Ummm. Seemingly there's some points in common, but surely that post is in need of further update. For example, Internal`AddHandler is not documented in that post while yesterday I just saw one using this function to do amazing stuffs(I suppose capturing frontend error reports?)~ $\endgroup$ – Wjx Jun 5 '16 at 14:51
  • $\begingroup$ Also, PackedArray series is not included while this is extremely helpful in speeding up calculations. I, unfortunately, still cannot manage all its use...... $\endgroup$ – Wjx Jun 5 '16 at 14:52