Re: (Oh My) Gentool 0.3.0 released

2021-05-07 Thread evilrat via Digitalmars-d-announce

On Friday, 7 May 2021 at 18:17:36 UTC, Jacob Carlborg wrote:

On 2021-05-05 13:54, user1234 wrote:

Thanks for the explanations. BTW I had the same question for 
LDC backend being c++, I guess the answer would be similar.


If I understand correctly, the Zig compiler is implemented 
partially in Zig. It use the LLVM C API and some wrappers C 
around the C++ API where the C API is not sufficient.


And it quickly becomes insufficient using only the C API as 
feature complexity increases. No idea if Zig has to deal with C++ 
compiler (clang) or all it needs is pure LLVM, because the latter 
should have more or less feature rich C API, unlike clang that 
deals with C++ and has ever "unstable" API. Making wrappers for 
missing parts still will be a PITA, as having to pass around 
smart pointers definitely does not makes it easier.


Anyway like I said, for bootstrap goal it is probably easier to 
re-purpose the tool to make thin wrappers & stubs on C++ side, 
pretty much just like SWIG does.


Side note:
But all this does not compares to what potential D to 
nextgen-language bindings making process would look like, as D 
feature set makes it even harder to translate, esp. stuff like 
templates and CTFE, now add static if's to that and it becomes a 
real mess.


Re: (Oh My) Gentool 0.3.0 released

2021-05-07 Thread Jacob Carlborg via Digitalmars-d-announce

On 2021-05-05 13:54, user1234 wrote:

Thanks for the explanations. BTW I had the same question for LDC backend 
being c++, I guess the answer would be similar.


If I understand correctly, the Zig compiler is implemented partially in 
Zig. It use the LLVM C API and some wrappers C around the C++ API where 
the C API is not sufficient.


--
/Jacob Carlborg


Re: (Oh My) Gentool 0.3.0 released

2021-05-07 Thread Jacob Carlborg via Digitalmars-d-announce

On 2021-05-05 12:01, user1234 wrote:

Is it possible to use libclang and more generally LLVM c++ api [directly 
in D](https://dlang.org/spec/cpp_interface.html) or the Cpp interface is 
too limited ?

Was this an option, have you tried ?


Yes, it's possible to use libclang. DStep [1] is using that and it fully 
written in D. Although DStep cannot create bindings for C++ yet so I 
cannot guarantee that using only libclang will work for C++ code.


[1] https://github.com/jacob-carlborg/dstep

--
/Jacob Carlborg


Release md v0.3.1

2021-05-07 Thread lempiji via Digitalmars-d-announce
I have created a tool that executes the code blocks included in 
Markdown.


http://github.com/lempiji/md

I'm sure some of everyone have experienced that the code examples 
in the documentation don't work.


With this tool, you can execute Markdown code directly and always 
validate it with CI.


```
dub run md -- README.md
```

The syntax of dlang is not affected by indentation, and `import` 
can be written anywhere, so it was a very simple mechanism to 
achieve this.


However, there may be a better way. If you found it, please try 
to create it.


I think dlang ❤ Markdown