Executing code in v.5.2 kernel from within v.7.01 session through MathLink

Here is an implementation based on Simon’s code. It still requires improvement. The one unclear thing to me is how to handle Messages generated in the slave (v.5.2) kernel. Here is my code: Clear[linkEvaluate] SetAttributes[linkEvaluate, HoldRest] linkEvaluate[link_LinkObject, expr_] := Catch[ Module[{out = {}, postScript = {}, packet, outputs = {}}, While[LinkReadyQhttps://stackoverflow.com/questions/4983301/executing-code-in-v-5-2-kernel-from-within-v-7-01-session-through-mathlink, Print[“From the buffer:\t”, LinkReadhttps://stackoverflow.com/questions/4983301/executing-code-in-v-5-2-kernel-from-within-v-7-01-session-through-mathlink]]; … Read more

Import big files/arrays with mathematica

For some reason, the current implementation of Import for the type Table (tabular data) is quite memory – inefficient. Below I’ve made an attempt to remedy this situation somewhat, while still reusing Mathematica’s high-level importing capabilities (through ImportString). For sparse tables, a separate solution is presented, which can lead to very significant memory savings. General … Read more

Preventing avalanche of runtime errors in Mathematica

As others have pointed out, there are three ways to deal with errors in a consistent manner: correctly typing parameters and setting up conditions under which your functions will run, dealing correctly and consistently with errors generated, and simplifying your methodology to apply these steps. As Samsdram pointed out, correctly typing your functions will help … Read more