Re: My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Andrzej Kilijański via Digitalmars-d-announce

On Sunday, 21 January 2018 at 22:45:56 UTC, Basile B. wrote:


Nice work.

Remarks:

1/ There's an obvious issue with drag and drop. You should 
store the position of the mouse (in Delphi it would be during 
the  "OnMouseDown" event)  and subtract it while moving. The 
little jump is a bit annoying i think.


2/ For some reason, DPI detection was wrong for me. It started 
with 304 (pretty big !) instead of 96.


Thanks for testing :) Do you mean the story jump just after you 
start dragging or you have issues on every mouse move?


Do you have this DPI issues on windows or on linux?


[Issue 18274] va_arg (TypeInfo) broken for static arrays

2018-01-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18274

Johannes Pfau  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Johannes Pfau  ---
OK, I see that my assumption to get out exactly the same type as passed in was
flawed. If you strictly interpret the passed arguments according to _arguments,
the type of the data changed from static to dynamic array, but the data is
still correct. So this is not really a bug.

--


Re: gRPC in D good idea for GSOC 2018?

2018-01-21 Thread Timothee Cour via Digitalmars-d
> Do we even have protobuf package?

https://github.com/msoucy/dproto
it could receive some attention, there are pending issues

for RPC I've been using msgpackrpc since no gRPC was available. But
would be nice to have gRPC.

NOTE: capnproto is a very interesting newer alternative to protobuf;
https://github.com/capnproto/capnproto-dlang shows:
Missing RPC part of Cap'n Proto.
helping out capnproto project (esp around RPC) could be another idea.

we definitely need a good way to do RPC in D, otherwise hard to
integrate D with other services.

> I would consider them awful in a sense that there is no foundation to build 
> them on. At best it will be a self-serving artifact poorly fitting with 
> anything else.

But it would enable using D in places that were not previously
possible (integrating with services); we could imaging providing a
(semi) stable interface for grpc in D code and change implementation
to use better foundations later




On Sun, Jan 21, 2018 at 9:54 PM, Dmitry Olshansky via Digitalmars-d
 wrote:
> On Monday, 22 January 2018 at 04:40:53 UTC, Andrew Benton wrote:
>>
>> On Monday, 15 January 2018 at 19:28:08 UTC, Ali Çehreli wrote:
>>>
>>> I know a project where D could benefit from gRPC in D, which is not among
>>> the supported languages:
>>>
>>>   https://grpc.io/docs/
>>>
>>> Do you think gRPC support is worth adding to GSOC 2018 ideas?
>>>
>>>   https://wiki.dlang.org/GSOC_2018_Ideas
>>>
>>> Ali
>>
>>
>> An http/2 and gRPC solutions is probably necessary with tools like
>> linkerd, envoy, and istio if D wants to be competitive in service mesh and
>> distributed applications.
>>
>> http/2 and/or gRPC are both excellent ideas for GSoC 2018.
>
>
> I would consider them awful in a sense that there is no foundation to build
> them on. At best it will be a self-serving artifact poorly fitting with
> anything else.
>
> There is not even a standard way on handling IO as of yet.
> Basically do we want fiber-aware IO or blocking IO or explicit async with
> future/promise?
>
> Do we even have protobuf package?
>
>



[Issue 18263] selective import with same name masks out this reference in mixin template

2018-01-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18263

FeepingCreature  changed:

   What|Removed |Added

   Severity|enhancement |normal

--- Comment #3 from FeepingCreature  ---
Oh, good point - typeof(this).bar fixes the issue.

--


Re: Get largest heap object at runtime? ...tracking the leak

2018-01-21 Thread Andres Clari via Digitalmars-d-learn
On Monday, 22 January 2018 at 06:15:24 UTC, Dmitry Olshansky 
wrote:

On Sunday, 21 January 2018 at 17:28:13 UTC, Andres Clari wrote:
Hi, is there any way to get from the GC all allocated objects, 
so I can see their size and find where I'm leaking memory? Or 
perhaps a good tool to help with this issue...


