Re: LDC 1.28.1

2022-01-24 Thread workman via Digitalmars-d-announce

On Wednesday, 19 January 2022 at 15:55:39 UTC, kinke wrote:

On Wednesday, 19 January 2022 at 13:55:56 UTC, workman wrote:

Thanks for the kind reply.

This azure download link work for me very well, with LTO or 
without LTO, the project build and run without problem.


Glad to hear that, thanks for the feedback!



My pleasure.


I try use LDC for IOS with 
https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1-rc3/clang+llvm-13.0.1-rc3-x86_64-apple-darwin.tar.xz (clang to build c library).


This office llvm-13 support -arch arm64e flags, to link with ldc2 
I get this error:


```sh
tests.o has architecture arm64 which is incompatible with target 
architecture arm64e

```

Is there a option to made ldc2 support arch flags for apple ?



Re: The DIID series (Do It In D)

2022-01-24 Thread Tejas via Digitalmars-d-announce

On Tuesday, 25 January 2022 at 01:15:11 UTC, Walter Bright wrote:

On 1/24/2022 4:34 PM, Elronnd wrote:
On Monday, 24 January 2022 at 23:33:29 UTC, Walter Bright 
wrote:
The phrase "How bad really is the D ecosystem?" only asks a 
question, but people tend to interpret such sentences as "D's 
ecosystem is really bad". What works better is:


"How good really is the D ecosystem?"


Your suggested phrasing sounds overly trite to me.  I would 
maybe go for 'Is the D ecosystem really that bad?'


Again, never write "Is the D ecosystem really that bad?" unless 
one wants to give the impression that the D ecosystem is bad. 
Because all the dear reader actually sees is:


D ecosystem bad


I agree, it's far easier for people to focus on the negatives 
than the positives, using any word that has a negative 
connotation will likely deter the average newcomer from 
continuing their journey.


Walter's version can be used, or if one wants to sound neutral:


Check out what the D ecosystem has to offer


Can be used instead


Re: The DIID series (Do It In D)

2022-01-24 Thread Walter Bright via Digitalmars-d-announce

On 1/24/2022 4:34 PM, Elronnd wrote:

On Monday, 24 January 2022 at 23:33:29 UTC, Walter Bright wrote:
The phrase "How bad really is the D ecosystem?" only asks a question, but 
people tend to interpret such sentences as "D's ecosystem is really bad". What 
works better is:


"How good really is the D ecosystem?"


Your suggested phrasing sounds overly trite to me.  I would maybe go for 'Is the 
D ecosystem really that bad?'


Again, never write "Is the D ecosystem really that bad?" unless one wants to 
give the impression that the D ecosystem is bad. Because all the dear reader 
actually sees is:


D ecosystem bad




Re: The DIID series (Do It In D)

2022-01-24 Thread Elronnd via Digitalmars-d-announce

On Monday, 24 January 2022 at 23:33:29 UTC, Walter Bright wrote:
The phrase "How bad really is the D ecosystem?" only asks a 
question, but people tend to interpret such sentences as "D's 
ecosystem is really bad". What works better is:


"How good really is the D ecosystem?"


Your suggested phrasing sounds overly trite to me.  I would maybe 
go for 'Is the D ecosystem really that bad?'


Re: D Language Quarterly Meeting Summary for January 2021

2022-01-24 Thread Elronnd via Digitalmars-d-announce

On Tuesday, 25 January 2022 at 00:08:54 UTC, H. S. Teoh wrote:
This may work for x86, but does it work for other platforms? If 
not, it won't fly on LDC/GDC.


I don't think there's anything wrong with d having its own ABI.  
But, I checked arm and riscv: both of their c calling conventions 
have scratch registers not used for parameter-passing.


Re: D Language Quarterly Meeting Summary for January 2021

2022-01-24 Thread H. S. Teoh via Digitalmars-d-announce
On Mon, Jan 24, 2022 at 10:56:57PM +, Elronnd via Digitalmars-d-announce 
wrote:
> On Friday, 21 January 2022 at 12:55:58 UTC, ag0aep6g wrote:
> > I still believe it should be fairly simple:
> > 
> > https://forum.dlang.org/post/ofc0lj$2u4h$1...@digitalmars.com
> 
> There is a simpler solution: put the context pointer in rax.  This is
> currently a caller-saved register, so there is no problem with
> clobbering it.  It is used for c-style variadics, but not d-style
> ones.  Since it is a register, nothing breaks when you have more
> parameters than fit in registers.  Any other problems?

This may work for x86, but does it work for other platforms? If not, it
won't fly on LDC/GDC.


T

-- 
Life is complex. It consists of real and imaginary parts. -- YHL


Re: From the D Blog: The Binary Language of Moisture Vaporators

