Git Product home page Git Product logo

t3chnique's Introduction

t3chnique

What is this?

T3chnique is an experimental, work-in-progress, attempt to implement a TADS3 virtual machine in clojure. Right now this is just an occasional, spare time, iterative sketching out of an implementation.

As yet this lacks a coherent approach to several major aspects of the VM (notably: metaclass inheritance, unified exception / error handling, recursive calls into the VM, implementation sharing between constant strings and lists and their dynamic counterparts). In some cases this is following the OO reference implementation way too closely to be idiomatic Clojure. In particular, the metaclass approach will need a shake up once I fully understand what TADS3 is trying to achieve with some of it.

t3chnique uses a broadly monadic approach to the virtual machine state, though parking / yield semantics in intrinsic functions is likely to be handled via core.async rather than the continuation monad.

If it were ever finished, it would doubtless perform extremely poorly.

And it’s unlikely to ever be finished; the TADS3 virtual machine is a monster. Not so much in the VM itself but in the bundled platform - it has its own regex engine, random number generators, data structures and so on. All of these are significant obstacles to alternative implementations. This implementation is primarily for my own interest and investigation.

This source tree contains items for testing purposes which are copyright Michael J Roberts and Eric Eve. (Anything .t3)

Github projects for reference:

  • QTads contains most of the C++ reference implementation (apart from tests) and is useful for reference.
  • ZMPP2 contains another unfinished TADS3 implementation (in Scala).

Organisation

  • primitives.clj and monad.clj provide the lowest level utilities
  • parse.clj is building blocks for parsing image files and byte-code instructions
  • metaclass.clj and bif.clj provide some wiring and protocols to make metaclasses and intrinsic function sets available to the VM
  • vm.clj contains the representation of VM state and the primary means of manipulating it (i.e. computing new states - as this is pure functional)
  • implementations of metaclasses and intrinsic function sets (of which there is basically nothing at the moment) are under metaclass and instrinsic respectively
  • all.clj, loads all of the intrinsics and metaclasses up.
  • a rough REST interface (server.clj) and CLI tooling (main.clj)

There’s a very crude and buggy visualisation of the VM available using pages served up by server.clj and the vm.js javascript functionality. This allows stepping instruction by instruction through the VM.) I have a better (ClojureScript) WebSockets-based UI in progress in a separate project…

Links / References

Licence

Copyright © 2014 Greg Hawkins

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

t3chnique's People

Contributors

gmorpheme avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.