I tried building my program with "profile-gc" but I got an 
invalid MemoryOperationError with no stack trace... so no luck 
using that. And the leak is only obvious when running in 
production, where after 6 hours I've seen 1.5Gb of memory 
usage.



Are you by chance using vibe.d?
In versions 0.8.x I observe a huge memory leak. Might be your 
problem.




Right now, I'm able to extend the life of my program by 
injecting calls to:

GC.collect
GCminimize

Within an event that happens every 5 seconds, which I estimate 
will give me about a week before the program's memory is again 
at +1.5Gb.


Yeah.

Although after doing some manual tracking and isolation of the 
suspect routines, I found that using "std.concurrency.spawn" to 
run a http post request with the "requests" library was the 
leaking suspect.


I'm triggering some 15 requests every 5 seconds in production, so 
it's obvious there, but querying "GC.usedSize" I was able to 
observe the same on my dev environment.


After removing the "spawn" call, and wrapping up the post code 
inside a "runTask", it seems to work properly now, and so far I 
have a consistently small memory size in production.


Not sure why "spawn" would leak like that tho. I would assume 
that once the thread exits, it would get destroyed and it's 
resources reclaimed, specially when I have calls to "GC.collect 
and GC.minimize".


Re: Get largest heap object at runtime? ...tracking the leak

2018-01-21 Thread Dmitry Olshansky via Digitalmars-d-learn

On Sunday, 21 January 2018 at 17:28:13 UTC, Andres Clari wrote:
Hi, is there any way to get from the GC all allocated objects, 
so I can see their size and find where I'm leaking memory? Or 
perhaps a good tool to help with this issue...


I tried building my program with "profile-gc" but I got an 
invalid MemoryOperationError with no stack trace... so no luck 
using that. And the leak is only obvious when running in 
production, where after 6 hours I've seen 1.5Gb of memory usage.



Are you by chance using vibe.d?
In versions 0.8.x I observe a huge memory leak. Might be your 
problem.




Right now, I'm able to extend the life of my program by 
injecting calls to:

GC.collect
GCminimize

Within an event that happens every 5 seconds, which I estimate 
will give me about a week before the program's memory is again 
at +1.5Gb.





Re: gRPC in D good idea for GSOC 2018?

2018-01-21 Thread Dmitry Olshansky via Digitalmars-d

On Monday, 22 January 2018 at 04:40:53 UTC, Andrew Benton wrote:

On Monday, 15 January 2018 at 19:28:08 UTC, Ali Çehreli wrote:
I know a project where D could benefit from gRPC in D, which 
is not among the supported languages:


  https://grpc.io/docs/

Do you think gRPC support is worth adding to GSOC 2018 ideas?

  https://wiki.dlang.org/GSOC_2018_Ideas

Ali


An http/2 and gRPC solutions is probably necessary with tools 
like linkerd, envoy, and istio if D wants to be competitive in 
service mesh and distributed applications.


http/2 and/or gRPC are both excellent ideas for GSoC 2018.


I would consider them awful in a sense that there is no 
foundation to build them on. At best it will be a self-serving 
artifact poorly fitting with anything else.


There is not even a standard way on handling IO as of yet.
Basically do we want fiber-aware IO or blocking IO or explicit 
async with future/promise?


Do we even have protobuf package?




Re: Please provide a channel for D ecosystem ideas

2018-01-21 Thread Andrew Benton via Digitalmars-d

On Saturday, 20 January 2018 at 20:37:45 UTC, Andre Pany wrote:

Hi,

the GSOC wiki page inspired me to write this request. If I have 
an idea how the improve the D ecosystem but cannot do it 
myself, there is at the moment no good channel to provide this 
idea to someone other in the D community. Maybe someone other 
is searching for an opportunity to help the D ecosystem but 
does not know how.


[...]


I think this is a great idea.  Is there some way to do voting 
with github or trello so that we can see the features that people 
want the most?


Re: gRPC in D good idea for GSOC 2018?

2018-01-21 Thread Andrew Benton via Digitalmars-d

On Monday, 15 January 2018 at 19:28:08 UTC, Ali Çehreli wrote:
I know a project where D could benefit from gRPC in D, which is 
not among the supported languages:


  https://grpc.io/docs/

