<feed xmlns='http://www.w3.org/2005/Atom'>
<title>moon/zygotec/src/compiler/compiler.zc, branch main</title>
<subtitle> work-in-progress programming language.
</subtitle>
<id>https://git.downsta.ir/moon/zygotec/atom?h=main</id>
<link rel='self' href='https://git.downsta.ir/moon/zygotec/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/'/>
<updated>2026-10-14T10:05:40+00:00</updated>
<entry>
<title>split compiler.zc into files by phase</title>
<updated>2026-10-14T10:05:40+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T10:05:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=ce920b6ff47f32bc06dd27124e1b882f82f3d6ae'/>
<id>urn:sha1:ce920b6ff47f32bc06dd27124e1b882f82f3d6ae</id>
<content type='text'>
src/compiler/compiler.zc is now twelve files under src/compiler/, listed in
order in src/compiler/parts. cat of the parts in order is byte-identical to
the old file, so every compiler and image except the language server's is
unchanged. no function was edited.

consumers read the list: the makefile, bootstrap-check, genmap (which still
writes one compiler.zc into a generated map directory), tinyvm.bat,
test.sh, test_win.ps1 and the lsp drivers. the language server embeds each
part and serves them joined as the one document tinyvm:/compiler.zc.
</content>
</entry>
<entry>
<title>Merge branch 'worktree-agent-a3354164c07827b2e' into ccr-0054c02e-dfdvnd</title>
<updated>2026-10-14T09:39:39+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T09:39:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=0ed3f650e50bc6fa7712e1b3e650ec9bc678ac91'/>
<id>urn:sha1:0ed3f650e50bc6fa7712e1b3e650ec9bc678ac91</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add c-style typedef and a built-in string alias</title>
<updated>2026-10-14T09:39:22+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T09:39:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=6bb3d79cbd853601623095b497a1807489c3ef6e'/>
<id>urn:sha1:6bb3d79cbd853601623095b497a1807489c3ef6e</id>
<content type='text'>
typedef T name; binds name to the type record of T, at the top level or
in a function (scoped to its block). string is a built-in alias for char*.
A type name straight before , or ) in a parameter list is the parameter's
name, so fn f(string) still works. The language server shows typedef T
name; on hover and highlights typedef as a keyword.
</content>
</entry>
<entry>
<title>constants inside structs, and typo suggestions for fields and static members</title>
<updated>2026-10-14T09:33:03+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T09:33:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=ebaa15f02dd0e5aa358ea2e527ae4557e40b4e9c'/>
<id>urn:sha1:ebaa15f02dd0e5aa358ea2e527ae4557e40b4e9c</id>
<content type='text'>
const NAME = e; inside a struct body declares a compile-time constant named
Struct.NAME, reached as Struct.NAME or by bare name in the struct's methods.
A misspelled field or Struct.name member now ends its error with
'; did you mean 'name'?' on the member word, which the language server
turns into a quick fix.
</content>
</entry>
<entry>
<title>todo: one sorted list of open work; library suggestions without naming libraries</title>
<updated>2026-10-14T09:07:12+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T09:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=fd622c51be670bba2acf4b50c548acedbc8bb263'/>
<id>urn:sha1:fd622c51be670bba2acf4b50c548acedbc8bb263</id>
<content type='text'>
TODO.md ticks the items verified done (namespaces, actor and icon libraries
and their coverage, the genome embed, the bootstrap ownership limits, the
docs and fixtures sweep) and lists everything still open, including the
newly requested language features, sorted easiest first.

the compiler no longer names actor: file libraries for suggestions come from
src/lib/modules.txt, and lib.name before its include reports the missing
include. icon gains fixtures for reading globals while stepping and for
begin_function on a non-function, and the suite checks that nothing the
compiler reads by default mentions actors. bf.zc, the web sample and std's
capture example use qualified runtime names; LEARN.md uses build/bin paths.
</content>
</entry>
<entry>
<title>zc: untyped local const, c precedence for &amp;&amp; and ||, import fixes for every module</title>
<updated>2026-10-14T08:30:01+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T08:30:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=d274751e89f75cc0f0e25c6e5e87ef91b64597ee'/>
<id>urn:sha1:d274751e89f75cc0f0e25c6e5e87ef91b64597ee</id>
<content type='text'>
const name = value; inside a function declares a local constant that takes
the initializer's type. the let quick fix now writes a bare const.

the self-hosted compiler bound || tighter than &amp;&amp;, unlike zc0 and the
readme. no existing source mixed them without parentheses, so only new
code was affected.

