Extending/Modifying KnotTheory`

From Knot Atlas
Revision as of 09:08, 28 August 2007 by 221.2.229.139 (talk)
Jump to navigationJump to search

traduzione last thing on my mind salento in bus gioghi dei pokemon film gratis animal sexi outcast north solomons bluetooth trust peter pan lucca gemelli diversi i testi xiang jiang palmari bluetooh nec 400 i pelados carotenuto impero del sole saalian gatti persiani rossignol sultan conca del fucino venditore i want you bad paole parole clonoa agriturismo napoli lg monitor 1715s lampeggiatore sb 800 midi eamon fotocamera accessori cavo audio video palio di orte henstridge lg trial mapsource points of interest clark ken chalet in sud italia abbigliamento in palestra metal slug2 sunrise simply red hp intel centrino xbox live parte piano in giappone modem adsl d-link dsl-200 a3 stampante canon www com sennheiser mx550 grognardo amd sempron 2500 pamela desnuda lunove price paulownia cortez vs x ray frameless mp3 decoder siamo soli vasco rossi www motor show com roman srl citta brugherio milano tiziana sensi hotel grosseto portatile ddr2 controllo statistico dei processi that i would be good opel astra anno 2005 cdti km o monitor lg 1730s router wireless robotics traduzione this love maroon5 u n i c e f unision com ginnastica artistica global express canon ef s 10-22mm guggle filmes jalisco midi splendida dolby d frutti di bosco foto attore una notte a pietroburgo sony lettore dvd divx portatile www magia it usb e-zi waitec jvc gr d290 e ordine architetti vicenza www sumai it logo immagini terratec cameo convert 800 havana kenny g massillon azardo catene da neve p800 sony ericsson telefonia pio leyva agriturismo faenza chat singoli svastica sul sole singer cucire usb sharp gx30 redcliffe ruslana wilde dance duca enrico samsung 800k ccd american graffiti 2 scrip wind www dragonball inno x flottiglia mas nerva case vacanze affitto piemonte hot shots golf 2 moderato in re minore napoli miami batteria per mpx200 la prateria senza legge boblbobl tenda 4 posti linea 77 feat subsonica diabolus in musica i don t want to miss a think righeira karaoke yakumo delta 300 tappeti e moquettes mini hi-fi hf-355 hangoor nomadi la settima onda cartoni animati v620 motorola il fanciullo anno uno test canzoni aemon addio al passato weather koh samui de longhi caffe agenzia matrimoniale ancona bridget jones 2 quando le donne si chiamavano madonne frigo freezer figa it comune di fara gera d adda got you alicia keys nikon d50 argento screamer 2 aiutanti di babbo natale forni classe efficenza a software creazione stereogramma jonn lennon britney spears chaotic chacalon jr danza immagini fujifilm - xd picture card 1 gb gatta (nautica) centri per l impiego napoli temperatura modding in alto mare di 2black casio exilim ex p600 gradasso smallville kristin kreuk nuda digitale stampante kloj formentera villaggi gerico 2004 midi scugnizzi arc 6700 u2 staring at the sun dediche laurea samsung rt guerra tra robot diamond maxtor skystar codici dicembre creative wired remote accessori audio martignano video toxic gucci parfum nain lesbo toscana kia cerato gianni tatoo livorno mini jeux nike total vt porta napoli vaio vgn fs italiano per gli stranieri angelo hlx com la cantante dei black eyes peas decoder dvd lettori e divx carlo poma modern times j five www yah00 it motoguzzi breva 1100 alta moda catania video soldato tatuaggi libellule videosdesexogratis la gazzetta annuncio con cellulare hip hop mix la legione dei dannati marce per banda da scaricare gratis reader writer card archiviosex lei 22 anni ettore scola loading lo sbaglio di essere vivo dj fish ford fiesta newport 1.3 fiore domicilio cam girls polmone del suino cinelli amd athlon 64 desktop computer hotel loira francia taiyo yuden cuffie senza filo sony www articolo 31 it nec lampada hp 5 pixel djm 600 daiji maria teresa ruta nuda volo rozzano henryson o henderson, robert il sito ufficiale di pro evolution soccer bcs 333 dobson, rosemary gerocarne er califfo panasonic lumix 30 felisia discoteca mesa que mas apla porsche 911 coupe la ultima cena rappresentanti per estero sabrina 19 caldaie ricambi napoli ball revamped 2 profumi baldessarini spy killer foto naziskin beep batteria per nokia 8810 volatili affittacamere ebbrezza bianca recupero dati the lion sleep s tonight tesine esame terza media kenwood w6531 tracce esami di stato timok iposte hotel 3 stelle lisbona giochi dei cartoni animati fiat barchetta 1 8 navigatore gps bluetooth canon batteria sigillo convertibili champagne in paradiso movimento cantautori stafania orlando d m n 142 brother inkjet multifunzione con fax albergo 3 stella chicago tatoo bracciali tribali pissing singole guardie giurate link porno cuckold lo spavaldo midnight hour pickett luciano ferro perdona dvd ally mc beal james legros foto pornor inno sovietico sorpassometro foto lilla for men tesi pubblicata rotliegendes ups apc smart 750 pny geforce 7800gtx 256 mb pci express memoria ram toshiba satellite 5100 cappello con visiera severina video www atene it buffer figli di pitagora dimagranti integratori blazer 4.3 grimaldi spa di navigazione scuola per estetista albergo bolzano situazione disperata, ma non seria designjet 30 www samsung hi fi com stampanti lbp matera mp3 free shrek savage 25 incluso desktop computer www relatieplanet nl www porno foto video yugoslavia it alessandro sposa rossane ricevitore gps blutooth benni satisfaction televisore lcd 20 monitor crt lg 19 la ballata dei fantasmi genova - roma gutter brothers operation - hit squad rockstar game denver cose fare daewoo nexia aika. disco 1 eleciones 2 usa fiat usata torino video 666 com trattori vega bci 3000 x press attentato ai tre grandi enterite bandiera gran bretagna lingo squad telefonini lg edge sonia morales ratzel, friedrich croste honda civic 1.4i 16v 5p. s superfighetto it lingeries globalsat gsm allevatori como portatile amd l oceano del silenzio baciata multipla jtd km 0 dynamic sony mpk modellino della uno turbo concessionarie per la campagnia la maledizione della prima luna il disco vincitore amico evangelion the end pig word behringer xm8500 apple 23 ieee 1394 dv foto giornaliste sexy nuova alfa romeo 147 gta video petra nemcova profeti www ceteco it giacomo leopardi foto philips 109b50 fiera del cioccolato in perugia canzone anni 70 conqueror 1086 a.d. workcentre pe120i mtaa 4513 v stampante laser colori cx11n this is love marron 5 lettore memory stick pro tacchi sexi il segreto di cristoforo colombo tamenghest hp psc2410 clarima banca v data 512 emmanuil, cesare lavasciuga whirpool canon np-e3 saeva crazy tattoo lunapop latinlover vgn s4hp b the buggles volkswagen lupo 1.7 verifiche impianti termici bari jbl e20be nikon s4 fotos de velludos nizza shopping kensington contour notebook backpack enenma sesso animale it enricke zafira km zero televisore 18 max de angelis l evaso come dove quando farmacia florio condilomi vaginali luca barbareschi hungry space max trio cordless il demone del gioco io troia chatta con me e daniela beau bridges stranezze di nuoro generatore di ricariche false dfi la lanparty ut nf4 ultra-d articolo casa folletti e fate il gamecube sale sul ring

Anybody is welcome, indeed encouraged, to fix, modify or extend the package KnotTheory` to the benefit of everybody else. This note explains how this can be done and outlines some of the conventions used within KnotTheory`.

Seeing the sources

The source files for KnotTheory` are kept in a Subversion repository whose overall directory structure is as follows:

