From: Emery <ehmry@posteo.net>
To: <9front@9front.org>
Subject: [9front] Nim lang, C alignment support
Date: Fri, 06 Aug 2021 10:52:05 +0000 [thread overview]
Message-ID: <981ff1ef-7de9-4b86-b481-17c586c1848e@posteo.net> (raw)
Hi,
I've been try to port the Nim language to Plan 9 and so far it works with
one exception. Most pure Nim code can be compiled to a C form that can be
built by the native compilers (no APE), but the Nim garbage collector
uses the alignment features of GCC/LLVM/VCC. Programs run until the first
garbage collection and then things go to shit.
Are there C compilers with alignment control (C11?) available for 9Front?
Is there any interest in backporting alignas or alignof to 6c?
An alternative would be to port Nim to C99.
There might not be any interest in Nim within the Plan 9 community but
I would prefer to be writing and testing my projects on 9Front.
Cheers,
Emery
https://nim-lang.org/
The alignment macros:
https://github.com/nim-lang/Nim/blob/v1.4.8/lib/nimbase.h#L548
Expected behavior:
https://raw.githubusercontent.com/nim-lang/Nim/devel/tests/align/talign.nim
Useless Plan 9 port:
https://github.com/nim-lang/Nim/compare/v1.4.8...ehmry:plan9
next reply other threads:[~2021-08-06 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 10:52 Emery [this message]
2021-08-06 11:11 ` Adrian Siekierka
2021-08-06 13:37 ` Emery Hemingway
2021-08-06 22:25 ` Xiao-Yong Jin
2021-08-08 14:54 ` Emery Hemingway
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=981ff1ef-7de9-4b86-b481-17c586c1848e@posteo.net \
--to=ehmry@posteo.net \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).