Re: RFC: generic safety, specialized implementation?

2018-01-19 Thread Timothee Cour via Digitalmars-d
this is very related to ICF (identical code folding), which some linkers do. in summary: gold and lld have options to do that, and it can be unsafe to do if code relies on each function having distinct address; > gold's --icf=safe option only enables ICF for functions that can be proven > not to

OT: Indexing reordering in the eBay Search Engine

2018-01-19 Thread Jon Degenhardt via Digitalmars-d
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

Re: Tail Const (Was: I closed a very old bug!)

2018-01-19 Thread Simen Kjærås via Digitalmars-d
On Thursday, 18 January 2018 at 09:15:04 UTC, Simen Kjærås wrote: At any rate, this is a topic for a DIP. So, a few more thoughts on this: Arrays and pointers automatically decay to their Unqual'ed variants when passed to a templated function. AAs do not, which makes sense given their refere

Re: D client for ROS

2018-01-19 Thread ashit axar via Digitalmars-d
On Saturday, 29 July 2017 at 10:21:32 UTC, Johan Engelen wrote: Hi all, Are there any robot folks out here here i am :) that are working with ROS i made things like CNC-Milling machine, wheat mill with controller board, and ... but i didn't done such a complex project that i need to use

Re: How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

2018-01-19 Thread Steven Schveighoffer via Digitalmars-d
On 1/19/18 2:48 PM, 12345swordy wrote: I see, this does look like it needs a DIP in order to fix this. How the progress of the calls being replaced by templates by Andrei and company? Here are the improvements that Lucia is doing/has done, which is a lot of good stuff: https://github.com/dla

Re: How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

2018-01-19 Thread Basile B. via Digitalmars-d
On Friday, 19 January 2018 at 17:01:50 UTC, 12345swordy wrote: On Friday, 19 January 2018 at 16:18:15 UTC, Basile B. wrote: this problem can't be fixed. You need to specify, do you mean this can't be fixed without a DIP or even with a DIP? I meant: at all. But i'd like to be wrong.

Re: How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

2018-01-19 Thread 12345swordy via Digitalmars-d
On Friday, 19 January 2018 at 18:22:33 UTC, Steven Schveighoffer wrote: On 1/19/18 10:56 AM, 12345swordy wrote: I can't find any documentation nor can I find any information regarding it's implementation. I am asking this, as I focusing on fixing bugs that destroy currently has, most noticeably

Re: Proposed Phobos equivalent of wcswidth()

2018-01-19 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 18, 2018 at 06:42:26PM +, Dmitry Olshansky via Digitalmars-d wrote: [...] > Also forgot to mention that can pass BitPacked!(ubyte,2) to Trie > template as value type to use 2 bit per value. Should reduce your > width table 4-fold. Just saying;) Thanks for the tip! Indeed, the ta

Re: RFC: generic safety, specialized implementation?

