Commit Graph

52 Commits

Author SHA1 Message Date
Pavel Kulyov
e2f71d23a0 emacs: load the server beside sex-mode
All checks were successful
Sex CI / build-linux (pull_request) Successful in 5m54s
2026-11-15 00:06:41 +03:00
Pavel Kulyov
1214d118e1 readme: add sex-mode.el installation via quelpa 2026-10-29 23:57:50 +03:00
7973a4331d split the C compiler's name from its options
SEX_CC="ccache cc" went looking for an executable of that whole name;
it is read as make reads CC now.
2026-10-27 01:31:37 +03:00
063770d3bc document the standard library beside it, not in the readme 2026-10-19 15:56:05 +03:00
0a565046af say that a binder is a copy, and where %-> is
All checks were successful
Sex CI / build-linux (pull_request) Successful in 5m40s
A match binder looks like a reference to its field and is not one. And
with `.' reading an untyped receiver as a value, nothing said how to
write the arrow by hand.
2026-10-14 17:27:52 +03:00
dd3a4bdac5 implement thread-first ->
`.' now writes whichever of C's member operators the type calls for,
so nothing needs the arrow spelled out and the name is free for the
macro Clojure spells the same way: (-> 5 double-it (add 3)) reads in
the order it happens rather than inside out.

It has no business in the prelude, which every unit pays for whether
or not it threads anything, so it opens the standard library instead
and is imported like anything else. The compiler finds lib/ by asking
the binary where it is -- beside sexc in a work tree, under
../share/sex once installed -- and looks there last, so a module of
one's own by that name still wins.

The C arrow becomes `%->', and that rename is what makes the rest
possible. The closure lifter writes arrows of its own for the capture
record, those forms go back through walk-statement, and a macro named
`->' threads them: (-> ƛcaptures n) turns into a call to n, with
nothing saying so until the C compiler.

fmt-c rendered a bare `->' as the arrow, which left the one spelling
that cannot be right -- threading with no import -- looking like the
operator it stopped being. It goes through c-apply now, the way any
other head nothing knows does.
2026-10-05 02:25:57 +03:00
95f39e4b44 space toplevel forms the way the source does
Every toplevel form was followed by a blank line whether or not one
was written, so the prelude's run of typedefs arrived at twice the
height. A function had no location of its own to measure from either,
having lost it where its header and body are stitched together.
2026-10-05 02:08:15 +03:00
53f92727a5 mark multi-form macro expansions with $
A bare list was read as several forms, so a macro returning
`((make-adder 10) 5)' -- a call of what make-adder returns -- was
spliced into two. Add a new $ char to denote splicing, so ($ form ...)
splices.
2026-09-30 00:08:33 +03:00
ca88d9b386 implement compound and designated literals support
All checks were successful
Sex CI / build-linux (pull_request) Successful in 4m46s
Sex CI / build-linux (push) Successful in 4m50s
2026-09-27 19:35:37 +03:00
Pavel Kulyov
b1ab18b9af dev: require make deps manually for dev & CI
All checks were successful
Sex CI / build-linux (pull_request) Successful in 4m50s
Sex CI / build-linux (push) Successful in 4m52s
2026-09-24 01:10:59 +03:00
Pavel Kulyov
c0a34fc64c readme: update installation docs 2026-09-18 00:43:13 +03:00
Pavel Kulyov
94c4a7008f infra: pepper some GNU on top of Makefile 2026-09-18 00:43:13 +03:00
Pavel Kulyov
e2fb4adae5 readme: add docs about static compilation 2026-09-18 00:26:17 +03:00
bf83baa508 read-time feature expressions
'#+' and '#-' introduce conditional compilation: the form that follows
is kept only when the feature expression is true, and otherwise is read
and thrown away.  An expression is a feature name, or and / or / not
of them.

They are read time, not compile time.

