Re: Efficient sort function allowing own test and swap function as parameter

2020-10-06 Thread Ali Çehreli via Digitalmars-d-learn
On 10/6/20 3:18 PM, Alaindevos wrote: I have a large table consisting of two columns.One with words.Another with frequencies. I want to sort them efficiently according to the names or frequency. For this I need an efficient sort function where I can plugin my proper test of order, and proper

Re: Efficient sort function allowing own test and swap function as parameter

2020-10-06 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Oct 06, 2020 at 10:18:39PM +, Alaindevos via Digitalmars-d-learn wrote: > I have a large table consisting of two columns.One with words.Another > with frequencies. I want to sort them efficiently according to the > names or frequency. > For this I need an efficient sort function where

Efficient sort function allowing own test and swap function as parameter

2020-10-06 Thread Alaindevos via Digitalmars-d-learn
I have a large table consisting of two columns.One with words.Another with frequencies. I want to sort them efficiently according to the names or frequency. For this I need an efficient sort function where I can plugin my proper test of order, and proper swap. Currently I do it using an own

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Johan via Digitalmars-d-learn
On Tuesday, 6 October 2020 at 18:24:14 UTC, Alaindevos wrote: There are two subtractions possible. A machine-one which can be architecture dependent, does not have the same results on all computers, and behaves like a modulus in mathematics. A logical one. For the last one higher classes

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread ikod via Digitalmars-d-learn
On Tuesday, 6 October 2020 at 18:24:14 UTC, Alaindevos wrote: There are two subtractions possible. A machine-one which can be architecture dependent, does not have the same results on all computers, and behaves like a modulus in mathematics. A logical one. For the last one higher classes

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Alaindevos via Digitalmars-d-learn
There are two subtractions possible. A machine-one which can be architecture dependent, does not have the same results on all computers, and behaves like a modulus in mathematics. A logical one. For the last one higher classes might be needed.

Re: Link Time Optimization Bitcode File Format

2020-10-06 Thread kinke via Digitalmars-d-learn
On Tuesday, 6 October 2020 at 16:46:28 UTC, Severin Teona wrote: Also, when I try to link the druntime with the application I want to write on the microcontroller, there are some link errors due to the file format. This happens when you link manually, not through LDC. When running LDC with

Re: Link Time Optimization Bitcode File Format

2020-10-06 Thread IGotD- via Digitalmars-d-learn
On Tuesday, 6 October 2020 at 16:46:28 UTC, Severin Teona wrote: Hi all, I am trying to build the druntime with the 'ldc-build-runtime' tool for microcontrollers (using the arm-none-eabi-gcc compiler) and therefore the size of the druntime should be as little as possible. One solution I had

Link Time Optimization Bitcode File Format

2020-10-06 Thread Severin Teona via Digitalmars-d-learn
Hi all, I am trying to build the druntime with the 'ldc-build-runtime' tool for microcontrollers (using the arm-none-eabi-gcc compiler) and therefore the size of the druntime should be as little as possible. One solution I had was to use Link Time Optimization (LTO) to reduce the size. The

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Ali Çehreli via Digitalmars-d-learn
On 10/6/20 5:24 AM, Alaindevos wrote: Is that the expected behavior of the programmer? Opinions can differ. Feel free to elaborate. The following is even more "expected". ;) Subtract zero from -1 and you get size_t.max. void main() { int[] arr; int i = -1; auto u = (i - arr.length);

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 6 October 2020 at 12:24:56 UTC, Alaindevos wrote: Is that the expected behavior of the programmer? Opinions can differ. Feel free to elaborate. It's expected behavior: "If both operands are of integral types and an overflow or underflow occurs in the computation, wrapping will

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Imperatorn via Digitalmars-d-learn
On Tuesday, 6 October 2020 at 12:24:56 UTC, Alaindevos wrote: Is that the expected behavior of the programmer? Opinions can differ. Feel free to elaborate. Elaborate please. Are you really asking if one can do subtraction in D.

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Alaindevos via Digitalmars-d-learn
On Tuesday, 6 October 2020 at 12:24:56 UTC, Alaindevos wrote: Is that the expected behavior of the programmer? Opinions can differ. Feel free to elaborate. E.g. length of a string unsigned long.

It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Alaindevos via Digitalmars-d-learn
Is that the expected behavior of the programmer? Opinions can differ. Feel free to elaborate.

Re: vibe.d / experience / feedback

2020-10-06 Thread ddcovery via Digitalmars-d-learn
On Thursday, 1 October 2020 at 06:32:23 UTC, Robert M. Münch wrote: Hi, we are currently using vibe.d for a prototype and I want to post some experiences. I know one shouldn't only address the problems but provide some solutions. However, our current use-case is that we want to get a job

Re: vibe.d / experience / feedback

2020-10-06 Thread Arun via Digitalmars-d-learn
On Thursday, 1 October 2020 at 06:32:23 UTC, Robert M. Münch wrote: Hi, we are currently using vibe.d for a prototype and I want to post some experiences. I know one shouldn't only address the problems but provide some solutions. However, our current use-case is that we want to get a job