On Sunday, 21 February 2021 at 16:18:05 UTC, Kyle Ingraham wrote:
I am trying to convert sRGB pixel values to XYZ with mir using
the following guide:
http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
[...]
mir-glas is deprecated experimental project. It is worth use
mir-blas
On Monday, 22 February 2021 at 02:39:58 UTC, Steven Schveighoffer
wrote:
On 2/21/21 9:29 PM, Preetpal wrote:
I want to restrict a D application to a single instance. Is
there a way to do this using the D standard library?
When you say "application", you mean a class or type?
I decided to im
On Monday, 22 February 2021 at 02:39:58 UTC, Steven Schveighoffer
wrote:
On 2/21/21 9:29 PM, Preetpal wrote:
I want to restrict a D application to a single instance. Is
there a way to do this using the D standard library?
When you say "application", you mean a class or type?
I actually meant
On 2/21/21 9:29 PM, Preetpal wrote:
I want to restrict a D application to a single instance. Is there a way
to do this using the D standard library?
When you say "application", you mean a class or type?
If so, you can do this:
class C
{
private this() { /*ctor code for single instance */ }
I want to restrict a D application to a single instance. Is there
a way to do this using the D standard library?
I know this can be done using named mutexes on Windows using
Windows-specific APIs but I want to avoid this in general because
I want to port the code to FreeBSD without introducing
On 2/20/21 6:39 PM, kinke wrote:
On Saturday, 20 February 2021 at 18:43:53 UTC, Steven Schveighoffer wrote:
Last I checked*, the GC uses pools of 16-byte, 32-byte, 64-byte, etc
blocks.
That has changed [to reduce wastage]; the new bin sizes are here and
include sizes like 176 (11*16):
https:
On Sunday, 21 February 2021 at 21:03:27 UTC, Jack wrote:
Why doesn't this compiles?
class Baa
{
Foo Foo = new Foo();
}
Local variables inside functions are a little bit special because
everything happens in sequence. This is a declaration, where
there is a new namespace, but order do
Why doesn't this compiles?
class Baa
{
Foo Foo = new Foo();
}
On Sunday, 21 February 2021 at 09:30:14 UTC, Jacob Carlborg wrote:
On 2021-02-21 07:12, Jack wrote:
I've had a struct like this:
struct Attr
{
string value;
}
struct Foo
{
@(Attr("a attr"))
enum a = Foo(10);
@(Attr("b attr"))
enum b = Foo(11);
int x;
int y
On Sunday, 21 February 2021 at 18:15:22 UTC, JN wrote:
I guess D is smart enough to figure out which is a type and
which is a variable. C++ gets confused in similar situation.
Well it isn't about type vs variable (except for in this exact
declaration), it is just one is defined at top level an
On Sunday, 21 February 2021 at 18:09:29 UTC, FeepingCreature
wrote:
On Sunday, 21 February 2021 at 18:07:49 UTC, JN wrote:
class Foo
{
}
void main()
{
Foo Foo = new Foo();
}
this kind of code compiles. Is this expected to compile?
Yes, why wouldn't it? main is a different scope than glob
On Sunday, 21 February 2021 at 17:17:56 UTC, Marcone wrote:
ZipArchive zip = new ZipArchive();
std.file.write("foo.zip", zip.build());
ArchiveMember f = new ArchiveMember();
f.name = "Wallpaper_001.png";
zip.addMember(f);
std.file.write("f
On Sunday, 21 February 2021 at 18:07:49 UTC, JN wrote:
class Foo
{
}
void main()
{
Foo Foo = new Foo();
}
this kind of code compiles. Is this expected to compile?
Yes, why wouldn't it? main is a different scope than global; you
can override identifiers from global in main. And "Foo" only
class Foo
{
}
void main()
{
Foo Foo = new Foo();
}
this kind of code compiles. Is this expected to compile?
ZipArchive zip = new ZipArchive();
std.file.write("foo.zip", zip.build());
ArchiveMember f = new ArchiveMember();
f.name = "Wallpaper_001.png";
zip.addMember(f);
std.file.write("foo.zip", zip.build());
File is added with file size 0.
How c
I am trying to convert sRGB pixel values to XYZ with mir using
the following guide:
http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
My problem is that I cannot figure out how to calculate a dot
product using mir. Here is my code:
import std.stdio;
import mir.glas.l1 : dot;
On Sunday, 21 February 2021 at 12:47:46 UTC, Boris Carvajal wrote:
On Sunday, 21 February 2021 at 11:58:11 UTC, Marcone wrote:
import std;
void foo(T)(T bar){
static if (bar.isiterable()) // Need Somethin to check if bar
is iterable.
{
// Execute it if bar is iterable
On Sunday, 21 February 2021 at 11:58:11 UTC, Marcone wrote:
import std;
void foo(T)(T bar){
static if (bar.isiterable()) // Need Somethin to check if bar
is iterable.
{
// Execute it if bar is iterable.
foreach (i; bar)
{
import std;
void foo(T)(T bar){
static if (bar.isiterable()) // Need Somethin to check if bar is
iterable.
{
// Execute it if bar is iterable.
foreach (i; bar)
{
}
}
else {
// Execute it if
On 2021-02-21 07:12, Jack wrote:
I've had a struct like this:
struct Attr
{
string value;
}
struct Foo
{
@(Attr("a attr"))
enum a = Foo(10);
@(Attr("b attr"))
enum b = Foo(11);
int x;
int y;
bool doY = true;
int value()
{
return x;
20 matches
Mail list logo