9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Nim lang, C alignment support
@ 2021-08-06 10:52 Emery
  2021-08-06 11:11 ` Adrian Siekierka
  0 siblings, 1 reply; 5+ messages in thread
From: Emery @ 2021-08-06 10:52 UTC (permalink / raw)
  To: 9front

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-09  9:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 10:52 [9front] Nim lang, C alignment support Emery
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

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).