missing-name diagnostics and their quick fixes now search every module:
rt, core, run, loaded files, and std, icon and actor scanned from source,
including static groups (std.Text.itoa). typos suggest module exports
(putc -&gt; rt.put_c) and get a change-to fix.
</content>
</entry>
<entry>
<title>lsp: quick fixes for hints and bare library names; comment cleanup</title>
<updated>2026-10-14T08:09:40+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T08:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=a3e9e53e64a1aa5692bca2b60bcbff6a0fcfdba1'/>
<id>urn:sha1:a3e9e53e64a1aa5692bca2b60bcbff6a0fcfdba1</id>
<content type='text'>
an undefined bare name that a module exports now says which one:
"put_c is used but never defined; did you mean to include rt and use
rt.put_c?", and the import quick fix is titled the same way and marked
preferred when it is the only one, so the editor's auto-fix applies it.

hints gain quick fixes that keep the program's meaning: an unused
parameter, or a local with no other use, is renamed to _; a constant
local with one declarator becomes const; a power-of-two multiply becomes
a parenthesized shift (not when a * / or % binds its left operand); and
let p = rt.new(n) with a small constant becomes let p[n]. the hints no
longer fire for _ discards or for locals already declared const.

whole-line /* */ comments in zc sources are // comments now, and //: is
gone from the maintained sources: the notes it marked were mostly the
documentation of the declaration below, which hovers now show. section
headers are separated from the declarations after them.
</content>
</entry>
<entry>
<title>embed: tests, editor support and docs; js vm file access; test fixes</title>
<updated>2026-10-14T07:55:08+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T07:55:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=d8da21a406f449d277c42b91d4c9bf8b20bd0dcc'/>
<id>urn:sha1:d8da21a406f449d277c42b91d4c9bf8b20bd0dcc</id>
<content type='text'>
embed declarations get accept and reject fixtures, a run-only image check
through zc0, an lsp keyword hover and the grammar keyword. errors point at
the declaration and still declare the name, so its uses are not reported
again. zc0 tracks byte-string globals and lays embedded arrays out one word
per element, the way its own indexing reads them.

the command-line javascript vm reaches node's file system for the file
syscalls, so include and embed work there; other embedders opt in.

the web build is self-contained in build/web with its examples. README,
BORROW and BOOTSTRAP-OWNERSHIP describe the new build and ownership rules,
and ONBOARD.md is a reading and verification order for the code.

the suite passes the map header to mklayout, the wasm fuzz program uses
the include format, and lsp drivers scale their deadlines on hosts
without the arm64 jit (ZC_TEST_TIMEOUT_SCALE). LLVM_CONFIG selects an
llvm with headers for the llvm section.
</content>
</entry>
<entry>
<title>build: embed images with #embed, keep everything generated in build/</title>
<updated>2026-10-14T07:28:39+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T07:28:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=7451eb090d890fb5ea5e4d40627a1b4df15a49de'/>
<id>urn:sha1:7451eb090d890fb5ea5e4d40627a1b4df15a49de</id>
<content type='text'>
the cores take their genome in with c23 #embed through src/core/genome.h,
so images are plain little-endian word files (genome.bin) instead of
generated c headers. zc0 writes that format, mkgenome checks an image
against its map and shows a compiler's diagnostics when it gets them,
and the javascript vm and the editor's vm host read the same files.
src/tools/findcc.sh picks a compiler with #embed (clang 19 or gcc 15).

zc gets an embed declaration, embed "file" as [type] name, for globals
and locals: a byte string by default, char*, numbers read little-endian,
and arrays of numbers. the compiler and language server carry their
library and source texts through it, so embed.sh and the text it
spliced into compiler.zc are gone.

make writes executables to build/bin, the default map to build/core/map,
the web page to build/web and the extension staging to build/vsix, and
the genome now rebuilds when its sources change. the test suite lays
out its own map and bootstrap and reads nothing from build/.

also: rt.put_s of a byte string in zc0 images, retained function
sources no longer count as live objects, a missing include no longer
cascades into undefined-name errors, consecutive comment lines join
into one hover paragraph, and stale test fixtures follow the include
format.
</content>
</entry>
<entry>
<title>analyzer: close the ownership gaps that stopped the compiler compiling itself</title>
<updated>2026-10-14T05:55:19+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T05:55:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=05f7b7e09ad503e4eac4f757de0d7329174f6437'/>
<id>urn:sha1:05f7b7e09ad503e4eac4f757de0d7329174f6437</id>
<content type='text'>
an owned local can now move into a released owner declared in the same or an
outer block, and g = m*x lends a local owner to a global until the global is
assigned again in the same block. leaving that block, giving the local away, or
returning while the lend is open is an error. recasting a plain local now names
it and says it has no ownership to recast.

methdef and syntax_resident use the supported spellings, so make genome reaches
its fixpoint from a clean checkout. runerr.sh reads the first // expect: line,
since the include headers moved it off line 1.
</content>
</entry>
</feed>