Default features are the host's software-version, software-type and
machine-type as CHICKEN reports them, plus what --features flag adds.
2026-09-16 17:59:37 +03:00
28ad33ca38 add sex-error reporting 2026-09-15 21:28:41 +03:00
d609a0c591 begin -> do
Shorter and doesn't imply existence of `end'
2026-09-15 16:32:55 +03:00
af6e778185 pass all args after '--' to C compiler verbatim 2026-09-15 16:32:55 +03:00
528f26b7ef migrate to Chicken 6 2026-09-09 12:45:12 +03:00
b2df79520e fix stray atavistic } in Readme 2025-10-30 18:05:44 +03:00
f7bc65ddc3 fix extra closing paren in Readme example 2025-10-30 18:05:44 +03:00
904a6fe3c9 fix Readme typos 2025-10-30 18:05:44 +03:00
9c3d2f61c2 update Readme 2025-10-30 18:05:44 +03:00
9d21443f01 fix logo markdown rendering 2025-10-16 15:38:00 +03:00
d9b1b9aae8 add logo 2025-10-16 15:32:09 +03:00
Pavel Kulyov
77845d24c7 Update readme 2025-10-01 15:54:17 +03:00
Pavel Kulyov
fb38e5b509 readme: remove extra closing bracket 2025-10-01 15:54:17 +03:00
072d3a64aa update Readme.org 2025-09-30 09:35:16 +03:00
b1744bb6af split semantic processing and fmt-c code generation
Introducing Sex SEMantic ENgine: the semen.
Also split reader to other file (it can be replaced in the future).
Macro expansion inside Sex code doesn't work yet, and it must be done
in semen, not during fmt-c generation as before.
2025-09-29 15:50:01 +03:00
8ad5abf055 update Readme.org 2025-08-08 19:52:02 +03:00
Pavel Kulyov
5a0076ad71 readme: fix typo 2025-08-06 21:22:35 +03:00
Pavel Kulyov
d7055814d3 readme: use proper language modes for source code snippets 2025-08-06 21:22:35 +03:00
6c6e00e6dc implement new macro system 2025-08-06 15:38:04 +03:00
9b50d26c82 numerous typos in Readme.org 2025-08-05 01:42:40 +03:00
8dbdf4b381 add actual chicken deps to the list of deps 2025-08-05 01:42:11 +03:00
4b6a7d5209 add sex-tests 2025-08-02 10:49:38 +03:00
3e535c9517 update example and Readme.org 2025-08-02 10:49:38 +03:00
4be0d3f5ac prettify --help output and add it to Readme.org 2025-08-02 10:49:38 +03:00
d2998f79ff update Readme.org
Add info about compilation and modules.
2025-08-02 10:49:38 +03:00
76ca609ea6 Make Sex templates more pleasant syntactically
No more unquotes to instantiate templates.
Also no need to pass quoted substitution lists, just use them as
regular lisp macros.
2025-07-11 18:27:50 +03:00
c084eaa397 add info about Emacs sex-mode to Readme.org 2025-06-19 12:31:43 +03:00
7e8f9197fb update Readme.org
a bit of spellchecking, add some examples for templates
2025-06-16 15:18:21 +03:00
e4c243e113 update Readme.org 2025-06-13 14:31:10 +03:00
469db7b92e add auto typedefs for structs 2025-06-09 00:21:42 +03:00
f74d1b0c1c typo 2025-06-05 17:17:58 +03:00
39e1e4a664 rewrite tree walk with tree module
also add pub support
2025-06-05 17:11:30 +03:00
46877241d9 add cmdline options
-h help
-o write to file
-m expand macros in Sex code and print result
2025-06-05 07:32:05 +03:00
12efc05c32 add link to Chicken web site 2025-05-29 22:19:23 +03:00
ddda69e61e fix format in Readme 2025-05-29 22:15:12 +03:00
b8d0efafcb implement comma in Sex sources 2025-05-29 22:08:14 +03:00
32ed90295b add info about Chicken deps to Readme.org 2025-05-27 14:50:10 +03:00