On Wednesday, 4 October 2017 at 01:59:48 UTC, Andrew Edwards
wrote:
Attempting to use iopipe but not sure what I'm doing incorrectly
Finally figured it out. For some reason, the init find the local
dependency to load but simply adding it to the dub.json afterward
resolves the issue.
On 04/10/2017 3:54 AM, Jesse Phillips wrote:
On Tuesday, 3 October 2017 at 23:29:49 UTC, rikki cattermole wrote:
On 03/10/2017 4:52 PM, Jesse Phillips wrote:
I'm pretty sure this isn't possible, but maybe someone understands
Windows better.
Windows provides a means no bind a certificate to a
On Tuesday, 3 October 2017 at 23:29:49 UTC, rikki cattermole
wrote:
On 03/10/2017 4:52 PM, Jesse Phillips wrote:
I'm pretty sure this isn't possible, but maybe someone
understands Windows better.
Windows provides a means no bind a certificate to a port using
netsh.exe. This means (at least
On Tuesday, 3 October 2017 at 23:13:00 UTC, Jonathan M Davis
wrote:
On Tuesday, October 03, 2017 22:42:35 SamwiseFilmore via
Digitalmars-d-learn wrote:
On Tuesday, 3 October 2017 at 22:37:17 UTC, SamwiseFilmore
wrote:
> Am I using the ternary operator correctly here, or is this
> an issue with
Attempting to use iopipe but not sure what I'm doing incorrectly
I've cloned the repository in /Users/edwarac/git.repo.dir/ then
added the path to dub:
edwarac-pc:.dub edwarac$ dub add-path /Users/edwarac/git.repo.dir
edwarac-pc:.dub edwarac$ dub list
Packages present in the system and known
On 03/10/2017 4:52 PM, Jesse Phillips wrote:
I'm pretty sure this isn't possible, but maybe someone understands
Windows better.
Windows provides a means no bind a certificate to a port using
netsh.exe. This means (at least for standard Windows networking calls)
connections to that port will
On Tuesday, October 03, 2017 22:42:35 SamwiseFilmore via Digitalmars-d-learn
wrote:
> On Tuesday, 3 October 2017 at 22:37:17 UTC, SamwiseFilmore wrote:
> > Am I using the ternary operator correctly here, or is this an
> > issue with dmd? I'm using dmd v2.076.0.
>
> I wrapped the ternary in
On Tue, Oct 03, 2017 at 10:37:17PM +, SamwiseFilmore via
Digitalmars-d-learn wrote:
[...]
> string toString() {
> return
> this.value.toString() ~
> " of " ~
> this.suit.toString() ~
> this.suit == CardSuit.diamonds ? "" : "\t" ~
>
On Tuesday, 3 October 2017 at 22:37:17 UTC, SamwiseFilmore wrote:
Am I using the ternary operator correctly here, or is this an
issue with dmd? I'm using dmd v2.076.0.
I wrapped the ternary in parentheses, and it compiled. Still, I'm
wondering about this behavior.
I've created toString() for a struct (which is a lot more
complicated than what I've provided here) that returns a large
number of concatenated strings. Here is the example:
struct Card {
// Flesh out these enums appropriately
CardSuit suit;
CardValue value;
Facing facing;
On Tuesday, 3 October 2017 at 12:32:43 UTC, kdevel wrote:
IMHO a program should sleep (consume 0 CPU time and 0 energy)
if there is nothing to process. This is best accomplished by
not polling on a file descriptor in order to check if data has
arrived. If your program must yield() there's
Found on Reddit:
https://www.reddit.com/r/programming/comments/740617/the_expressive_c17_coding_challenge/
How would you do it in D?
Ali
P.S. You can ignore the following note from the challenge text; I don't
think it applies to D. Honestly, I don't think it matters for C++17
either. :)
Thank you. For anyone else with the same question, I also found
this page helpful:
http://en.cppreference.com/w/cpp/atomic/memory_order
On Tuesday, 3 October 2017 at 15:52:52 UTC, sighoya wrote:
On Tuesday, 3 October 2017 at 15:30:52 UTC, Daniel Kozak wrote:
writeln(bar!(Bar,Foo,int)(Bar!(Foo,int)()));
Dne 3. 10. 2017 3:55 odpoledne napsal uživatel "sighoya via
Digitalmars-d-learn" :
But
https://run.dlang.io/is/oqbYNb
On Tue, Oct 3, 2017 at 5:52 PM, sighoya via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> On Tuesday, 3 October 2017 at 15:30:52 UTC, Daniel Kozak wrote:
>
>> writeln(bar!(Bar,Foo,int)(Bar!(Foo,int)()));
>>
>> Dne 3. 10. 2017 3:55 odpoledne
On Tuesday, 3 October 2017 at 15:30:52 UTC, Daniel Kozak wrote:
writeln(bar!(Bar,Foo,int)(Bar!(Foo,int)()));
Dne 3. 10. 2017 3:55 odpoledne napsal uživatel "sighoya via
Digitalmars-d-learn" :
But when I write this to:
I'm pretty sure this isn't possible, but maybe someone
understands Windows better.
Windows provides a means no bind a certificate to a port using
netsh.exe. This means (at least for standard Windows networking
calls) connections to that port will be given the bound cert.
The Vibe.d
writeln(bar!(Bar,Foo,int)(Bar!(Foo,int)()));
Dne 3. 10. 2017 3:55 odpoledne napsal uživatel "sighoya via
Digitalmars-d-learn" :
But when I write this to:
writeln(bar!(Bar,Foo,int)(Bar!(Foo,int)));
it complains by:
test.d(11): Error: template instance
But when I write this to:
writeln(bar!(Bar,Foo,int)(Bar!(Foo,int)));
it complains by:
test.d(11): Error: template instance T!(S!int) does not match
template declaration Bar(R, S)
test.d(11): Error: template instance T!(S!int) does not match
template declaration Bar(R, S)
test.d(17): Error:
On Tuesday, 3 October 2017 at 13:31:00 UTC, sighoya wrote:
struct Bar (R,S) {
T!(S!R) bar(alias T,alias S,R)(T!(S!R) v) {return v;}
Bar takes two arguments, but here you are only passing one. Keep
in mind that T!(...) is Bar. You called T!(S!(R)) when it was
actually written to accept
Thanks,
How do I construct such a type. I don't get it done right with:
struct Foo(T) {
T value;
}
struct Bar (R,S) {
R!S fooint;
}
T!(S!R) bar(alias T,alias S,R)(T!(S!R) v) {return v;}
void main() {
import std.stdio;
On Tuesday, 3 October 2017 at 12:58:47 UTC, sighoya wrote:
On Tuesday, 3 October 2017 at 12:09:04 UTC, rikki cattermole
wrote:
On 03/10/2017 1:05 PM, sighoya wrote:
Especially, I mean something like
T foo(S,T)(T i)
{
...
}
struct Foo(T) {
T value;
}
T!S foo(S, alias
On Tuesday, 3 October 2017 at 12:09:04 UTC, rikki cattermole
wrote:
On 03/10/2017 1:05 PM, sighoya wrote:
Especially, I mean something like
T foo(S,T)(T i)
{
...
}
struct Foo(T) {
T value;
}
T!S foo(S, alias T)(T!S v) { return v; }
void main() {
import
On Tuesday, 3 October 2017 at 12:20:09 UTC, Oleg B wrote:
while (!tryWait(pp.pid).terminated)
{
auto cnt = read(fd, buf.ptr, buf.length); //
C-style reading
if (cnt == -1 && errno == EAGAIN) // C-style error
checking
yield();
On Tuesday, 3 October 2017 at 10:45:21 UTC, kdevel wrote:
On Tuesday, 3 October 2017 at 00:22:28 UTC, Oleg B wrote:
but get error "Resource temporarily unavailable".
You get EAGAIN because there is no data available at the time
of reading.
From the manpage of read:
ERRORS
EAGAIN
On Tuesday, 3 October 2017 at 11:36:28 UTC, Oleg B wrote:
EAGAIN Non-blocking I/O has been selected using
O_NONBLOCK and no data
was immediately available for reading.
And I can't check this without using exception handling?
Your programm shall not read before data is
Especially, I mean something like
T foo(S,T)(T i)
{
...
}
On 03/10/2017 1:05 PM, sighoya wrote:
Especially, I mean something like
T foo(S,T)(T i)
{
...
}
struct Foo(T) {
T value;
}
T!S foo(S, alias T)(T!S v) { return v; }
void main() {
import std.stdio;
writeln(foo!(int, Foo)(Foo!int(1)));
}
On Tuesday, 3 October 2017 at 10:45:21 UTC, kdevel wrote:
On Tuesday, 3 October 2017 at 00:22:28 UTC, Oleg B wrote:
but get error "Resource temporarily unavailable".
You get EAGAIN because there is no data available at the time
of reading.
From the manpage of read:
ERRORS
EAGAIN
On Tuesday, 3 October 2017 at 00:22:28 UTC, Oleg B wrote:
but get error "Resource temporarily unavailable".
You get EAGAIN because there is no data available at the time of
reading.
From the manpage of read:
ERRORS
EAGAIN Non-blocking I/O has been selected using
O_NONBLOCK and no
I have been reading the D forums for a while and following on its
amazing progress for a long time. Over time I have even written
some basic D programs for myself, nothing major or earth
shuttering. I have downloaded and read Ali's excellent book.
I would like to dive deeper into D, however
31 matches
Mail list logo