Skip to content
프로젝트

소개

An LLM-powered programming-by-example programming language.

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Mirror: An LLM-powered programming-by-example programming language.

For more details, see the blog post.

mirrorplayground

In the Mirror programming language, you define functions by providing sets of input-outputs pairs and you can call those functions. That is it. The entire program behavior must be specified through those examples.

signature is_even(x: number) -> bool
example is_even(0) -> true
example is_even(1) -> false
example is_even(222) -> true
example is_even(-99) -> false

is_even(12345)

Using the Mirror syntax, you give the function name, parameters and their types, and the return type as well as one or more examples with the expected result. It uses a strict syntax and supports a handful of types (including lists). You can create multiple functions and chain them.

After parsing, the "compiler" uses an LLM to generate JavaScript that satisfies the constraints expressed by the examples. You should review the generated code to verify it is correct, or provide more examples and recompile it. When you run it, the last value will be printed.

An example of chaining functions:

signature foo(x: number, y: number) -> number
example foo(10, 3) = 101010
example foo(1, 1) = 1
example foo(0, 10) = 0

signature bar(x: number) -> string
example bar(9) = "length is 1"
example bar(3210) = "length is 4"

bar(foo(123, 3))

Example of list and of a dictionary:

signature foo(x: list[number]) -> number
example foo([2,9,5]) = 9
foo([6,3])

signature bar(a: string) -> dict[string, number]
example bar("food") = {"f": 1, "o": 2, "d": 1}
bar("tree")
bar("anakin")

관련 프로젝트 살펴보기

불러오는 중…