Code Monkey home page Code Monkey logo

box's People

Contributors

dependabot[bot] avatar intsuc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

box's Issues

String interpolation

  • let name = 0; "Hello, #{name}!"
  • const-only until string concatenation is added

Tokenize pass

Implement a Tokenize pass before the Parse pass.
Tokenize does not know mixfix operators and only generates a list of atom terms.

Collection types

                    ⊢ code i8_array  <: collection i8
                    ⊢ code i32_array <: collection i32
                    ⊢ code i64_array <: collection i64
τ : tag, α : type τ ⊢ code (vec α)   <: collection α
const def f(xs : collection i32) : collection α := xs

test def g :=
  let _ := $f(`[1, 2, 3]);
  let _ := $f(`[i32; 1, 2, 3]);
  true;

Optimize numeric array initializer

Input

function f () → [int;] = [int; 1, 2, 3]

Expected output

data modify storage mcx: int_array append value [I;1,2,3]

Actual output

data modify storage mcx: int_array append value [I;0,0,0]
data modify storage mcx: int append value 1
data modify storage mcx: int_array[-1][0] set from storage mcx: int[-1]
data remove storage mcx: int[-1]
data modify storage mcx: int append value 2
data modify storage mcx: int_array[-1][1] set from storage mcx: int[-1]
data remove storage mcx: int[-1]
data modify storage mcx: int append value 3
data modify storage mcx: int_array[-1][2] set from storage mcx: int[-1]
data remove storage mcx: int[-1]

Surface meta

  • For partial type synthesis
  • Not to leak meta from signatures

Borrowing / pass by NBT path

  • Pass by NBT path, without copying
  • How to prevent infinite code duplication?
    • Conservative solution: only for non-recursive defs

`installations play` command

  • The installations play command launches the Minecraft server with a specific version
  • Minecraft servers and their libraries are cached and shared

Type classes

  • Implemented by either of
    • Builtin support for type class / static dispatch
    • Compile-time type dispatch
      • Problem with extensibility?
  • Not type classes as first-class objects
    • Type classes as second-class objects?
  • No confluence (global uniqueness of instances)

Examples

# class definition
class add⟨a⟩ {
  function +(a₁: a, a₂: a) → a;
};

# instance definition
instance add_int = add⟨int⟩ {
  function +(a₁: int, a₂: int) → int {
    # ...
  };
};

# class use
function sum⟨a: add⟩(as: [a]) → a {
  # ...
};

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.