### Re: D on ARM laptops?

On Thursday, July 4, 2019 2:49:18 AM MDT zoujiaqing via Digitalmars-d-learn wrote: > On Thursday, 4 July 2019 at 07:46:53 UTC, Paolo Invernizzi wrote: > > On Thursday, 4 July 2019 at 01:01:03 UTC, Nicholas Wilson wrote: > >> On Wednesday, 3 July 2019 at 20:49:20 UTC, JN wrote: > >>> Does anyone

### Re: Finding Max Value of Column in Multi-Dimesional Array

On Friday, 5 July 2019 at 00:54:15 UTC, Samir wrote: Is there a cleaner way of finding the maximum value of say the third column in a multi-dimensional array than this? int[][] p = [[1,2,3,4], [9,0,5,4], [0,6,2,1]]; writeln([p[0][2], p[1][2], p[2][2]].max); I've tried the following writeln([0,

### Re: Finding Max Value of Column in Multi-Dimesional Array

On Friday, 5 July 2019 at 00:54:15 UTC, Samir wrote: Is there a cleaner way of finding the maximum value of say the third column in a multi-dimensional array than this? int[][] p = [[1,2,3,4], [9,0,5,4], [0,6,2,1]]; writeln([p[0][2], p[1][2], p[2][2]].max); I've tried the following writeln([0,

### Finding Max Value of Column in Multi-Dimesional Array

Is there a cleaner way of finding the maximum value of say the third column in a multi-dimensional array than this? int[][] p = [[1,2,3,4], [9,0,5,4], [0,6,2,1]]; writeln([p[0][2], p[1][2], p[2][2]].max); I've tried the following writeln([0, 1, 2].map!(p[a][2]).max); but get an "Error:

### Re: Anyway to compare function aliases? Or any ideas?

On Thursday, 4 July 2019 at 15:22:08 UTC, Marco de Wild wrote: On Thursday, 4 July 2019 at 15:10:05 UTC, aliak wrote: [...] I don't know if it will solve your whole problem, but have you tried __traits(isSame, W0.fun, fun)? Reduced example: struct Foo(alias fun){ alias bar = fun; }

### Re: For loop with separator

On Thursday, 4 July 2019 at 17:00:33 UTC, Q. Schroll wrote: Probably you've come over this problem once in a while, too. You have a repeating solution, so you use a for(each) loop. Sometimes, there is an action to be performed between the end of one iteration and the beginning of the next, if

### For loop with separator

Probably you've come over this problem once in a while, too. You have a repeating solution, so you use a for(each) loop. Sometimes, there is an action to be performed between the end of one iteration and the beginning of the next, if there is one. The prime example is printing the comma when

### Re: Anyway to compare function aliases? Or any ideas?

On Thursday, 4 July 2019 at 15:10:05 UTC, aliak wrote: Any ideas on how to be able to do something like this? struct S(alias _fun) { alias Fun = _fun; } void algorithm(alias f, T)(T s) { static if ( == ) { // trivial return } else { // must perform work, then return } } Can

### Anyway to compare function aliases? Or any ideas?

Any ideas on how to be able to do something like this? struct S(alias _fun) { alias Fun = _fun; } void algorithm(alias f, T)(T s) { static if ( == ) { // trivial return } else { // must perform work, then return } } Can you use function addresses in some way? I've seen that

### Re: Why are immutable array literals heap allocated?

On Thursday, 4 July 2019 at 10:56:50 UTC, Nick Treleaven wrote: immutable(int[]) f() @nogc { return [1,2]; } onlineapp.d(2): Error: array literal in `@nogc` function `onlineapp.f` may cause a GC allocation specify the size of the static array: immutable(int[ 2 /*HERE*/ ]) f() @nogc {

### Re: Why are immutable array literals heap allocated?

On Thursday, 4 July 2019 at 10:56:50 UTC, Nick Treleaven wrote: immutable(int[]) f() @nogc { return [1,2]; } onlineapp.d(2): Error: array literal in `@nogc` function `onlineapp.f` may cause a GC allocation This makes dynamic array literals unusable with @nogc, and adds to GC pressure

### Why are immutable array literals heap allocated?

immutable(int[]) f() @nogc { return [1,2]; } onlineapp.d(2): Error: array literal in `@nogc` function `onlineapp.f` may cause a GC allocation This makes dynamic array literals unusable with @nogc, and adds to GC pressure for no reason. What code would break if dmd used only static data

### Re: Associative Array & different template types

On 2019-07-03 19:07:10 +, ag0aep6g said: On 03.07.19 20:20, Robert M. Münch wrote: So, I need to carry around the object from which a delegate was created from because it's not possible to query the delegate for the object later somewhere else in the code. It is possible to get the

### Re: Blog Post #0048: Model, View, Controller

On Wednesday, 3 July 2019 at 17:12:04 UTC, lpcvoid wrote: Thanks for the time you invest in this. You're welcome. Tell your friends. :)

### Re: D on ARM laptops?

On Thursday, 4 July 2019 at 07:46:53 UTC, Paolo Invernizzi wrote: On Thursday, 4 July 2019 at 01:01:03 UTC, Nicholas Wilson wrote: On Wednesday, 3 July 2019 at 20:49:20 UTC, JN wrote: Does anyone know if and how well D works on ARM laptops (such as Chromebooks and similar)? For example this

### Re: D on ARM laptops?

On Thursday, 4 July 2019 at 01:01:03 UTC, Nicholas Wilson wrote: On Wednesday, 3 July 2019 at 20:49:20 UTC, JN wrote: Does anyone know if and how well D works on ARM laptops (such as Chromebooks and similar)? For example this one https://www.pine64.org/pinebook/ . Can it compile D? Obviously