Repository navigation
Bend 2.0.37 - #1539
Merged
Merged
Bend 2.0.37#1539
Conversation
…ds a program quietly, F32.show takes a plain parameter, bend-lint, idle CPU threads take a slow grow's forks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nicolas-abril). Breaking for JS callers: an effect's
.jsand acaller of an exported def pass and get
5, not5n. ANatanswer orargument that isn't a whole number from 0 to 2^53 stops the run with the
Nat error, as in C. Calls into exported defs are about 3.5x faster.
IO.exit(code)ends a program quietly with a status from 0 to 255(
maincannot set an exit status without writing to stderr, andIO.diecodes above 255 wrap (256 exits 0) #1465, PR fix(io): add quiet exit and reject out-of-range status codes #1492 by oxura). A code above 255, inIO.exitorIO.die,exits 1 instead of wrapping.
F32.showtakes a plain parameter, so~F32.showfitsList.showand
Maybe.show(F32.showtakes+a, so~F32.showcannot be passed toList.showorMaybe.show, unlike every other Base show #1511, PR fix(base): use a plain parameter for F32.show #1518 by vicmcorrea). A caller passing it as+now wraps it:(x => F32.show(x)).tools/bend-lint(PR adds bend-lint tool #1389 by MattCozendey).runs 2.6x faster at 14 threads (On the CPU, a call before each fork keeps a fork tree on a few threads: 256 leaves get 3.5x from 16 threads instead of 14x #1475, PR fix(cpu): deal a slow grow's forks to idle threads (#1475) #1479 by viridale).
--verdictparses twice asfast in a quarter of the memory (PR BendTT's parser reads the text's UTF-8 bytes at a position, not a List Char, so it parses twice as fast in a quarter of the memory #1380 by nicolas-abril); safe.ts
walks each term once (PR safe.ts walks each term once for its uses and skips the out-of-scope pass when nothing is out of scope #1384 by nicolas-abril).
ty_holds walks a type family's body, so a bang over a pair no longer puts every closure on the device #1336 by chaserelock); a spin is a device call by its C's length in
characters, and always inline on the host (PR A spin is a call on the device when its C is long, by characters not lines, and inline on the host #1413 by nicolas-abril).
by Iann29).
On Linux a window paces at the display's refresh rate, not 60 Hz, as the Mac's display sync does #1379 by igorhasse).
bend updatefails when the installer download fails (bend update returns exit 0 when the installer download fails (v2.0.36) #1481, PR fix(cli): fail updates when installer download fails #1485by vicmcorrea).
--checkupreads only the import header, and imports with a trailing# comment(CLI: --checkup treats import-looking text in a valid multiline string as another module #1501, CLI: --checkup exits green without checking imports that have trailing comments #1497, PRs fix(cli): checkup reads only the import header #1502 by oxura and fix(cli): --checkup reads imports with a trailing # comment #1517).bend a.bend --verdict b.bendis refused: extra arguments go only to aplain run (CLI: --verdict silently ignores extra program/file arguments #1503, PR fix(cli): extra arguments only for a plain run #1516).
their diagnostic positions (PR fix(cli): preserve inline script diagnostic positions #1454 by Osraka), and a bundler failure
is a formatted error (bend <page>.html -o <dir> prints Bun's raw unhandled-error banner (missing page, or -o pointing at an existing file) #1399, PR fix(cli): format page bundler failures #1406 by oxura).
HamedShams); a native build that fails before clang removes its
/tmp/bend-*dir (bend f.bend -o <binary> leaks one empty /tmp/bend-XXXXXX directory per failed emission (missing foreign import, or no main to run) #1402, PR fix(cli): a native build that fails before clang removes its /tmp/bend-* dir (#1402) #1405 by Yi-111-a).!build finds CUDA at$CUDA_PATHand/opt/cuda(PR A!build finds CUDA at $CUDA_PATH and /opt/cuda too, so Arch's CUDA is no longer skipped #1373 byigorhasse).
stops on a dead device instead of spinning (PR fix(audio): keep Linux partial writes and stop on a dead device #1508 by
sebastian-griego).
F32.hypotkeeps lengths past 1.8e19 and below 1e-19 (PR fix(base): retain representable F32.hypot lengths #1515 bysebastian-griego).
bend: a short write on a standard streamand exits 1 #1467, PRA closed stdout or stderr reader ends a program by SIGPIPE, not with an error (#1467) #1470 by viridale);
Process.runreads until stdout and stderr close(Process.run JS lane times out after the direct child exits with inherited pipes #1343, PR Process.run reads until stdout and stderr close, as Node's and Bun 1.4's spawnSync do #1392 by nicolas-abril);
get_envrejects a name with a NUL(IO.get_env on Node truncates names at embedded NUL #1449, PR fix(io): get_env rejects a name with an embedded NUL #1450 by Yi-111-a).
nuxyel); the effect table is sized to the program's constructor ids
(Every compiled IO program carries ~1 MiB of zeros: io_eff_rows is baked into .data.rel.ro by clang #1163, PR fix(runtime): size effect table to program constructor IDs #1378 by vicmcorrea); arrays of concrete functions compile
(An Array of a concrete function type (Array<(U32 -> U32)>) checks and runs on the interpreter but stops both emitters with "an open Array element type" (follow-on to #1130) #1404, PR fix(compiler): support concrete function array elements #1410 by oxura);
lay_eltakes only datatypes and typeformers (PR fix(compiler): lay_el accepts datatypes and type formers only #1426 by nicolas-abril); a
__proto__export survives inJS (PR fix(compiler): preserve __proto__ JS module exports #1458 by vicmcorrea).
-o/--verdictleave out a def that copies a hypothesis of computed type after a match refined it ("a λ that uses a variable twice") (2.0.35) #1349, PR Preserve match-refined Data views in copyable lets #1369 byoxura); Array-wrapped JS marshalling is stack-safe (JS effect marshaller overflows the host stack when recursion is nested under Array #1346, PR Make Array-wrapped JS marshalling stack-safe #1370 by
oxura).
--verdictbuilds inlined recursive let arguments at each use (--verdict certifies a different main (kernel 1, bend2 0n): a let passed to a self-call is built at the let, so a convoy captures it (#1168 via let_term) #1326,PR fix(verdict): build inlined recursive let arguments at each use #1368 by oxura), keeps Base-free large Nat literals (Without import Base, safe.ts writes a Nat literal above 4096 as the book's own Nat.add(Nat.mul(q, 4096), r), so --verdict passes a book whose certified main is 1n while bend2 runs it to 4097n #1330, PR fix(verdict): preserve Base-free large Nat literals #1337
by oxura), and parses both rewrite motive binders in its diagnostics
(Diagnostic bug: safe_diag cannot parse current rewrite syntax and misreports valid recursion #1315, PR fix(diagnostics): parse both rewrite motive binders #1407 by oxura).
arguments (PR fix(formatter): preserve separated brace arguments #1505), by vicmcorrea; the linter keeps quoted foreign
import paths (PR fix(lint): preserve quoted foreign import paths #1422) and module headers (PR fix(lint): respect module headers in declaration guard #1460), by vicmcorrea.
translation (README Limitations: note backend divergence and unproven translation #1423, PR README Limitations: backend divergence and unproven translation #1424); the formatter README installs
bend2-fmt-lspon PATH (PR docs(formatter): document editor command installation #1486 by Osraka); IO forks vs CPU parallelcalls (IO.fork computations run their pure work on one core; the guide says "in parallel, on every core" #1375, PR docs: distinguish IO forks from CPU parallel calls #1415 by oxura); BendRT's opening program checks again
(Documentation bug: The BendRT paper’s opening example fails type checking #1308, PR Make the BendRT opening program check again and rebuild its PDF #1382 by oxura).
Checks on 16b5db1 (main 0e14aa8 + VERSION/CHANGELOG): repo 54/54, test 1606/1606, ping 56/56, perf 124/124.