On Wednesday, 28 December 2016 at 08:27:29 UTC, abad wrote:
On Wednesday, 28 December 2016 at 08:10:41 UTC, Nemanja Boric
wrote:
On Wednesday, 28 December 2016 at 05:09:34 UTC, LeqxLeqx wrote:
Perhaps this is a stupid question, and I apologize if it is,
but why doesn't this compile:
import
I've recently been attempting to detect whether or not stdin
would block a read if I tried. I have attempted to use the
/core/sys/posix/poll.d but that seems to be always returning '1'
whether or not stdin has anything on it, whereas for the
corresponding program written in C, it will return 1
On Friday, 23 December 2016 at 12:51:29 UTC, Nemanja Boric wrote:
What's in the `core.sys.posix.poll` is just a C wrapper,
meaning if you use functions declared there, you're just
calling the same one you would do in C, so it's very likely
that you're doing something different in D and C
Perhaps this is a stupid question, and I apologize if it is, but
why doesn't this compile:
import std.algorithm;
import std.stdio;
void main()
{
char[] array = [1, 2, 3, 4];
char value = 2;
fill(array, value);
}
if this does:
import std.algorithm;
On Tuesday, 15 August 2017 at 05:22:44 UTC, HyperParrow wrote:
On Tuesday, 15 August 2017 at 04:44:25 UTC, LeqxLeqx wrote:
[...]
GDC front-end is based on DMD 2.068.2 but the feature you use
(format specifier as template parameter) is only there since
DMD 2.075. The error comes from the
Hello!
I'm having issues with the format function.
My program is as follows:
import std.format;
import std.stdio;
int main ()
{
auto s = format!"%s is %s"("Pi", 3.14);
writeln(s); // "Pi is 3.14";
}
and when compiling with GDC, I'm getting this error:
test.d:8:
Hello!
How does one go about invoking a templated-variatic function such
as std.string.format
with an array of objects?
For example:
string stringMyThing (string formatForMyThings, MyThing[]
myThings)
{
return format(
formatForMyThings,
myThings
);
}
In executing the
Hello!
I have a question regarding attempting to access the super class
of a derived class at compile time.
Specifically, if I have:
class A { }
class B : A { }
void func(T)()
{
/+ find super-class of T +/
}
int main ()
{
func!B; /+ func would find A
On Monday, 15 April 2019 at 22:45:59 UTC, Adam D. Ruppe wrote:
On Monday, 15 April 2019 at 05:20:37 UTC, Ali Çehreli wrote:
BaseClassesTuple and friends:
https://dlang.org/phobos/std_traits.html
And the implementation of that is the `is` expression