2022-01-24 Thread max haughton via Digitalmars-d-announce

On Monday, 24 January 2022 at 22:59:18 UTC, Adam Ruppe wrote:

On Monday, 24 January 2022 at 22:45:14 UTC, Ali Çehreli wrote:
I am not aware of any association between "alpha" and "man" 
because I hear both "alpha male" and "alpha female" in e.g. 
nature documentaries.


It isn't really accurate in nature either and when used with 
people it tends to be exaggerated to the point of being totally 
absurd.


https://davemech.org/wolf-news-and-information/


Re: The DIID series (Do It In D)

2022-01-24 Thread Walter Bright via Digitalmars-d-announce

This is a nice initiative, Thanks!

But may I offer a suggestion:

The phrase "How bad really is the D ecosystem?" only asks a question, but people 
tend to interpret such sentences as "D's ecosystem is really bad". What works 
better is:


"How good really is the D ecosystem?"


Re: From the D Blog: The Binary Language of Moisture Vaporators

2022-01-24 Thread Walter Bright via Digitalmars-d-announce

On 1/24/2022 1:57 PM, Moth wrote:

first: how exactly does assembly output relate to moisture vaporators?


Vaporators run on compiled code, so do understand the binary code of vaporators, 
you'll need a disassembler.


I wanted to make looking at the binary code easy and fun.


second: what on earth is an ""alpha programmer""?


The top tier of programmers. In my career, I've noticed a very strong 
correlation between the top tier of programmers, and programmers who had a solid 
understanding of assembler code and what their compiler was doing.


i do hope walter has not 
subscribed to the pseudoscientific views of mysogynists.


Gender never occurred to me when speaking about alpha programmers.



Re: D Language Quarterly Meeting Summary for January 2021

2022-01-24 Thread Elronnd via Digitalmars-d-announce

On Friday, 21 January 2022 at 12:55:58 UTC, ag0aep6g wrote:

I still believe it should be fairly simple:

https://forum.dlang.org/post/ofc0lj$2u4h$1...@digitalmars.com


There is a simpler solution: put the context pointer in rax.  
This is currently a caller-saved register, so there is no problem 
with clobbering it.  It is used for c-style variadics, but not 
d-style ones.  Since it is a register, nothing breaks when you 
have more parameters than fit in registers.  Any other problems?


Re: From the D Blog: The Binary Language of Moisture Vaporators

2022-01-24 Thread Adam Ruppe via Digitalmars-d-announce

On Monday, 24 January 2022 at 22:45:14 UTC, Ali Çehreli wrote:
I am not aware of any association between "alpha" and "man" 
because I hear both "alpha male" and "alpha female" in e.g. 
nature documentaries.


It isn't really accurate in nature either and when used with 
people it tends to be exaggerated to the point of being totally 
absurd.


Re: From the D Blog: The Binary Language of Moisture Vaporators

2022-01-24 Thread Ali Çehreli via Digitalmars-d-announce

On 1/24/22 13:57, Moth wrote:

>> Reddit:
>> 
https://www.reddit.com/r/programming/comments/sbn7n6/the_binary_language_of_moisture_vaporators/ 



> first: how exactly does assembly output relate to moisture vaporators?

Someone answered that question on the ycombinator thread. They included 
this video link:


  https://www.youtube.com/watch?v=eUH2_n8jE70=0m30s

> second: what on earth is an ""alpha programmer""? i do hope walter has
> not subscribed to the pseudoscientific views of mysogynists.

I am not aware of any association between "alpha" and "man" because I 
hear both "alpha male" and "alpha female" in e.g. nature documentaries.


Ali

Aside: There was a thread on these forums where somebody was unhappy 
with the word "female" in "female programmers". I think they thought it 
was not a word suitable for humans. Well, I live in California and I can 
report that "female" is what these people use everywhere to mean 
"woman". Of course we can still argue whether it's suitable but it's in 
at least Californian English as of today.




Re: From the D Blog: The Binary Language of Moisture Vaporators

2022-01-24 Thread Moth via Digitalmars-d-announce

On Monday, 24 January 2022 at 14:22:21 UTC, Mike Parker wrote:
Some of you may be aware that Walter recently added a 
disassembler to DMD. He writes about it in his latest post for 
the D blog.


The blog:
https://dlang.org/blog/2022/01/24/the-binary-language-of-moisture-vaporators/

Reddit:
https://www.reddit.com/r/programming/comments/sbn7n6/the_binary_language_of_moisture_vaporators/


i have two questions.
first: how exactly does assembly output relate to moisture 
vaporators?
second: what on earth is an ""alpha programmer""? i do hope 
walter has not subscribed to the pseudoscientific views of 
mysogynists.