Do you think gRPC support is worth adding to GSOC 2018 ideas?

  https://wiki.dlang.org/GSOC_2018_Ideas

Ali


An http/2 and gRPC solutions is probably necessary with tools 
like linkerd, envoy, and istio if D wants to be competitive in 
service mesh and distributed applications.


http/2 and/or gRPC are both excellent ideas for GSoC 2018.


[Issue 18275] New: dmd deletes source file fun.cpp with `dmd fun.cpp.o main.d`

2018-01-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18275

  Issue ID: 18275
   Summary: dmd deletes source file fun.cpp with `dmd fun.cpp.o
main.d`
   Product: D
   Version: D2
  Hardware: x86
OS: All
Status: NEW
  Severity: critical
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: timothee.co...@gmail.com

```
fun.cpp:extern"C" void test(){}
main.d:extern(C) void test(); void main(){}
```

clang++ -o fun.cpp.o -c fun.cpp
dmd fun.cpp.o main.d

(same bug with ldc2)
this caused https://github.com/Syniurge/Calypso/issues/59

proposed fix:
if `-of` explicitly passed on cmd line, fine, nothing to check

if not, infer output file as we already do, but first assert(!file.exists)
(regardless of what type of file it is, that's irrelevant)

downside:
dmd main2.d
#creates main2
dmd main2.d
#error main2 already exists, please specify -of=main2 explicitly to force write

I think the downside is not as bad as the bug I reported which deletes source
code and can be very damaging if the file wasn't backed up in its latest form,
which is common in edit/compile/debug cycles

--


Re: My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Basile B. via Digitalmars-d-announce
On Sunday, 21 January 2018 at 18:03:41 UTC, Andrzej Kilijański 
wrote:

Hi,

I was working on my first dlang/dlangui app and dlangui itself 
(as contributor and3md) for the last ten months.
Currently first version of my software is up:) It's simple 
project management tool. Anyone can check how dlangui can look 
like and the state of the project by checking it:


https://agilecommander.com/

I created my own theme, special for my app. I think dlangui is 
pretty usable. Last year many bugs was fixed. There is a lot of 
work to do but all basic stuff just work.


Working with dlang is very pleasure. I love D way of holding 
string encoding. I come to D from Pascal/Delphi world and I 
think D is first language that can be Pascal killer (fast 
compilation, fast native code, more readable, and don't have 
circular reference problem). We (dlang/dlangui) only need more 
success stories.


DlangUI can be found here:
https://github.com/buggins/dlangui


Nice work.

Remarks:

1/ There's an obvious issue with drag and drop. You should store 
the position of the mouse (in Delphi it would be during the  
"OnMouseDown" event)  and subtract it while moving. The little 
jump is a bit annoying i think.


2/ For some reason, DPI detection was wrong for me. It started 
with 304 (pretty big !) instead of 96.


Re: OT: Indexing reordering in the eBay Search Engine

2018-01-21 Thread sarn via Digitalmars-d

On Friday, 19 January 2018 at 23:55:00 UTC, Jon Degenhardt wrote:
If anyone is interested in the type of work that goes on in my 
group at eBay, take a look at this blog post by one of my 
colleagues: 
https://www.ebayinc.com/stories/blogs/tech/making-e-commerce-search-faster/


It describes a 25% efficiency gain via a technique called index 
reordering. This is the engineering side of the work, I also 
work on recall and ranking.


--Jon


Those long-tail gains are really nice, and the real win IMO.


Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn

On Sunday, 21 January 2018 at 20:46:56 UTC, Timon Gehr wrote:

On 21.01.2018 21:20, Mark wrote:

Just realized that I commented out the creation of the BST

new link: https://dpaste.dzfl.pl/ce620cbee919



'in' means 'const scope', but it seems you need references that 
are allowed to mutate the incoming items. Remove the 'in' 
attribute from the parameters and your problem should disappear.


Ok, I was looking at the wrong stuff. Looking at varidiac 
functions in the book, I'm seeing what you're saying.


I thought that was used as a keyword for variadic arguments.


Thanks, that worked perfectly!
Mark.


Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Timon Gehr via Digitalmars-d-learn

