Repository navigation
Bend 2.0.38 - #1800
Merged
Merged
Bend 2.0.38#1800
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
+RTSand-RTS(The runtime takes
--threads,--gpu,--gpu-buildand the first--from anywhere in a compiled program's argv #1466, PR fix(runtime)!: runtime options go between +RTS and -RTS (#1466) #1530 by viridale). Breaking:./main --threads 4nowpasses
--threads 4to the program (IO.args); write./main +RTS --threads 4 -RTS. A trailing-RTSmay be left off,BENDRTSholdsoptions too (the command line wins),
--stops option reading andreaches the program, and an unknown option inside the bracket is an
error.
--threadstakes digits,--gputakeson,offor a size inGBorMB.constructor's JS tag is its name in the file that declares it, so a
value crosses modules and matches the right arm (JS lane: a Nat inside a value passed between two loaded .bend libraries stays a BigInt (constructor tags depend on the importing root), since 2.0.29 (still in 2.0.30) #1105, PR fix(compiler)!: stabilize JS constructor tags across modules #1488 by
oxura); imported export keys and foreign JS def ids keep their
:(.mjs exports collapse an imported lib:value and a root lib.value #1758, JS module emitter does not escape quotes or backslashes in book namespaces #1759, Distinct namespaced and dotted-root JS effects collide during registration #1766, PR Keep JavaScript definition names distinct in modules and effects #1760 by oxura).
TCP.sendandTCP.try_sendhand back unsent bytes, aList<&2, U32>to resume withTCP.send_bytes, so a write cut inside aUTF-8 character loses nothing (Resuming TCP.try_send string residue corrupts a partially written UTF-8 character #1764, PR Return exact byte residues from TCP text sends #1765 by oxura). Breaking
for code that read the residue as a String.
Textevents with the typed characters onLinux and macOS (Window:
Keyevents never carry an uppercase letter, so a program cannot tell what the user typed #1019, PR feat(window): emit native text input events #1441 by oxura).Charholds any u32 on every lane; a non-scalar becomes U+FFFDonly where text leaves Bend (Char.from_u32 of a surrogate fails in JS and the interpreter but prints invalid UTF-8 natively #1080, PR fix(runtime): a Char holds any u32 on every lane; U+FFFD only at text edges #1411 by oxura).
--verdict:code (PR The verdict says why each def it lists relies on unsafe or foreign code #1531 by MattCozendey), and hints when those defs come only
through unused imports (
bend PROOF.bendfails over foreign defs that no law depends on #1463, PR Proof verdict: hint when unsafe/foreign defs come only through unused imports #1558).~parameter is checked by the kernelover each value, so an empty type no longer passes unchecked (
--verdictpasses a def that the kernel never checks #1186,PR A def specialized at a finite parameter also goes to --verdict as a λ-match on it, so the kernel checks that each value has an instance that fits its type (#1186) #1225 by nicolas-abril); a
~constant takes its model from thetemplate's instances (PR --verdict takes a ~ constant's model from the template's instances, not from a search #1580 by nicolas-abril).
smaller part of its input, as the checker does (Termination: bend2 accepts a self-call on a rebuilt constructor, the kernel rejects it #1167, PR The kernel checks a self-call's descent against the column's pattern, as bend2's term_descend does, so a constructor rebuilt around a smaller part of its input descends (#1167) #1200 by
nicolas-abril).
--verdictmismatch: an η-expanded argument keeps old binder levels in its inner annotations (BoolwhereNatis expected) #1665,--verdictmismatch: a λ rebuilt as a match keeps its variable's old level in its annotations (NatwherePis expected) #1669, PR A def's body goes to --verdict through its lowered form once, so its annotations move with its binders under η, rebuild and let inlining (#1665, #1669) #1666 byaaaxn); a bare constructor in a type (
--verdictmismatch: a function in a type-parameter field (pair,Some) is η-expanded on only one side of an equation #1619, PR fix(verdict): a bare constructor in a type goes to the kernel at its goal (#1619) #1620 by ScottMoore0);shared group prefixes (PR fix(safe): consume the full shared group prefix #1704 by sebastian-griego); kernel failures
show their details (
--verdictreports a kernel "out of fuel" as a TypeScript/kernel mismatch, without the def or the reason (2.0.36) #1535, PR fix(verdict): show kernel failure details (#1535) #1536 by viridale).flight, with no host round trip per stage (PR GPU bangs chain their rounds on the device, three command buffers in flight #1447 by nicolas-abril).
(A generic def over a Data record boxes it on the device heap: a Bool.pick of two records took Metal's compile from 8 s to over 11 minutes #1195, PR A flat generic def's spin takes words at its instance's layouts (#1195) #1588).
String.orderwalks both strings once: 8x on C, andString.eqoflong strings no longer overflows the JS lane (PR String.order walks both strings once and hands nothing back: a comparison is one tail call per char, 8x on the C lane, and String.eq of two 50000-char strings no longer overflows the JS lane #1459 by aldeni);
String.containsis linear on JS (PR perf(js): avoid rebuilding strings in String.contains #1628 by sebastian-griego).nicolas-abril); word matches with many literals compile faster (PR
mat_lits compares a word match's default with its replay node by node, up to where they meet, not as two JSON strings #1387 by Iann29).
U32.powby squaring andF32.showwithout a second conversion on C(PRs perf(c): compute U32.pow by exponentiation by squaring #1567 and perf(runtime): reuse rounded digits in native F32 formatting #1591 by sebastian-griego);
F32.readrejects bad inputin linear time (PR avoid quadratic rejection in F32.read #1625 by toprameen); expired channel waiters leave
in constant time (PR perf(io): remove expired native channel waiters in constant time #1671 by sebastian-griego).
bend_dev(PR bend_dev on CUDA declares vote[3] with 0 dynamic shared memory, so SMs keep their L1 cache #1602 by wakamex).under
!no longer faults at 1023 frames (Metal: non-tail recursion under a bang faults at 1023 list elements; CPU completes through 100000 #1393, Metal: one!over a two-leaf fork tree (a 365-fork spine beside a 3-fork spine) faults; each leaf alone, a balanced 365+365, and--gpu offall pass #1394, PR Metal: a full lane stack spills to the heap, so non-tail recursion under ! no longer faults at 1023 frames (#1393, #1394) #1439 bytotaland).
viridale); a recursive spine is freed cell by cell (Native automatic erasure progressively slows repeated wrapped-list allocation; explicit traversal stays fast #1307, PR fix(runtime): release tail-drop frames before the last child #1438 by
oxura); native channels free their rows and unread values (Native C retains every buffered channel closed without a later receiver #1268, PR
fix(runtime): reclaim native channel rows and unread buffered values #1532 by oxura); Nat powers and bit widths take checked paths (Native Map.msb.u walks the bits of each U32 query #1709,
Native U32.log2 retains the Base bit search in numeric folds #1710, PR Use checked native paths for Nat powers and bit widths #1713 by oxura); functions only an effect calls stay
reachable (A function used only through foreign FID is not emitted #1711, CID scanning rewrites suffixes of legal host identifiers #1712, PR Keep foreign-only functions reachable and preserve host identifier boundaries #1714 by oxura); the crash trap is
async-signal-safe (PR fix(runtime): make the SIGSEGV/SIGBUS trap async-signal-safe #1655 by adeerkhan).
Let ready IO yield to other runnable computations #1723 by oxura);
IO.exitflushes buffered output (PR fix(io): flush buffered output before IO.exit #1519 byvicmcorrea); file and JS stream writes fail on zero progress (File writes do not terminate on zero progress #1445,
PRs fix(io): fail file writes on zero progress #1446 by oxura and fix(runtime): reject zero-progress JS stream writes #1747 by vicmcorrea); nested JS IO schedulers
are isolated and resume their own channel waiters (JS IO: a nested run overwrites the outer scheduler and silently drops IO.spawn work #1524, Nested JS IO wakes channel waiters on the wrong scheduler #1761,
Timed channel receives can resume twice and remove an unrelated timer #1770, PRs fix(runtime): isolate nested JS IO schedulers #1525 and Resume channel waiters on their own JS scheduler #1762 by oxura); UDP receive buffers are bounded
(UDP receive buffers grow beyond the maximum IPv4 payload #1695, PR Bound UDP receive buffers to the IPv4 payload limit #1698 by oxura);
TCP.connectchecks its arguments on JS(PR fix(js): validate TCP.connect arguments before FFI setup #1618 by vicmcorrea); JS
Audio.writecounts whole frames andpaces on monotonic time (PRs fix(audio): count complete frames in JS Audio.write #1683 by toprameen and fix(audio): use monotonic time for the JS queue #1597 by
vicmcorrea).
List.any,all,containsandfindstop once the answer isknown (Native List.any evaluates an overflowing predicate after the result is known #1726-Native List.find evaluates an overflowing predicate after the result is known #1729, PR Stop list searches once the answer is known #1730 by oxura); prefix checks stop at the
prefix (Let an empty String prefix reduce without inspecting the haystack #1640, PR fix(base): stop prefix checks at the matched prefix #1645 by EpsilonPhoenix);
F32.roundkeeps negativezero and rounds once (F32.round loses the sign of negative zero #1611, PRs fix(base): preserve negative zero in F32.round #1613 by oxura and fix(base): avoid intermediate rounding in F32.round #1547 by
vicmcorrea);
F32.lerpstays finite and keeps its endpoints (F32.lerp overflows between finite endpoints and loses endpoint values #1607,F32.lerp changes signed-zero endpoints and can return NaN at t=0 #1749, PRs fix(base): keep lerp finite and preserve endpoints #1608 and Keep F32.lerp endpoints unchanged #1754 by oxura);
F32.to_natkeeps wide values(F32.to_nat returns zero for representable Nats at and above 2^32 #1636, PR fix(base): preserve wide finite values in F32.to_nat #1642 by oxura); JS
U32.to_f32keeps zero positive andscalar F32 host inputs are rounded (JS U32.to_f32 can give unsigned host zero a negative float sign #1692, JS F32 scalar inputs keep binary64 precision across the module and effect boundary #1568, PRs Keep unsigned zero positive in JS U32.to_f32 #1693 and fix(runtime): round scalar F32 host inputs before use #1569
by oxura).
CID/FIDare scanned with the source's own comment rules(Foreign effect ID scanning uses the wrong line-continuation rules #1604, PR fix(effects): scan CID/FID with the source's own comment rules #1653 by adeerkhan); a bad Nat from a JS host says its range
(fix(js): invalid Nat inputs report a misleading 2^48-1 limit #1634, PR fix(js): explain the host Nat input range #1656 by oxura).
bend page.html -o <dir>never overwrites its own page (PR fix(cli): protect HTML bundle inputs #1690 bytoprameen); inline HTML modules stay apart from real assets and from
each other (HTML bundling silently replaces an existing JS asset with an inline module #1752, HTML bundle diagnostics rewrite unrelated real JS filenames as page names #1753, HTML bundling misses encoded module types and activates scripts with non-ASCII whitespace #1767, PRs Keep inline HTML modules separate from real assets #1756 and Keep HTML module roots independent and classify their type correctly #1768 by oxura); decoded
module paths are classified right (Node loader checks the complete URL suffix, rejecting .bend cache-busting imports and intercepting JS modules #1570, PR fix(loader): classify decoded module file paths #1571 by oxura).
a failed update check keeps the command's status (PR fix(cli): preserve command status when update checks fail #1603 by
vicmcorrea); filtered Base output keeps
@unsafe(PR fix(cli): preserve @unsafe in filtered base output #1538 bytoprameen).
inline bodies and mixed line endings (PRs Preserve column-sensitive block layouts #1302 by dearlordylord, Keep nested match arms and mixed line endings intact in the formatter #1755,
Keep nested cases in their match after a dedented body #1672 by oxura, fix(formatter): preserve inline lambda body alignment #1583, fix(formatter): preserve inline bodies after operators in types #1584, fix(formatter): preserve semicolon body alignment #1590, fix(fmt-lsp): retain inline match anchors after dedents #1757 by vicmcorrea and
sebastian-griego); the LSP keeps match scopes across forall bodies (PR
fix(lsp): preserve match scopes across forall bodies #1791 by vicmcorrea). Breaking for bend-lint rule authors: option
constructors are
OptionNum,OptionFlagandOptionText(PR fix(lint)!: prefix option constructors to avoid Base collisions #1565by vicmcorrea); bend-lint also fixes new buffers, cancelled runs and
downloaded checkouts (PRs Keep downloaded lint checkouts usable #1745, Fix new editor buffers and cancelled lint runs #1746 by oxura, fix(lint): limit Base seeding to the import header #1587, fix(lint): show help before loading the compiler #1605 by
vicmcorrea).
🤖 Generated with Claude Code