Re: From the D Blog: The Binary Language of Moisture Vaporators

2022-01-24 Thread Walter Bright via Digitalmars-d-announce

On 1/24/2022 10:22 AM, Imperatorn wrote:

On Monday, 24 January 2022 at 14:22:21 UTC, Mike Parker wrote:
Some of you may be aware that Walter recently added a disassembler to DMD. He 
writes about it in his latest post for the D blog.


The blog:
https://dlang.org/blog/2022/01/24/the-binary-language-of-moisture-vaporators/

Reddit:
https://www.reddit.com/r/programming/comments/sbn7n6/the_binary_language_of_moisture_vaporators/ 



Nice 


It's also on

https://news.ycombinator.com/news

currently at number 76


Re: The DIID series (Do It In D)

2022-01-24 Thread Imperatorn via Digitalmars-d-announce
On Sunday, 23 January 2022 at 14:23:45 UTC, Guillaume Piolat 
wrote:

How bad really is the D ecosystem?

I've started the DIID series, a good old snippet collection for 
you to copy/paste.
A series of article to highlight how shockingly easy some 
things are in D today.


[...]


YESSS!!


Re: From the D Blog: The Binary Language of Moisture Vaporators

2022-01-24 Thread Imperatorn via Digitalmars-d-announce

On Monday, 24 January 2022 at 14:22:21 UTC, Mike Parker wrote:
Some of you may be aware that Walter recently added a 
disassembler to DMD. He writes about it in his latest post for 
the D blog.


The blog:
https://dlang.org/blog/2022/01/24/the-binary-language-of-moisture-vaporators/

Reddit:
https://www.reddit.com/r/programming/comments/sbn7n6/the_binary_language_of_moisture_vaporators/


Nice 


Re: D Language Quarterly Meeting Summary for January 2021

2022-01-24 Thread ag0aep6g via Digitalmars-d-announce

On 21.01.22 13:55, ag0aep6g wrote:

On 21.01.22 13:33, Mike Parker wrote:

### Mathias
Mathias would very much like to see the unification of delegates and 
function pointers. There was general agreement that this is a good 
goal to aim for. Mathias subsequently informed me he will look into it 
once some other things are off his TODO list if no one else gets to it 
first.


I still believe it should be fairly simple:

https://forum.dlang.org/post/ofc0lj$2u4h$1...@digitalmars.com


Proof of concept:

https://github.com/aG0aep6G/dmd/commit/aa0563a49536e42fe9b2c1c2d540a7f1f1b075d4

With that tiny patch, this works:


void func(int x, int y)
{
import core.stdc.stdio: printf;
printf("%d %d\n", x, y);
}
void main()
{
void delegate(int x, int y) dg;
dg.funcptr = 
dg(1, 2); /* prints "1 2" */
}



From the D Blog: The Binary Language of Moisture Vaporators

2022-01-24 Thread Mike Parker via Digitalmars-d-announce
Some of you may be aware that Walter recently added a 
disassembler to DMD. He writes about it in his latest post for 
the D blog.


The blog:
https://dlang.org/blog/2022/01/24/the-binary-language-of-moisture-vaporators/

Reddit:
https://www.reddit.com/r/programming/comments/sbn7n6/the_binary_language_of_moisture_vaporators/


Re: DConf Online 2021 Q & A Videos

2022-01-24 Thread Mike Parker via Digitalmars-d-announce

On Sunday, 5 December 2021 at 11:01:05 UTC, Mike Parker wrote:



I'll likely be working on this for the remainder of this month. 
I'll try to get them out every three or four days, and I'll 
continue to update this thread with the new links.




I've finally wrapped up Max's Q & A video. You can see it here:
https://youtu.be/SQ9PKy1db7M

And his talk is here:
https://youtu.be/6TDZa5LUBzY

All that remains is the Ask Us Anything! session. I'll have that 
up as soon as I can.


Re: D Language Quarterly Meeting Summary for January 2021

2022-01-24 Thread ag0aep6g via Digitalmars-d-announce

On 24.01.22 03:11, Mathias LANG wrote:

Actually, the idea I had in mind is a little different.
Because a delegate is essentially:
```D
T function (T, Args..)(void* ctx, Args args)
```

It should be possible for the compiler to generate a call to a 
trampoline function that just forwards to the actual function:

```D
RT _d_trampoline (FT, RT, Args..)(void* ctx, Args args)
{
     return (cast(FT) ctx)(args);
}
```


As far as I'm aware, Walter is against that.

:

The compiler could, behind the curtain, generate a wrapper to do this (as you 
suggest), but that has negative performance implications that users could find 
very surprising because it would be hidden from them. I prefer the library 
template solution for that reason.


But that was years ago, maybe he's more open to the idea now.