On 21.01.2018 21:20, Mark wrote:

Just realized that I commented out the creation of the BST

new link: https://dpaste.dzfl.pl/ce620cbee919



'in' means 'const scope', but it seems you need references that are 
allowed to mutate the incoming items. Remove the 'in' attribute from the 
parameters and your problem should disappear.


Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn

Just realized that I commented out the creation of the BST

new link: https://dpaste.dzfl.pl/ce620cbee919



Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn

Hello,

I re wrote my old BST. This one is far more complete and clean.

However, It fails my final unittest when I try to stick a class 
in as its type.


Link: https://dpaste.dzfl.pl/95e1ae49b25b

Ive done this type of thing before, but it is giving me this 
error:


BinarySearchTree.d(30): Error: function 
BinarySearchTree.BinarySearchTree!(Empty).BinarySearchTree.New 
(Empty item) is not callable using argument types (const(Empty))
BinarySearchTree.d(40): Error: function 
BinarySearchTree.BinarySearchTree!(Empty).BinarySearchTree.New 
(Empty item) is not callable using argument types (const(Empty))
BinarySearchTree.d(574): Error: template instance 
BinarySearchTree.BinarySearchTree!(Empty) error instantiating


the New method is on line 94;

I was looking through the Programming in D book, and can't find 
what this is really telling me.


I have templated Stack and queue classes that don't give me these 
errors??


How do I make the BST accept classes like the one in my test?

I don't deal with const stuff, so I'm not too sure what to look 
for concerning these problems.


I'm still looking in the book/site for answers.

Thanks!


Re: only want to start - TK programming in D with one code example. Linkingerror.

2018-01-21 Thread Jordi Sayol via Digitalmars-d
El 21/01/18 a les 16:58, MHE via Digitalmars-d ha escrit:
> Hi there,
> i am completely new in D Programming and only want to start the example code 
> for TK that is described on the homepage 
> https://github.com/nomad-software/tkd.
> For this i have gitcloned the 3 packages tcltk tkd x11 in the folder 
> /usr/local/GIT/.
> Then i run the command dub inside any single folder and build it.
> 
> When i want to run the example TK D script the following results are seen -
> 
> $ dmd -I/usr/local/GIT/ hw_graphical2.d
> hw_graphical2.d(1): Error: module tkdapplication is in file 
> 'tkd/tkdapplication.d' which cannot be read
> import path[0] = /usr/local/GIT/
> import path[1] = /usr/include/dmd/phobos
> import path[2] = /usr/include/dmd/druntime/import
> hans@mx1:~/Documents/D_lang
> $
> 
> I have made something wrong with the configuration of the TKD module.
> Need help here to start programming with D and TK.
> 
> WBR
> MHE
> 

You can use d-apt 

Install TkD packages:

$ sudo apt-get install libtkd-dev libtkd-doc

Then compile and run the example included on "libtkd-doc" package:

$ dmd `pkg-config --cflags --libs tkd` -J/usr/share/libtkd-doc/example/media/ 
-run /usr/share/libtkd-doc/example/example.d


Re: How do I solve this kind of conflict?

2018-01-21 Thread Adam D. Ruppe via Digitalmars-d-learn

On Sunday, 21 January 2018 at 16:22:33 UTC, Marc wrote:

But libraries has this defined:


extern(C) int callback(void*, int, char** , char**){


Just rename one of the functions. It is really bad form to have 
extern(C) functions have a common word like this exactly because 
they share a namespace and make conflicts likely.


I'd name one like `callback_lib_name` and the other 
`callback_other_lib`. You might even be able to do `alias 
callback = callback_lib_name;` after the definition to keep all 
the D code compiling with no other changes.




Re: My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Andrzej Kilijański via Digitalmars-d-announce
On Sunday, 21 January 2018 at 18:22:32 UTC, Guillaume Piolat 
wrote:
Welcome to D app development, and congrats about not being yet 
another SaaS!
It's becoming annoying how every website want to own you and 
your data.

(can't test you app though because no Mac version).


I created to make this app because wanted to have all my 
plans/data on my own computer:) Currently don't have a Mac but 
DlangUI works on Mac too (SDL backend).


Re: My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Guillaume Piolat via Digitalmars-d-announce
On Sunday, 21 January 2018 at 18:03:41 UTC, Andrzej Kilijański 
wrote:

Hi,

I was working on my first dlang/dlangui app and dlangui itself 
(as contributor and3md) for the last ten months.
Currently first version of my software is up:) It's simple 
project management tool. Anyone can check how dlangui can look 
like and the state of the project by checking it:


