Evaluate a lab-dialect script against a workspace (X1)
curl --request POST \
--url https://api.eddy.engineer/v1/script.eval \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"script": "<string>",
"workspace_in": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/script.eval"
payload = {
"script": "<string>",
"workspace_in": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({script: '<string>', workspace_in: '<string>'})
};
fetch('https://api.eddy.engineer/v1/script.eval', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/script.eval",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'script' => '<string>',
'workspace_in' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/script.eval"
payload := strings.NewReader("{\n \"script\": \"<string>\",\n \"workspace_in\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/script.eval")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"script\": \"<string>\",\n \"workspace_in\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/script.eval")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"script\": \"<string>\",\n \"workspace_in\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"figures": [
"<string>"
],
"lab_version": "<string>",
"refusal": {
"col": 123,
"kind": "<string>",
"line": 123,
"message": "<string>"
},
"script_key": "<string>",
"transcript": "<string>",
"transcript_key": "<string>",
"vars": [
{
"class": "<string>",
"cols": 123,
"name": "<string>",
"rows": 123
}
],
"workspace_out": "<string>"
}Math
Evaluate a lab-dialect script against a workspace (X1)
The X-track numeric computing workbench (matlab-track.md): evaluates a script written in the lab dialect - a stated subset of the MATLAB language (real 2-D double matrices, logical, char rows; MATLAB indexing incl. end/logical/linear, growth and deletion; implicit expansion; control flow incl. switch; local functions; the X2 builtin registry with own deterministic linear algebra). Evaluation is a PURE FUNCTION of (script bytes, workspace-in document): workspace-out key, transcript bytes (versioned display dialect lab-v1), and refusal are byte-identical across engine instances. No wall clock (time builtins refuse typed); no ambient RNG (rand before rng(seed) refuses; the seeded mt19937ar state rides the workspace document, so chained evaluations continue the stream). A script error is NOT an HTTP error: MATLAB semantics are stop-at-first-error with prior workspace effects retained, so the response carries the partial workspace and a typed refusal {kind: syntax|undefined|unimplemented|out_of_envelope|boundary|error|numeric|resource_limit, line, col, message}. Workspace documents live in the blob store by content address (fetch via GET /v1/blobs/{key}); transcripts register as artifacts (kind lab_transcript). GNU Octave referees the dialect (X3, env-gated SS_OCTAVE_WSL); oracle output never becomes result bytes.
POST
/
v1
/
script.eval
Evaluate a lab-dialect script against a workspace (X1)
curl --request POST \
--url https://api.eddy.engineer/v1/script.eval \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"script": "<string>",
"workspace_in": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/script.eval"
payload = {
"script": "<string>",
"workspace_in": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({script: '<string>', workspace_in: '<string>'})
};
fetch('https://api.eddy.engineer/v1/script.eval', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/script.eval",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'script' => '<string>',
'workspace_in' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/script.eval"
payload := strings.NewReader("{\n \"script\": \"<string>\",\n \"workspace_in\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/script.eval")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"script\": \"<string>\",\n \"workspace_in\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/script.eval")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"script\": \"<string>\",\n \"workspace_in\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"figures": [
"<string>"
],
"lab_version": "<string>",
"refusal": {
"col": 123,
"kind": "<string>",
"line": 123,
"message": "<string>"
},
"script_key": "<string>",
"transcript": "<string>",
"transcript_key": "<string>",
"vars": [
{
"class": "<string>",
"cols": 123,
"name": "<string>",
"rows": 123
}
],
"workspace_out": "<string>"
}Body
application/json
Response
Evaluated (possibly with a typed script refusal - see the refusal field)