Repository navigation
d6 1.0.0-rc5
·
255 commits
to main
since this release
The fifth release candidate fills in everyday collection and String argument
shapes, and makes JIT-compiled code substantially faster on calls,
comparisons and block loops. The cookies cut (0.2.4) was published with these
changes on 2026-11-12; no other bundled cut changed since rc4.
Changed
- More collection and String conveniences: a Hash
each_with_objectblock may take(key, value, memo); Hashvalues_at,fetch_valuesandfirst/first(n);zipover up to six arrays; Arrayslice_whenandintersect?;Int#step(limit, by); and Stringinsert(index, other)andprepend(other). - Everyday collection and String methods accept the argument shapes that used to raise an arity error:
any?/all?/none?/one?without a block (on Array;any?/all?/none?on Hash),each_slice(n)/each_cons(n)with a block,sum(start)(sum(0.0),sum("")),min(n)/max(n),uniqwith a key block,flatten(depth),Hash#mergewith a conflict block,String#chomp(suffix),squeeze(chars),index(needle, start), andFloat#floor(digits)/ceil(digits). New:Array#take_while/drop_whileandHash#delete_if/keep_if. - With the JIT on (
DIAMOND_JIT=1), Arrayselect,each_with_indexandreduceand Inttimesrun their blocks as native loops, aseachandmapalready did: about half the instructions per element foreach_with_index,reduceandtimes, and a quarter fewer forselect. - With the JIT on, compiled code runs much faster on calls and comparisons: fib takes half the cycles, mandelbrot a third less, poly a quarter less, and sieve, trees, nbody and objects 15-20% less. Values are now written as whole 8-byte words and copied in 8-byte halves, so the loads that read them back no longer wait for the stores to retire, and a comparison followed by a branch on its result branches directly.
- With the JIT on, Array
mapandselectpush into their result array inline instead of calling C for every element: about 30% fewer instructions per element (map 156 to 113, select keeping everything 177 to 123, with an empty block). - Session cookies are marked
SecureunderDIAMOND_ENV=production, matching active_auth: the cookies cut'sCookieSession(0.2.4, with asecure:override, and nowPath=/) and the project_board example. Apps behind a TLS proxy such as nginx keep speaking plain HTTP. The guestbook, project_board, chat (wss:) and library examples were checked behind nginx over HTTPS; bookmarks, job_service and task_board are loopback-only single-user tools. - The brand is written D6 everywhere it names the language: guides, READMEs, the docs site, registry pages, the VS Code extension, CLI help text and GitHub release titles. Commands, file names and code stay lowercase (
d6 build,.d6,d6-lang). - A thread that fails and is never joined now prints its uncaught exception and backtrace on stderr (
d6: runtime error in unjoined thread: ...) instead of losing it silently. Exit status is unchanged. - Bundled cut maintenance avoids redundant timestamp formatting in text logging and simplifies database-config and static-file reads, including file cleanup on read errors. Network-safety comments now describe its string-only checks without outdated claims about runtime capabilities.