https://agilecommander.com/




Welcome to D app development, and congrats about not being yet 
another SaaS!
It's becoming annoying how every website want to own you and your 
data.

(can't test you app though because no Mac version).


My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Andrzej Kilijański via Digitalmars-d-announce

Hi,

I was working on my first dlang/dlangui app and dlangui itself 
(as contributor and3md) for the last ten months.
Currently first version of my software is up:) It's simple 
project management tool. Anyone can check how dlangui can look 
like and the state of the project by checking it:


https://agilecommander.com/

I created my own theme, special for my app. I think dlangui is 
pretty usable. Last year many bugs was fixed. There is a lot of 
work to do but all basic stuff just work.


Working with dlang is very pleasure. I love D way of holding 
string encoding. I come to D from Pascal/Delphi world and I think 
D is first language that can be Pascal killer (fast compilation, 
fast native code, more readable, and don't have circular 
reference problem). We (dlang/dlangui) only need more success 
stories.


DlangUI can be found here:
https://github.com/buggins/dlangui


Re: Cannot initialize associative array

2018-01-21 Thread Jacob Carlborg via Digitalmars-d-learn

On 2018-01-20 00:16, rumbu wrote:
According to this 
(https://dlang.org/spec/hash-map.html#static_initialization) this is 
correct static initialization for AA:



immutable RoundingMode[string] ibmRounding =
[
     ">" : RoundingMode.towardPositive,
     "<" : RoundingMode.towardNegative,
     "0" : RoundingMode.towardZero,
     "=0": RoundingMode.tiesToEven,
     "=^": RoundingMode.tiesToAway
];


Error: non-constant expression `[">":cast(RoundingMode)2, 
"<":cast(RoundingMode)3, "0":cast(RoundingMode)4, 
"=0":cast(RoundingMode)0, "=^":cast(RoundingMode)1]`


RoundingMode is an enum.


An alternative to the shared module constructor is to declare it as an 
enum instead of immutable. But that will allocate a new associative 
array every time the enum is referenced.


enum a = [1: 2, 3: 4];

--
/Jacob Carlborg


Get largest heap object at runtime? ...tracking the leak

2018-01-21 Thread Andres Clari via Digitalmars-d-learn
Hi, is there any way to get from the GC all allocated objects, so 
I can see their size and find where I'm leaking memory? Or 
perhaps a good tool to help with this issue...


I tried building my program with "profile-gc" but I got an 
invalid MemoryOperationError with no stack trace... so no luck 
using that. And the leak is only obvious when running in 
production, where after 6 hours I've seen 1.5Gb of memory usage.


Right now, I'm able to extend the life of my program by injecting 
calls to:

GC.collect
GCminimize

Within an event that happens every 5 seconds, which I estimate 
will give me about a week before the program's memory is again at 
+1.5Gb.


Re: only want to start - TK programming in D with one code example. Linkingerror.

2018-01-21 Thread Cym13 via Digitalmars-d

On Sunday, 21 January 2018 at 15:58:55 UTC, MHE wrote:

Hi there,
i am completely new in D Programming and only want to start the 
example code for TK that is described on the homepage 
https://github.com/nomad-software/tkd.
For this i have gitcloned the 3 packages tcltk tkd x11 in the 
folder /usr/local/GIT/.
Then i run the command dub inside any single folder and build 
it.


[...]


Also, you might get more help posting this kind of questions in 
the Learn section of the forum in the future, General isn't the 
right place for those.


Re: only want to start - TK programming in D with one code example. Linkingerror.

2018-01-21 Thread Cym13 via Digitalmars-d

On Sunday, 21 January 2018 at 15:58:55 UTC, MHE wrote:

Hi there,
i am completely new in D Programming and only want to start the 
example code for TK that is described on the homepage 
https://github.com/nomad-software/tkd.
For this i have gitcloned the 3 packages tcltk tkd x11 in the 
folder /usr/local/GIT/.
Then i run the command dub inside any single folder and build 
it.


[...]


Does it compile correctly if built using `dub --config=example` 
as explained in TKD's Readme?




How do I solve this kind of conflict?

2018-01-21 Thread Marc via Digitalmars-d-learn
I was using a Sqlite3 library then I included another library 
that started the conflict. From what I could tell, it seems it's 
another Sqlite3 engine that the included library uses. The link 
error is:



.dub\build\application-debug-windows-x86-dmd_2076-E7D07B7BDA58325E30A3C637FC043AFE\foo.obj(ytdl)
  Offset BA31FH Record Type 00C3
Error 1: Previous Definition Different : _callback
Error: linker exited with status 1


My guess is it's symbols visibility issue? and how can I solve 
this?


But libraries has this defined:


extern(C) int callback(void*, int, char** , char**){


I've trid mark the one without private as such but it didn't 
change anything.


NOTE: Albeit I'm using dub, both those libraries were included 
directly (except the dependences of one of them).





only want to start - TK programming in D with one code example. Linkingerror.

2018-01-21 Thread MHE via Digitalmars-d

Hi there,
i am completely new in D Programming and only want to start the 
example code for TK that is described on the homepage 
https://github.com/nomad-software/tkd.
For this i have gitcloned the 3 packages tcltk tkd x11 in the 
folder /usr/local/GIT/.

Then i run the command dub inside any single folder and build it.

When i want to run the example TK D script the following results 
are seen -


$ dmd -I/usr/local/GIT/ hw_graphical2.d
hw_graphical2.d(1): Error: module tkdapplication is in file 
'tkd/tkdapplication.d' which cannot be read

import path[0] = /usr/local/GIT/
import path[1] = /usr/include/dmd/phobos
import path[2] = /usr/include/dmd/druntime/import
hans@mx1:~/Documents/D_lang
$

I have made something wrong with the configuration of the TKD 
module.

Need help here to start programming with D and TK.

WBR
MHE


Re: LDC 1.7.0

2018-01-21 Thread Johannes Loher via Digitalmars-d-announce

On Sunday, 21 January 2018 at 12:00:32 UTC, kinke wrote:
[...]


Please note that building a release package isn't identical to 
just build from source; there are subtle diffs and additional 
steps to be undertaken. I hope we get an ARM CI box soon and 
can automate the armhf package generation as well.


In the meantime, I started an LLVM 5.0.1 build in my qemu 
emulator 12 hours ago; one third has been compiled so far, so 
you may expect the armhf package to be available tomorrow or 
the day after that.


That is great news to me, thank you very much for your effort!



[Issue 18274] New: va_arg (TypeInfo) broken for static arrays

2018-01-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18274

  Issue ID: 18274
   Summary: va_arg (TypeInfo) broken for static arrays
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: johannesp...@gmail.com

This code is currently broken:

https://run.dlang.io/is/68hf1w
-
void foo(...)
{
uint[4] data;
va_arg(_argptr, _arguments[0], );
//data = va_arg!(uint[4])(_argptr);
writeln(data);
}

void main()
{
uint[4] value = [1, 2, 3, 4];
foo(value);
}
-
[4, 0, 3567405808, 32767]

The commented, static variant works. The problem is that DMD passes static
arrays as {.ptr, .length} slice with TypeInfo_Tuple for D variadic functions.
va_arg would have to detect this and instead of just copying the data it has to
dereference the pointer. I'm not sure if this is easily possible though: DMD
passes TypeInfo_Tuple instead of TypeInfo_StaticArray. Can TypeInfo_Tuple only
occur for static arrays? If so, fixing this is easy. If not, we have to pass
proper TypeInfo for static array parameters.

I don't know why we even do this, at least on AArch64 we can have much better
performance by just passing static arrays by value in the same way a struct
would be passed. Passing as ptr+length requires another special case in the
va_arg function for static arrays.

--


Re: -transition=safe and DIP1000

2018-01-21 Thread Carsten Blüggel via Digitalmars-d-learn

My understanding is, currently read DIP1000 as:
"NB: this DIP is out of sync with -dip1000 compiler switch 
implementation ...".


My own current problem fits well in this thread:

I want to push forward support of -dip1000 in phobos, testing 
each module's compatibility with -dip1000 individually and try to 
fix where required/possible.
There is https://github.com/dlang/phobos/blob/master/posix.mak, I 
added to my forks file:

DFLAGSSINGLE=$(DFLAGS) -dip1000
and fiddled to introduce DFLAGSSINGLE in the proper target, yet 
realizing, make/makefile and it's cryptic details knowledge 
largely left my brain.


Can anybody give me a hint, ideally introducing a target for that 
purpose, if required?

Invocation will be: make -f posix.mak std/somemodule.test   ?


Re: LDC 1.7.0

2018-01-21 Thread kinke via Digitalmars-d-announce

On Sunday, 21 January 2018 at 05:31:28 UTC, Joakim wrote:
On Sunday, 21 January 2018 at 04:45:49 UTC, Nicholas Wilson 
wrote:
On Saturday, 20 January 2018 at 15:19:13 UTC, Johannes Loher 
wrote:
Hey, thanks for your great work! Would it be possible to add 
a armhf build to the release? If you can not do it yourself, 
could you please point me to some resources where I can find 
out about how to create such a release build myself? Thank 
you!


See https://wiki.dlang.org/Building_LDC_from_source


You can also use the armhf build of ldc 1.6, even if just to 
build 1.7 yourself:


https://github.com/ldc-developers/ldc/releases/tag/v1.6.0


Please note that building a release package isn't identical to 
just build from source; there are subtle diffs and additional 
steps to be undertaken. I hope we get an ARM CI box soon and can 
automate the armhf package generation as well.


In the meantime, I started an LLVM 5.0.1 build in my qemu 
emulator 12 hours ago; one third has been compiled so far, so you 
may expect the armhf package to be available tomorrow or the day 
after that.


Re: -transition=safe and DIP1000

2018-01-21 Thread Carsten Blüggel via Digitalmars-d-learn

On Sunday, 21 January 2018 at 10:27:05 UTC, Mike Franklin wrote:

On Sunday, 21 January 2018 at 10:04:36 UTC, Mike Franklin wrote:

What is/was `transition=safe`?  I can't find any documentation 
on it.


Adding -transition=? to the dmd (v2.078.0) command line doesn't 
show safe listed.

My understanding is, currently read DIP1000 as:
"NB: this DIP is out of sync with -dip1000 compiler switch 
implementation ...".


Yes, the representation of DIP1000.md deserves improvement: It 
takes (too) much time to get a grip on it, maybe discouraging, 
though the idea itself is not that complicated as it is 
presented. I additionally warmly recommend Walter Bright's 
"Pointers Gone Wild: Memory Safety and D - Walter Bright | 
DConf2017" https://www.youtube.com/watch?v=iDFhvCkCLb4


Re: -transition=safe and DIP1000

2018-01-21 Thread Mike Franklin via Digitalmars-d-learn

On Sunday, 21 January 2018 at 10:04:36 UTC, Mike Franklin wrote:

What is/was `transition=safe`?  I can't find any documentation 
on it.


Well, I found 
http://forum.dlang.org/post/gquxgusfhyigirfpe...@forum.dlang.org


But, didn't really clear much up for me.



Re: -transition=safe and DIP1000

2018-01-21 Thread ketmar via Digitalmars-d-learn

Mike Franklin wrote:


And what does "NB" mean?

"nota bene". used as "pay attention to the following".


-transition=safe and DIP1000

2018-01-21 Thread Mike Franklin via Digitalmars-d-learn
I found the following statement in the DIP1000 document 
(https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md)


NB: this DIP is out of sync with -transition=safe 
implementation available in dmd and pending a rewrite. Most key 
points still apply though.


What is/was `transition=safe`?  I can't find any documentation on 
it.


And what does "NB" mean?

Thanks,
Mike