I've made a language! \o/ Introducing Neat

FeepingCreature feepingcreature at gmail.com
Tue Sep 20 01:41:39 UTC 2022


On Monday, 19 September 2022 at 15:31:03 UTC, React wrote:
> On Sunday, 18 September 2022 at 20:28:58 UTC, FeepingCreature 
> wrote:
>> Alright, since I've ran out of critical issues on my TODO, 
>> here's Neat!
>>
>> https://neat-lang.github.io/
>>
>> https://github.com/neat-lang/neat
>>
>
>
> Nice!
>
> I hope that the underscores instead of spaces are just a 
> rendering issue.

Yes, it's an issue with the dark mode rendering of Sphinx's RTD 
theme. I have no idea how to fix that, so patches welcome.

On Monday, 19 September 2022 at 16:20:38 UTC, Abdulhaq wrote:
> Very interesting :-) and congratulations on getting this far. 
> Can you tell me what is a macro in this context, I'm not 
> getting it from the code?

Basically, there's locations in the compiler that allow hooks to 
be loaded. There's a syntax construct that tells the compiler, 
"stop what you're doing, and instead of compiling for the target 
platform, compile everything up to here for the *current* 
platform. Then take the function I gave you from the object you 
just compiled, load it with dlopen, and execute it with the 
module macro state object." (Or, abbreviated, `macro(someFun);`.) 
Then the function adds some object to the macro state, which 
changes the behavior of the compiler (via the hook system) for 
that module and others that import it. So it's a compiletime 
plugin.

On Monday, 19 September 2022 at 17:25:21 UTC, Dukc wrote:
> The definitely do look epic, and I'd be happy to have them in 
> D. Though I do prefer `int[4]` to `(int, int, int, int)` that I 
> think I saw somewhere (hopefully they will be the one and the 
> same someday!).

Yes, that is definitely a placeholder. I don't have a non-tagged 
union type right now, so the C import macro doesn't know what to 
make of them. I don't have a static-array type either, because I 
never use them myself. So I make do with that hack. TODO!


More information about the Digitalmars-d mailing list