Build fully static library by the compiler?

2024-08-08 Thread Denis Feklushkin via Digitalmars-d-learn
We can build static library directly from the compiler: $ ldc2 --lib app.d produces app.a file with app.o inside of it. Are there simple way to make a static library that also includes necessary standard D libraries (i.e., phobos2 and druntime)? Compiler already knows (?) paths to default st

Re: Recommendations on porting Python to D

2024-08-08 Thread mw via Digitalmars-d-learn
FYI, the code has been merged into the main branch already: https://github.com/py2many/py2many/tree/main/pyd On Thursday, 8 August 2024 at 20:20:11 UTC, Chris Piker wrote: On Friday, 12 July 2024 at 18:07:50 UTC, mw wrote: I have made basic py2many.pyd work at language/syntax level in my dlan

Re: Recommendations on porting Python to D

2024-08-08 Thread Chris Piker via Digitalmars-d-learn
On Thursday, 8 August 2024 at 20:23:02 UTC, Sergey wrote: On Thursday, 8 August 2024 at 20:20:11 UTC, Chris Piker wrote: (the rest is D). D in space when? :) Unfortunately I'm only the ground segment, so D's not going to space today. But you never know what the future holds. (I did notic

Re: Recommendations on porting Python to D

2024-08-08 Thread Chris Piker via Digitalmars-d-learn
On Friday, 12 July 2024 at 18:07:50 UTC, mw wrote: I have made basic py2many.pyd work at language/syntax level in my dlang fork: https://github.com/mw66/py2many/tree/dlang The following examples works now: https://github.com/mw66/py2many/tree/dlang/tests/expected py2many/ 13:56:23$ ls ./test

Re: Recommendations on porting Python to D

2024-08-08 Thread Sergey via Digitalmars-d-learn
On Thursday, 8 August 2024 at 20:20:11 UTC, Chris Piker wrote: (the rest is D). D in space when? :)

Re: Named template arguments

2024-08-08 Thread Anonymouse via Digitalmars-d-learn
On Thursday, 8 August 2024 at 10:51:29 UTC, IchorDev wrote: Named template parameters were mentioned in [the DIP](https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1030.md), they just haven’t been implemented yet. Thanks! Will just wait then.

Re: Named template arguments

2024-08-08 Thread IchorDev via Digitalmars-d-learn
On Thursday, 8 August 2024 at 10:45:54 UTC, Anonymouse wrote: Is there a reason why we can't have named template arguments too? I don't particularly mind it if we'd have to limit the ordering so that variadics have to be placed last. I just want to avoid having to resort to `Flag!"bar" bar` par

Named template arguments

2024-08-08 Thread Anonymouse via Digitalmars-d-learn
I've so far been using `std.typecons.Flag` *heavily* to work around there not being named arguments in D. As soon as I wanted to pass something a bool, I made it a `Flag` instead to make it a bit more self-documenting. (Also in general just to idiot-proof it a bit, since I don't trust myself no

Re: inportC with postgres 16_4 on macOS error

2024-08-08 Thread Dakota via Digitalmars-d-learn
On Thursday, 8 August 2024 at 10:08:18 UTC, Dakota wrote: dmd v2.110.0-beta.1 ```c #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) FILE*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DAR

inportC with postgres 16_4 on macOS error

2024-08-08 Thread Dakota via Digitalmars-d-learn
dmd v2.110.0-beta.1 ```sh /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h(145): Error: found `__filename` when expecting `,` /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/inc