On Friday, 21 February 2020 at 08:51:49 UTC, Andre Pany wrote:
Hi,
I have a 2D double array and I want to subtract from the first
column a value,
is this possible with matrix operation in D?
```
void main()
{
double[][] data = [[0.0, 1.4], [1.0, 5.2], [2.0, 0.8]];
// subtract -2.0 fr
The issue is that strings aren't input ranges in betterC [1],
due to autodecoding.
Normally you'd work around this using std.utf.byCodeUnit, but
that's currently broken, because std.utf attempts to import
core.exception.UnicodeException from druntime at module scope
[2], causing any betterC p
On Saturday, 22 February 2020 at 02:01:25 UTC, SrMordred wrote:
//-betterC
import core.stdc.stdio;
import std.algorithm;
void main(){
printf( "%d\n",startsWith("a","b") );
}
//Fails to compile with betterC, dmd/ldc2 last versions.
Any reason for not work with betterC or should i file the i
//-betterC
import core.stdc.stdio;
import std.algorithm;
void main(){
printf( "%d\n",startsWith("a","b") );
}
//Fails to compile with betterC, dmd/ldc2 last versions.
Any reason for not work with betterC or should i file the issue ?
(Find this on a bindbc lib, so i think that it may have wo
On Friday, 21 February 2020 at 14:43:37 UTC, jmh530 wrote:
[snip]
Actually, I kind of prefer the relevant line as
x.byDim!1[0].each!"a -= 2";
which makes it a little clearer that you can easily change [0] to
[1] to apply each to the second column instead.
On Thursday, 20 February 2020 at 17:41:54 UTC, Dennis wrote:
On Tuesday, 18 February 2020 at 17:11:55 UTC, Marcel wrote:
Say I have a struct where every member function can either be
static or not depending on a template parameter. Is there a
simple way to do this?
The best I can think of is:
On Friday, 21 February 2020 at 01:41:21 UTC, Steven Schveighoffer
wrote:
On 2/18/20 12:11 PM, Marcel wrote:
Hello!
Say I have a struct where every member function can either be
static or not depending on a template parameter. Is there a
simple way to do this? Like, for example:
struct Foo(C
On 2/21/20 5:15 AM, drug wrote:
Currently this code does not compiles:
```
unittest
{
class MyClass
{
T opCall(T)(T p)
{
return p;
}
}
import std.container.array : Array;
Array!MyClass arr;
}
```
but if you comment out `opCall` in
On Friday, 21 February 2020 at 11:53:02 UTC, Ali Çehreli wrote:
[snip]
auto byColumn(R)(R range, size_t n) {
return Column!R(range, n);
}
mir has byDim for something similar (numir also has alongDim).
This is how you would do it:
import mir.ndslice;
void main() {
auto x = [0.0, 1.4, 1.
On Friday, 21 February 2020 at 11:53:02 UTC, Ali Çehreli wrote:
On 2/21/20 12:51 AM, Andre Pany wrote:
Hi,
I have a 2D double array and I want to subtract from the first
column a value,
is this possible with matrix operation in D?
```
void main()
{
double[][] data = [[0.0, 1.4], [1.0, 5
Thanks for your question, it led me to focus on the Label and now
I've solved the problem.
I thought that onChangeState was never called before the Label
was constructed, but it turns out it is called before. So now I
use:
if (statusLabel !is null)
statusLabel.setText(mes
On 2/21/20 12:51 AM, Andre Pany wrote:
Hi,
I have a 2D double array and I want to subtract from the first column a
value,
is this possible with matrix operation in D?
```
void main()
{
double[][] data = [[0.0, 1.4], [1.0, 5.2], [2.0, 0.8]];
// subtract -2.0 from the first column fo
On Friday, 21 February 2020 at 09:03:26 UTC, Abby wrote:
On Monday, 17 February 2020 at 19:02:50 UTC, Stefan Koch wrote:
Sorry I just realized I never published the code.
I am going to add it to ctfeutils.
Hi Stefan,
I'm sorry to bother you, I just wanted to kindly ask if you
would upload the
Currently this code does not compiles:
```
unittest
{
class MyClass
{
T opCall(T)(T p)
{
return p;
}
}
import std.container.array : Array;
Array!MyClass arr;
}
```
but if you comment out `opCall` in MyClass this code compiles. This is
caus
Thanks all, much appreciated!
On Friday, 21 February 2020 at 08:55:43 UTC, mark wrote:
statusLabel.setText(message); // BUG
Where is statusLabel instantiated?
Other than that, I see nothing wrong here.
On Monday, 17 February 2020 at 19:02:50 UTC, Stefan Koch wrote:
Sorry I just realized I never published the code.
I am going to add it to ctfeutils.
Hi Stefan,
I'm sorry to bother you, I just wanted to kindly ask if you would
upload the formatter to ctfeutils on github it would help me alot.
I'm porting a simple game to GtkD to learn the library and more
about D.
Unfortunately, I've hit a show-stopping crash.
I have a subclass of ApplicationWindow which has this method:
private void onChangeState(int score, Board.State state) {
import std.format: format;
strin
Hi,
I have a 2D double array and I want to subtract from the first
column a value,
is this possible with matrix operation in D?
```
void main()
{
double[][] data = [[0.0, 1.4], [1.0, 5.2], [2.0, 0.8]];
// subtract -2.0 from the first column for every value
// Expected output
19 matches
Mail list logo