http://katlas.math.toronto.edu/svn/KnotTheory/...

  • trunk/... contains the current "working" version of the package.
    • KnotTheory/... is an unpacked version of the whole package, as seen by users.
    • src/... contains the individual mathematica "modules" that are glued together to make KnotTheory/init.m, the main executable of KnotTheory`.
  • branches/... contains development versions of certain new features that are not yet included in the package.
  • tags/...
    • stable/... contains the last "stable" version of the package. It is a snapshot of the trunk/ directory, at some previous moment in time. "Stable" doesn't necessarily mean any great degree of testing has gone on; it just means that the most recently introduced bugs in the trunk haven't been included. The downloadable package is generated from this directory.

Writing Your Extension

Submitting Your Extension

KnotTheory` is a computer program written in an unrestricted language. Meaning that a vicious programmer could use it to do harmful things to the computer running it. Therefore unlike much of the rest of the Knot Atlas, it can be modified directly only by the administrators of this site. If you aren't one, email your extension/modification to Dror. Dror will read through it quickly to confirm that it's not malicious and doesn't do anything obviously wrong and post it in the Setup section of this manual. Thanks!

Lessons learnt from integrating LinKnot`

In February 2006, Radmila, Dror and Scott spent a few days making LinKnot` and KnotTheory` play nicely together. In the end, we had at least partially achieved two of our goals:

  1. Allowing the concurrent usage of KnotTheory` with LinKnot`, so that users of LinKnot` can access the databases and algorithms available in KnotTheory`, while maintaining familiar notations and function names.
  2. Making the functionality of LinKnot` transparently available to users of KnotTheory` (with function names and data conventions consistent with KnotTheory`).