2018-01-19 Thread H. S. Teoh via Digitalmars-d
On Fri, Jan 19, 2018 at 07:18:22PM +, Luís Marques via Digitalmars-d wrote: [...] > void combulate(T)(T* item) > { > // ... lots of code here > item.next = ...; > } [...] [...] > This catches the bug, but will have the disadvantage of generating > code for the variou

Re: RFC: generic safety, specialized implementation?

2018-01-19 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 19 January 2018 at 19:18:22 UTC, Luís Marques wrote: So far this seems to be working well for me. Do you have experience writing this kind of code? Do you have any advice that might be relevant to this situation? This is actually the way a lot of stuff is implemented in d runtime c

RFC: generic safety, specialized implementation?

2018-01-19 Thread Luís Marques via Digitalmars-d
Consider some C code like this: struct Foo { struct Foo *next; int bar; }; struct Bar { struct Bar *next; char* name; }; struct Unrelated { int x; int y; }; void combulate(void *item) { struct I

Re: gRPC in D good idea for GSOC 2018?

2018-01-19 Thread Ali Çehreli via Digitalmars-d
On 01/19/2018 02:14 AM, yawniek wrote: > Just look how > beautiful Golangs protocol implementations are and the whole ecosystem > that focused effort spawned. I agree and do have first-hand experience with that but I'm not experienced enough in this field to come up with a modern solution. If

Re: How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

2018-01-19 Thread Steven Schveighoffer via Digitalmars-d
On 1/19/18 10:56 AM, 12345swordy wrote: I can't find any documentation nor can I find any information regarding it's implementation. I am asking this, as I focusing on fixing bugs that destroy currently has, most noticeably bugs regarding attributes. I am not sure that this requires a DIP in or

Re: How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

2018-01-19 Thread 12345swordy via Digitalmars-d
On Friday, 19 January 2018 at 16:18:15 UTC, Basile B. wrote: this problem can't be fixed. You need to specify, do you mean this can't be fixed without a DIP or even with a DIP?

Re: How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

2018-01-19 Thread Seb via Digitalmars-d
On Friday, 19 January 2018 at 15:56:58 UTC, 12345swordy wrote: I can't find any documentation nor can I find any information regarding it's implementation. I am asking this, as I focusing on fixing bugs that destroy currently has, most noticeably bugs regarding attributes. I am not sure that th

Re: How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

2018-01-19 Thread Basile B. via Digitalmars-d
On Friday, 19 January 2018 at 15:56:58 UTC, 12345swordy wrote: I can't find any documentation nor can I find any information regarding it's implementation. I am asking this, as I focusing on fixing bugs that destroy currently has, most noticeably bugs regarding attributes. I am not sure that th

Re: So what is the state of cross-compilation in D?

2018-01-19 Thread Kagamin via Digitalmars-d
On Friday, 19 January 2018 at 06:53:16 UTC, Rel wrote: As far as I understand I will need a C toolchain that allows cross-compilation to target OS in order to build runtime libraries, is it correct? If you're going to compile the compiler, LLVM is written in C++, so you would have the C toolch

How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

2018-01-19 Thread 12345swordy via Digitalmars-d
I can't find any documentation nor can I find any information regarding it's implementation. I am asking this, as I focusing on fixing bugs that destroy currently has, most noticeably bugs regarding attributes. I am not sure that this requires a DIP in order to fix this. https://issues.dlang.

Re: So what is the state of cross-compilation in D?

2018-01-19 Thread Joakim via Digitalmars-d
On Friday, 19 January 2018 at 08:08:42 UTC, Jonathan M Davis wrote: On Friday, January 19, 2018 06:53:16 Rel via Digitalmars-d wrote: On Wednesday, 17 January 2018 at 12:31:35 UTC, Kagamin wrote: > https://wiki.dlang.org/Build_D_for_Android > https://wiki.dlang.org/Building_LDC_runtime_librarie

Recognize point clouds

2018-01-19 Thread Leviya Bl via Digitalmars-d
Hi folks, I am trying to recognize point clouds, like people, cars, vans. I already have them separated into clusters. I have tried PCL recognition tutorials but are not giving me good results,it relies too much in correspondence grouping. is there some kind of neural network with point

Re: So what is the state of cross-compilation in D?

2018-01-19 Thread rikki cattermole via Digitalmars-d
On 19/01/2018 8:08 AM, Jonathan M Davis wrote: On Friday, January 19, 2018 06:53:16 Rel via Digitalmars-d wrote: On Wednesday, 17 January 2018 at 12:31:35 UTC, Kagamin wrote: https://wiki.dlang.org/Build_D_for_Android https://wiki.dlang.org/Building_LDC_runtime_libraries https://github.com/ldc-

Re: __ARGS__ : allow access to (stringified) arguments, as C's `#arg` macro

2018-01-19 Thread Simen Kjærås via Digitalmars-d
On Friday, 19 January 2018 at 08:51:00 UTC, Jacob Carlborg wrote: Not sure I understand this feature. Is it something like: auto foo = 3; auto bar = 4; log(foo, bar); Would print? main.d:3 foo=3 main.d:3 bar=4 If that's the case then this seems like yet another hack because we don't have AST

Re: __ARGS__ : allow access to (stringified) arguments, as C's `#arg` macro

2018-01-19 Thread Timothee Cour via Digitalmars-d
> Not sure I understand this feature. Is it something like: > > auto foo = 3; > auto bar = 4; > log(foo, bar); > > Would print? > > main.d:3 foo=3 > main.d:3 bar=4 main.d:3 foo=3, bar=4 (or whatever formatting is applied given supplied stringiified arguments, that's irrelevant as it can be customi

Re: gRPC in D good idea for GSOC 2018?

2018-01-19 Thread yawniek 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

Re: So what is the state of cross-compilation in D?

2018-01-19 Thread Jacob Carlborg via Digitalmars-d
On 2018-01-19 07:53, Rel wrote: I'd like to cross-compile from Windows machine to Linux and Mac OSX. Where can I get C toolchain that will allow me to cross-compile D's runtime libraries from Windows to Linux and Mac OSX? Here's a Dockerfile that cross-compiles to macOS: https://github.com/ja

Re: __ARGS__ : allow access to (stringified) arguments, as C's `#arg` macro

2018-01-19 Thread Jacob Carlborg via Digitalmars-d
On 2018-01-18 00:13, Timothee Cour wrote: I wrote something like that to mimic C's `#arg` preprocessor (stringify argument) for debugging functions, eg: ``` // simplified here: void log(string file=__FILE__, int line=__LINE__, T) (T a){ enum arg_stringified=import(file)[line]; // more comple

Re: So what is the state of cross-compilation in D?

2018-01-19 Thread Jonathan M Davis via Digitalmars-d
On Friday, January 19, 2018 06:53:16 Rel via Digitalmars-d wrote: > On Wednesday, 17 January 2018 at 12:31:35 UTC, Kagamin wrote: > > https://wiki.dlang.org/Build_D_for_Android > > https://wiki.dlang.org/Building_LDC_runtime_libraries > > https://github.com/ldc-developers/ldc/pull/2142#issuecomment