Minsky: 3.17.0
|
Dynamic flow systems program to simulate economic flows (ie. complex system dynamics). For a full overview, please see the Manual
Minsky is an open source program with prebuilt binaries available for:
A little known secret is that Minsky can be used in a headless batch mode, a capability it has had from the beginning in the form of TCL scripting. Since March 2024, Python scripting has been available in Linux builds, and is now available in Windows and Mac builds (from version 3.12). TCL scripting is deprecated and will soon be removed from the codebase.
Introduction to scripting Minsky in Python
Official releases are available from SourceForge. You may also obtain later releases from this Github project, as releases are tagged within git.
To compile Minsky, you will need a suitable posix compliant system, with a number of prerequisites installed.
Type make -j4
in the top level directory of the repository.
Minsky can be run directly by running gui-js/dist/executables/linux-unpacked/minsky
.
You can also run it by running npm start
from the gui-js directory. At the time of writing, npm start will not work on certain Linux systems. I suspect it has to do with poor IPv6 support in electron, but the cause is as yet unknown.
Notes on using the REST Service.
console.log
works on minsky-electron codeelectronService.log
, which takes a single string argument. Best trick is to use typescript template literal types, which allows embedding variable values simply within a string, eg green(
*some string*)
or red(
*some string*)
to colorise log output to make it easier to spot your messages. With console.log, you only need to colourise the first argument.OPEN_DEV_TOOLS_IN_DEV_BUILD = true
in libs/shared/src/lib/constants/constants.ts
. This can be very useful in tracking down runtime errors, even syntax errors, as the renderer process fails silently.ELECTRON_IS_DEV=1
For those using emacs (comme moi-meme), I have configured the project so that typing tsc on the gui-js directory runs the typescript compiler. A convenience Makefile is in that directory, allowing the default "make -k" command to work.
M-x package-install
did not work for me, I had to download the tarfiles directly from Melpa, and run M-x package-install-file
to install the packages manually.npm start
session by using ps -ef|grep main.js
to find the minsky process, then use the pid to attach to in gdb.make
in the top level directory, or npm run export:package:linux
in gui-js
and open it with gdb gui-js/dist/executables/linux-unpacked/minsky
.jest.config.js
(eg gui-js/libs/shared), then run (eg) Unfortunately gperftools do not work with the JS frontend. Indeed, most of the time minsky will crash under profiling. For now, profiling requires the use of a python batch script (see above).
However, if you build the C++ source (actually only addon.cc necessary) with the TIMERS=1 make flag, this enables profiling of the backend commands, which is printed as a summary table on application exit.