This is a set of how-to notes for using the new [tclquadcode]. Your mileage may (WILL!) vary depending on which platform you are setting up, but this shows some of the pitfalls and workarounds you may run into. '''Setup for Ubuntu 16.04''' These are the steps to install and test the new quadcode on a fresh installation of [Ubuntu] 16.04 * Install the X11 dev libraries to compile Tk. * The X includes may not be installed by default on your system. sudo apt-get install libx11-dev * Update the system. sudo apt-get update sudo apt-get upgrade * Install the [LLVM] requirements: definitely `clang`, maybe `lldb`. apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 m$ apt-get update apt-get install -y clang-5.0 apt-get install -y lldb-5.0 * Download the master branch archive for [llvmtcl]. wget https://github.com/dkfellows/llvmtcl/archive/master.tar.gz -O ~/Downloads/llvmtcl-master.tar.gz * Create and `cd` to your base development directory for tclquadcode — you'll end up with tcl, tk, quadcode, and llvmtcl-master in this directory. cd ~/your-dir tar xvf ~/Downloads/llvmtcl-master.tar.gz * Download the Tcllib v1.18 archive from * https://core.tcl.tk/tcllib/login?g=/tcllib/tarball/tcllib-1.18.tar.gz&anon&uuid$ * Put it somewhere safe. cd ~/Downloads # For example. tar xvf tcllib-1.18.tar.gz cd tcllib-1.18 ./configure make sudo make install * Download the Fossil SCM binary from * https://www.fossil-scm.org/download.html * Copy it to somewhere in your [PATH]. * Download the tcl, tk, and quadcode Fossil repositories. cd ~/your-dir fossil clone http://core.tcl.tk/tcl tcl.fos fossil clone http://core.tcl.tk/tk tk.fos fossil clone http://core.tcl.tk/tclquadcode quadcode.fos * Build and install tcl, tk, and llvmtcl. mkdir tcl tk cd tcl * Do not take the tip - It may have issues. fossil open ../tcl.fos core-8-6-8 cd unix ./configure; make sudo make install cd ../../tk fossil open ../tk.fos core-8-6-8 cd unix ./configure; make sudo make install cd ../../llvmtcl-master ./configure * This fails because there is no `llvm_config` command. * That's because the llvm 5.0 package calls it `llvm-config-5.0`. cd /usr/bin sudo ln -s llvm-config-5.0 llvm-config cd - ./configure make sudo make install * Note: if you get errors like below, you are using a 9.x version of Tcl that as of Jan 2018 is not supported. version conflict for package "Tcl": have 9.0a0, need 8.5 while executing "package require Tcl 8.5" Or: version conflict for package "Tcl": have 9.0a0, need 8.2 while executing "package require Tcl 8.2" (file "./installer.tcl" line 10) * Make a directory for quadcode. I'm using a date-stamped directory to keep the evolutionary steps separate. mkdir quad-201801 cd quad-201801/ fossil open ../quadcode.fos tclsh8.6 demos/smalltest.tcl * This should "just work", and you'll see about a factor of 10 improvement in run time. [DKF]: I recommend only using my releases of llvmtcl (unless you want to help develop it; it really needs attention on Windows as I don't have a development toolchain on that platform at all), the latest of which is at https://github.com/dkfellows/llvmtcl/releases The `configure` for llvmtcl takes the option `--with-llvm-config=$LLVM_CONFIG_PROGRAM` which lets you override the default (which is `llvm-config` but you probably have a different name). I always have to use that on my system as I need to select the right version of LLVM. Also, right now we _only_ support the latest release of Tcl 8.6 (or maybe one or two patchlevels before). Select your compiler (if necessary; it is for me) by setting the `CC` environment variable. <>tclquadcode