auto vectorization notes

2020-03-23 Thread Bruce Carneal via Digitalmars-d-learn
When speeds are equivalent, or very close, I usually prefer auto vectorized code to explicit SIMD/__vector code as it's easier to read. (on the downside you have to guard against compiler code-gen performance regressions) One oddity I've noticed is that I sometimes need to use

Re: Where is the latest android dev info?

2020-03-23 Thread Adam D. Ruppe via Digitalmars-d-learn
My thingy can help https://github.com/adamdruppe/d_android a lot is built into ldc now too which is really nice as well. i need to update my repo to use the new ldc features, hoping to tomorrow. i'm just behind on a lot of things lol

Re: Swedish letters fuck up parsing into SQL querry

2020-03-23 Thread Anders S via Digitalmars-d-learn
On Monday, 23 March 2020 at 15:07:31 UTC, Adam D. Ruppe wrote: On Monday, 23 March 2020 at 14:26:46 UTC, Anders S wrote: do you mean I should loop through each pos till strlen(cellTab[CellIndex].name) to find "\0"? strlen is ok, that gives the answer itself. Just slice to that.

Re: Swedish letters fuck up parsing into SQL querry

2020-03-23 Thread Anders S via Digitalmars-d-learn
On Monday, 23 March 2020 at 14:58:03 UTC, bauss wrote: On Monday, 23 March 2020 at 14:26:46 UTC, Anders S wrote: On Monday, 23 March 2020 at 13:53:50 UTC, Adam D. Ruppe wrote: My first thought is to!string(cellTab[CellIndex].name) is wrong, if it is a char[20] you should be scanning it to find

Re: Swedish letters fuck up parsing into SQL querry

2020-03-23 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 23 March 2020 at 14:26:46 UTC, Anders S wrote: do you mean I should loop through each pos till strlen(cellTab[CellIndex].name) to find "\0"? strlen is ok, that gives the answer itself. Just slice to that. cellTab[CellIndex].name[0 .. strlen(cellTab[CellIndex].name.ptr)] could do

Re: Swedish letters fuck up parsing into SQL querry

2020-03-23 Thread bauss via Digitalmars-d-learn
On Monday, 23 March 2020 at 14:26:46 UTC, Anders S wrote: On Monday, 23 March 2020 at 13:53:50 UTC, Adam D. Ruppe wrote: My first thought is to!string(cellTab[CellIndex].name) is wrong, if it is a char[20] you should be scanning it to find the length and slicing. Maybe [0 ..

Re: Swedish letters fuck up parsing into SQL querry

2020-03-23 Thread Anders S via Digitalmars-d-learn
On Monday, 23 March 2020 at 13:53:50 UTC, Adam D. Ruppe wrote: My first thought is to!string(cellTab[CellIndex].name) is wrong, if it is a char[20] you should be scanning it to find the length and slicing. Maybe [0 .. name.indexOf("\0")] or whatever. You also shouldn't be building a query by

Re: Swedish letters fuck up parsing into SQL querry

2020-03-23 Thread Adam D. Ruppe via Digitalmars-d-learn
My first thought is to!string(cellTab[CellIndex].name) is wrong, if it is a char[20] you should be scanning it to find the length and slicing. Maybe [0 .. name.indexOf("\0")] or whatever. You also shouldn't be building a query by concatenation.

Swedish letters fuck up parsing into SQL querry

2020-03-23 Thread Anders S via Digitalmars-d-learn
Hi guys, I'm trying to read a name from a struct iorequest where the name is char name[20] The struct is received through a FIFO pipe and message is going into a mysql database to update specific post there. Now my problem is that all works fine to read and stop with '\0' termination till

Re: linking obj files compiled with LDC2 1.20.0 on Win64

2020-03-23 Thread realhet via Digitalmars-d-learn
On Sunday, 22 March 2020 at 20:20:17 UTC, Steven Schveighoffer wrote: Make sure you don't have any stale objects left over in your project from the older build. Build everything clean from scratch. -Steve Thx, I double checked this. Then I attempted to link from the commandline and it

Re: Wired question related with Chinese characters

2020-03-23 Thread walker via Digitalmars-d-learn
On Monday, 23 March 2020 at 01:40:16 UTC, Adam D. Ruppe wrote: Terminal.getline *might* work in my lib, but if there's combining codepoints I'm not sure. You can try it though and let me know if you are already using the lib. I have done a small test and It works. Thank you!

Where is the latest android dev info?

2020-03-23 Thread BetaDamnit via Digitalmars-d-learn
See Title!

Re: assert expression in release mode

2020-03-23 Thread drug via Digitalmars-d-learn
On 3/23/20 2:14 PM, Steven Schveighoffer wrote: E.g. https://dlang.org/dmd-osx.html#switch-release There are also other switches like -boundscheck and -check. It’s possible you have some library or project that is causing the behavior. -Steve Thank you, Steve. In my case I guess it was

Re: assert expression in release mode

2020-03-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On Monday, 23 March 2020 at 10:08:58 UTC, drug wrote: Before I lived in assurance that asserts are actual only in debug mode and in release mode they are nothing (except `assert(0)`). But today my whole life is going sour because I stumbled upon assert in release mode and of course that assert

assert expression in release mode

2020-03-23 Thread drug via Digitalmars-d-learn
Before I lived in assurance that asserts are actual only in debug mode and in release mode they are nothing (except `assert(0)`). But today my whole life is going sour because I stumbled upon assert in release mode and of course that assert is failing. This doc