These two goals seem to be a reasonable model for integrating a pair of complementary Mathematica packages; former users of each expect not much to change, but simply to have extra functionality. It's also a reasonable 'minimal' model, in that only 'compatibility layers' are written, leaving the original packages (mostly) unchanged.

Loading side by side

Our first goal was simply to be able to load KnotTheory` and LinKnot` side by side. Initially, we were prevented by two different problems. Firstly, each package unintentionally introduced symbols into the Global` Mathematica context. Secondly, each package expected that the current working directory always be the home of the package; expectations unsatisfiable simultaneously!

Global` symbols

Fixing leakages from KnotTheory` wasn't too hard; just load KnotTheory` in a fresh Mathematica session, then issue the command Names["Global`*"]. There shouldn't be much there, and it's mostly a matter of tracking down where the stray symbols have been introduced. If you don't understand Mathematica's (utterly ugly) system of contexts, you'll start to get the hang of it while doing this!

Leakages from LinKnot` were much more serious, as several subpackages were loaded directly into the Global` context (the authors of K2K didn't follow the usual Mathematica package conventions).

At this point we discovered the first of several painful problems associated with symbols in contexts which aren't currently on the context path, namely that conversions to and from strings (with ToString and ToExpression) are very dangerous. These happen 'at runtime', so the context path could be quite arbitrary (that is, having been modified by other packages or users since the package was loaded), rather than at the moment the package is loaded. It is often necessary to wrap calls to ToExpression with code which temporarily resets the context path. Seaching for ToExpression in the LinKnot sources should find examples of this.

Current working directory

Unfortunately many parts of the K2K package rely on the current working directory being the LinKnot` installation directory. This causes all sorts of problems; users should be able to change the current working directory arbitrarily. Even worse, there are still some bugs in KnotTheory` where certain things don't work if the current working directory isn't set to the KnotTheory` installation directory!

We used two techniques to get around this. First, the KTtoLinKnot subpackage tries to work out the LinKnot` installation directory, using the mnemonic

LinKnotDirectory[]=
        DirectoryName[
          File/.Flatten[
              FileInformation[ToFileName[#,"LinKnots.m"]]