Code Monkey home page Code Monkey logo

testlanguagedesing's Introduction

TestLanguageDesing

This is berfore early prototyping. Better Move on ;) Scripting languge

Usecase:

  • old SNES jrpg like games with primitvs for drawing tilemaps text and sprites
  • hard to use incorrectly
  • target includes yung people without prior programming experience.

Features:

  • Stack based Byte code interpreter
  • Static typed language with union and intersection types
  • Non nullable references (unless type explicit includes null)
  • Objects should not be usable between threads without explicit opt in - can every type cratede as a shared objec? (I think no?) - Every Property of a shared object is automaticly implemented with an async read/write lock - what about methods? - can parameter be non shareable objects? (When? Always?) - ...
  • Async await support
  • No garbage collector, explicity new and delete - Metadata of an reference nows if the type was delted, should be impossible to access reused memory over an stale reference - Owner of Pointer is explicity set and can be transfererd. - Static analyzis should be able to detect if a reference that owns a pointer leaves the scope without being deleted

How to

find out if an object was deleted

The Memory of the Program is devided in 4 parts Stack, Heap, Instructions, Lookup.

References to Objects do not point directly in the Heap but in the Lookup, an an entry in the Lookup has a pointer to the heap. Besides a pointer in the lookup, a reference has also an id. If a new Object is alocated a new Metadata object is alocated in the Lookup and enough memory is alocated on the heap. The Metadata sets values like Type etc and sets the id to 1. The Reference also sets the ID to 1. If an object gets deleted the Id in the Metadata is negated. 1 will be -1. When accessing a reference the ID of the reference and the ID of the Metadata can be compared, only if both values are identicle the object is still valid.

Instead of allocating a new metadatadata object an already freed object can be reused by negating the negative id again and increasing it. -1 will be 2. Since all Metadataobjects have the same size independent of the objects referenced there should e no fragmentation in the lookup memory.

Every Object has some Metadata like type size etc.

testlanguagedesing's People

Contributors

lokimidgard avatar

Watchers

Tobias Krumholz avatar  avatar James Cloos 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.