On Sunday, 15 November 2020 at 00:05:08 UTC, Marcone wrote:
Socket s = new Socket(AddressFamily.INET, SocketType.STREAM);
s.connect(new InternetAddress("domain.com", 80));
I want that program raise an error if reach for example 30
seconds of timeout.
Perhaps using Socket.select and
On Sunday, 15 November 2020 at 03:15:29 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 03:08:48 UTC, Marcone wrote:
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
On Sunday, 15 November 2020 at 03:15:29 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 03:08:48 UTC, Marcone wrote:
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
On Sunday, 15 November 2020 at 03:08:48 UTC, Marcone wrote:
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
writeln(strftime("%Hh:%Mm:%Ss", mytime)); How can I make some
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
writeln(strftime("%Hh:%Mm:%Ss", mytime)); How can I make some
like this in D?
auto mytime = Clock.currTime;
On Sunday, 15 November 2020 at 02:29:20 UTC, Anonymouse wrote:
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
writeln(strftime("%Hh:%Mm:%Ss", mytime)); How can I make some
like this in D?
auto mytime = Clock.currTime;
On Sunday, 15 November 2020 at 01:04:41 UTC, Marcone wrote:
auto mytime = Clock.currTime().toUnixTime()
writeln(strftime("%Hh:%Mm:%Ss", mytime)); How can I make some
like this in D?
auto mytime = Clock.currTime;
writefln("%02dh:%02dm:%02ds", mytime.hour, mytime.minute,
mytime.second);
auto mytime = Clock.currTime().toUnixTime()
writeln(strftime("%Hh:%Mm:%Ss", mytime)); How can I make some
like this in D?
On Sat, Nov 14, 2020 at 11:20:55PM +, Martin via Digitalmars-d-learn wrote:
> Hi, i do no know if this is intended - but imo this is weird:
> https://run.dlang.io/is/eBje3A
>
> I expected that `c.a.str == ""` (just like `c.str` is). But instead
> `c.a.str` keeps the value of `b.a.str`.
>
>
Socket s = new Socket(AddressFamily.INET, SocketType.STREAM);
s.connect(new InternetAddress("domain.com", 80));
I want that program raise an error if reach for example 30
seconds of timeout.
On Saturday, 14 November 2020 at 23:30:58 UTC, Adam D. Ruppe
wrote:
On Saturday, 14 November 2020 at 23:20:55 UTC, Martin wrote:
Is this intentional?
[...]
alright, thank you! :)
On Saturday, 14 November 2020 at 23:20:55 UTC, Martin wrote:
Is this intentional?
In the current language design, yes. For the many users who ask
this, no.
All static initializers are run at compile time and refer to the
static data segment - this is consistent across the language.
Hi, i do no know if this is intended - but imo this is weird:
https://run.dlang.io/is/eBje3A
I expected that `c.a.str == ""` (just like `c.str` is). But
instead `c.a.str` keeps the value of `b.a.str`.
Is this intentional? IMO this feels not consistent and its weird
when a reference leaks
~~~A.d
module A;
import std.stdio;
void bar (int s) { __PRETTY_FUNCTION__.writeln; }
~~~
~~~foo.d
import std.stdio;
import A;
alias bar = A.bar;
version (X) {
void bar (T) (T t) { __PRETTY_FUNCTION__.writeln; }
}
void bar (int s) { __PRETTY_FUNCTION__.writeln; }
void main ()
{
bar (1);
On Sat, Nov 14, 2020 at 05:55:13PM +, WhatMeWorry via Digitalmars-d-learn
wrote:
>
> I was poking around the dmd code just to "learn from the best"
IMNSHO, Phobos is more representative of typical D code than dmd; dmd
code was automatically translated from C++, so a lot of it may still
have
On Saturday, 14 November 2020 at 17:55:13 UTC, WhatMeWorry wrote:
I was poking around the dmd code just to "learn from the best"
and I came across some files that ended with the .d extension
which did not have the module statement. (I was under the naive
impression that all .d files must
I was poking around the dmd code just to "learn from the best"
and I came across some files that ended with the .d extension
which did not have the module statement. (I was under the naive
impression that all .d files must have a module statement)
However, in the directory:
My simple example code:
import std;
struct Fruit {
string name;
this(string name){
this.name = name;
}
void printmyname(){
writeln(this.name);
}
void showname(){
task!this.printmyname().executeInNewThread(); //
18 matches
Mail list logo