Skip to content
WinstonMDP edited this page Feb 16, 2024 · 10 revisions

Welcome to the scicomp-lang wiki!

Syntax sketches

To be implemented now

# This is a comment

# This is a function
id (x : Int) : Int := x  # Int is a built-in integral type of arbitrary precision
# This function does the same
id' (x : Int) := x
# And this, too
id'' x : Int := x

# A -> B is a type of functions from A to B
dup (x : Int) (f : Int -> Int) := f (f x)
# Lambdas are written as `| arg => expr` (subject to discussion)
dup' (f : Int -> Int) : Int -> Int := | x => f (f x)

main : Int = dup -1 | x => x * 2

In the future

  • Import syntax (and import architecture)
  • Typed holes
  • Hole autofill
  • Implicit arguments
  • Custom binary operators
  • Macros / tactics

IR sketches

To be implemented now

A-normal form with the following extensions:

EXP ::= VAL | let VAR : TYPE = RHS in EXP
RHS ::= VAL | VAL VAL | VAL + VAL | VAL * VAL
VAL ::= VAR | lam VAR. EXP
TYPE ::= Int | TYPE -> TYPE

In the future

Comparisons & inspirations

Wolfram, MATLAB and other CAS

Why should anyone prefer our language over existing computer algebra systems? Why shouldn't? What did we take from them?

Python, R

Why should anyone prefer our language over existing languages for statistical computing? Why shouldn't? What did we take from them?

Julia

Why should anyone prefer our language over Julia? Why shouldn't? What did we take from it?

APL, J and other array languages

Why should anyone prefer our language over existing array languages? Why shouldn't? What did we take from them?

FORTRAN, Futhark

Why should anyone prefer our language over FORTRAN and Futhark? Why shouldn't? What did we take from them?

C++, Rust

Why should anyone prefer our language over C++ and Rust? Why shouldn't? What did we take from them?

Idris, Haskell

Why should anyone prefer our language over other general-purpose languages with dependent types? Why shouldn't? What did we take from them?

Lean, Arend, Agda

Why should anyone prefer our language over other theorem provers? Why shouldn't? What did we take from them?

crack.build

Хранит [[BuildUnit]] в обратной топологической сортировке в формате json. Внутренний массив представляет собой компоненту сильной связности зависимостей.

struct BuildUnit {
    dir: OsString, // папка зависимости в папке project_root/deps
    name_map: BTreeMap<String, OsString>, // module name -> dir name in project_root/deps
}