On Monday, 21 December 2015 at 20:29:14 UTC, Steven Schveighoffer
wrote:
1) Is this recursion expected?
Yes. assert calls the virtual invariant function, which in the
case of super is equivalent to this. So you are essentially
calling assert(this).
2) The example is a dustmite'd version of t
On Wednesday, 23 December 2015 at 00:59:53 UTC, steven kladitis
wrote:
I have 843 programs written in D.
[...] All of the programs are from RosettaCode.org. The script
to compile them generates a log file and you will see a few
that the linker just stops No idea why. A few have 64K link
e
On Tuesday, December 22, 2015 15:07:58 Steven Schveighoffer via
Digitalmars-d-learn wrote:
> MonoTime uses whatever precision is given to it by the OS. So if on your
> OS, ticksPerSecond is 1e9, then your OS clock wraps at 18 hours as well.
1e9 ticks per second should still take over 293 years to
I have 843 programs written in D. 805 actually create an 32 bit
exe in windows 10. I am running the latest D. Some just start to
link and the linker disappears. Some just have issues I am not
able figure out. I can attach the code and scripts I use to
compile and run these. If anyone is willi
On Tuesday, 22 December 2015 at 21:58:24 UTC, Cavanni wrote:
On Tuesday, 22 December 2015 at 03:43:24 UTC, ShinraTensei
wrote:
A friend of mine told me that my post might have sounded a bit
trollish i assure you that was not the case.
In fact it sounds very nonsense to me. You know you jus
On 12/22/2015 03:10 AM, Vic wrote:
I am testing simple code in Geany (Windows 7, DMD compiler):
import std.stdio,std.net.curl;
void main()
{
// Return a char[] containing the content specified by an URL
auto content = get("dlang.org");
}
It compiled ok, but I get error after running exe file:
o
On 12/22/2015 10:15 AM, Andrew Chapman wrote:
> On Tuesday, 22 December 2015 at 18:11:24 UTC, rumbu wrote:
>> Converting numbers to string involves the most expensive known two
>> operations : division and modulus by 10.
>
> Cool thanks, so essentially it's unavoidable
There is hope. :)
> I hav
On Tuesday, 22 December 2015 at 18:27:12 UTC, cym13 wrote:
...
I don't think there is anything in the standard
library that would really help here as (if I read it correctly)
it is mainly
because of the conversion from ranges to arrays that this code
is slow.
Yes, it has been faster in past,
V Tue, 22 Dec 2015 12:55:10 -0800
"H. S. Teoh via Digitalmars-d-learn"
napsáno:
> On Tue, Dec 22, 2015 at 08:54:35PM +0100, Daniel Kozák via
> Digitalmars-d-learn wrote:
> > V Tue, 22 Dec 2015 09:43:00 -0800
> > "H. S. Teoh via Digitalmars-d-learn"
> > napsáno:
> >
> > > On Tue, Dec 22, 2015
On Tuesday, 22 December 2015 at 03:43:24 UTC, ShinraTensei wrote:
A friend of mine told me that my post might have sounded a bit
trollish i assure you that was not the case.
In fact it sounds very nonsense to me. You know you just came
here asking on a "D FORUM" if the "D Programming Langu
On Tuesday, 22 December 2015 at 17:49:34 UTC, Jakob Jenkov wrote:
On Tuesday, 22 December 2015 at 03:30:32 UTC, ShinraTensei
wrote:
I recently noticed massive increase in new languages for a
person to jump into(Nim, Rust, Go...etc) but my question is
weather the D is actually used anywhere or a
V Tue, 22 Dec 2015 21:10:54 +
rumbu via Digitalmars-d-learn
napsáno:
> On Tuesday, 22 December 2015 at 20:52:07 UTC, rumbu wrote:
> > On Tuesday, 22 December 2015 at 19:45:46 UTC, Daniel Kozák
> > wrote:
> >> V Tue, 22 Dec 2015 18:11:24 +
> >> rumbu via Digitalmars-d-learn
> >>
> >>
V Tue, 22 Dec 2015 20:52:07 +
rumbu via Digitalmars-d-learn
napsáno:
> On Tuesday, 22 December 2015 at 19:45:46 UTC, Daniel Kozák wrote:
> > V Tue, 22 Dec 2015 18:11:24 +
> > rumbu via Digitalmars-d-learn
> >
> > napsáno:
> >
> >> On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew C
On Tuesday, 22 December 2015 at 20:52:07 UTC, rumbu wrote:
On Tuesday, 22 December 2015 at 19:45:46 UTC, Daniel Kozák
wrote:
V Tue, 22 Dec 2015 18:11:24 +
rumbu via Digitalmars-d-learn
napsáno:
On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
wrote:
> Sorry if this is a sill
On Tue, Dec 22, 2015 at 08:54:35PM +0100, Daniel Kozák via Digitalmars-d-learn
wrote:
> V Tue, 22 Dec 2015 09:43:00 -0800
> "H. S. Teoh via Digitalmars-d-learn"
> napsáno:
>
> > On Tue, Dec 22, 2015 at 05:23:11PM +, Andrew Chapman via
> > Digitalmars-d-learn wrote: [...]
> > > for({i
On Tuesday, 22 December 2015 at 19:45:46 UTC, Daniel Kozák wrote:
V Tue, 22 Dec 2015 18:11:24 +
rumbu via Digitalmars-d-learn
napsáno:
On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
wrote:
> Sorry if this is a silly question but is the to! method from
> the conv library th
On Tuesday, 22 December 2015 at 20:07:58 UTC, Steven
Schveighoffer wrote:
MonoTime uses whatever precision is given to it by the OS. So
if on your OS, ticksPerSecond is 1e9, then your OS clock wraps
at 18 hours as well.
Thanks, I didn't know that.
I actually just realized that my use case does
On 12/22/15 2:48 PM, Tanel Tagaväli wrote:
I discovered something potentially troublesome in druntime.
Namely, applications that use MonoTime will break if run 18 hours after
booting, according to a short program I wrote.
Here's my code:
```
import core.time : MonoTime;
auto mt = MonoTime.currT
V Tue, 22 Dec 2015 09:43:00 -0800
"H. S. Teoh via Digitalmars-d-learn"
napsáno:
> On Tue, Dec 22, 2015 at 05:23:11PM +, Andrew Chapman via
> Digitalmars-d-learn wrote: [...]
> > for({int i; i = 0;} i < num; i++) {
> > //string s = to!string(i);
> > Cust
V Tue, 22 Dec 2015 17:15:27 +
Andrew Chapman via Digitalmars-d-learn
napsáno:
> Sorry if this is a silly question but is the to! method from the
> conv library the most efficient way of converting an integer
> value to a string?
>
> e.g.
> string s = to!string(100);
>
> I'm seeing a prett
V Tue, 22 Dec 2015 18:39:16 +
Ivan Kazmenko via Digitalmars-d-learn
napsáno:
> On Tuesday, 22 December 2015 at 18:11:24 UTC, rumbu wrote:
> > On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
> > wrote:
> >> Sorry if this is a silly question but is the to! method from
> >> the
I discovered something potentially troublesome in druntime.
Namely, applications that use MonoTime will break if run 18 hours
after booting, according to a short program I wrote.
Here's my code:
```
import core.time : MonoTime;
auto mt = MonoTime.currTime;
import std.stdio : writeln;
writeln(m
V Tue, 22 Dec 2015 18:11:24 +
rumbu via Digitalmars-d-learn
napsáno:
> On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
> wrote:
> > Sorry if this is a silly question but is the to! method from
> > the conv library the most efficient way of converting an
> > integer value to a
On 12/22/15 12:15 PM, Andrew Chapman wrote:
Sorry if this is a silly question but is the to! method from the conv
library the most efficient way of converting an integer value to a string?
e.g.
string s = to!string(100);
I'm seeing a pretty dramatic slow down in my code when I use a
conversion
On 12/22/15 10:40 AM, Adam D. Ruppe wrote:
In specialization, it will implicitly convert, it will just select the
best match available.
Make #1:
void func(T : ubyte)(T v) { writeln(1); }
It will then use that for for the second line because it is a *better*
match than :int, but :int stil
El 22/12/15 a les 18:28, Jordi Sayol via Digitalmars-d-learn ha escrit:
> "d-lang" splits it in few deb packages:
s/d-lang/d-apt/
On Tuesday, 22 December 2015 at 18:11:24 UTC, rumbu wrote:
On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
wrote:
Sorry if this is a silly question but is the to! method from
the conv library the most efficient way of converting an
integer value to a string?
e.g.
string s = to!st
On Tuesday, 22 December 2015 at 17:52:52 UTC, Andrew Chapman
wrote:
On Tuesday, 22 December 2015 at 17:43:00 UTC, H. S. Teoh wrote:
I wonder if the slowdown is caused by GC collection cycles
(because calling to!string will allocate, and here you're
making a very large number of small allocatio
On Tuesday, 22 December 2015 at 18:11:24 UTC, rumbu wrote:
On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
wrote:
Sorry if this is a silly question but is the to! method from
the conv library the most efficient way of converting an
integer value to a string?
e.g.
string s = to!st
On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
wrote:
Sorry if this is a silly question but is the to! method from
the conv library the most efficient way of converting an
integer value to a string?
e.g.
string s = to!string(100);
I'm seeing a pretty dramatic slow down in my cod
On Tuesday, 22 December 2015 at 17:43:00 UTC, H. S. Teoh wrote:
I wonder if the slowdown is caused by GC collection cycles
(because calling to!string will allocate, and here you're
making a very large number of small allocations, which is known
to cause GC performance issues).
Try inserting
On Tuesday, 22 December 2015 at 03:30:32 UTC, ShinraTensei wrote:
I recently noticed massive increase in new languages for a
person to jump into(Nim, Rust, Go...etc) but my question is
weather the D is actually used anywhere or are there chances of
it dying anytime soon.
Check out Google Tre
On Tue, Dec 22, 2015 at 05:23:11PM +, Andrew Chapman via
Digitalmars-d-learn wrote:
[...]
> for({int i; i = 0;} i < num; i++) {
> //string s = to!string(i);
> Customer c = Customer(i, "Customer", "", i * 2);
> string result = objS
El 22/12/15 a les 16:38, FrankLike via Digitalmars-d-learn ha escrit:
> sudo apt-get install dmd ← it's error.
dmd_2.069.2-0-amd64.deb from http://downloads.dlang.org/ is an all-in-one deb
package, containing all the tools and libraries for each release.
"d-lang" splits it in few deb packages:
On Tuesday, 22 December 2015 at 17:18:16 UTC, cym13 wrote:
On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
wrote:
Sorry if this is a silly question but is the to! method from
the conv library the most efficient way of converting an
integer value to a string?
e.g.
string s = to!st
Sorry if this is a silly question but is the to! method from the
conv library the most efficient way of converting an integer
value to a string?
e.g.
string s = to!string(100);
I'm seeing a pretty dramatic slow down in my code when I use a
conversion like this (when looped over 10 million ite
On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman
wrote:
Sorry if this is a silly question but is the to! method from
the conv library the most efficient way of converting an
integer value to a string?
e.g.
string s = to!string(100);
I'm seeing a pretty dramatic slow down in my cod
On Tuesday, 22 December 2015 at 16:08:01 UTC, Dejan Lekic wrote:
Arun, isn't that what the 'name' property is there for?
Hi Dejan,
Thanks for a quick reply.
Setting the name property is not reflecting in the OS level. May
be it is just used only at the object level?
After setting the threa
Arun, isn't that what the 'name' property is there for?
I have this trivial code where the main thread clones a child
thread.
import std.stdio;
import core.thread;
import std.concurrency;
class DerivedThread : Thread
{
this()
{
super(&run);
}
void quit()
{
_quit = true;
}
private:
void setOSThreadName()
On Tuesday, 22 December 2015 at 15:29:16 UTC, Shriramana Sharma
wrote:
1) At func(100) why isn't the compiler complaining that it is
able to match two templates i.e. the ones printing 2 and 3?
Because the specialized one just wins the context. It only
complains when there's two equal ones.
C
On Tuesday, 22 December 2015 at 15:22:49 UTC, Shriramana Sharma
wrote:
Is a type not a symbol? I mean, alias can refer to both, no?
Keywords aren't symbols so `int` is a type, but not a symbol and
thus qualifies as `T` but not as `alias T`.
On Tuesday, 22 December 2015 at 15:08:20 UTC, FrankLike wrote:
On Tuesday, 22 December 2015 at 14:37:21 UTC, Rikki Cattermole
wrote:
I'm confused.
The commands listed e.g.
$ sudo wget
http://netcologne.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list
$ su
import std.stdio;
void func(T)(T v) { writeln(1); }
void func(T: int)(T v) { writeln(2); }
void func(T)(T v) if (is(T: int)) { writeln(3); }
void main()
{
func(100);
ubyte s = 200;
func(s);
}
The above code prints 2 twice. A fwe questions:
1) At func(100) why isn't the compiler compla
http://dlang.org/spec/template.html#TemplateTupleParameter
says that an AliasSeq (wording needs to be updated) "is a sequence of any
mix of types, expressions or symbols."
Is a type not a symbol? I mean, alias can refer to both, no?
--
Shriramana Sharma, Penguin #395953
On Tuesday, 22 December 2015 at 14:37:21 UTC, Rikki Cattermole
wrote:
I'm confused.
The commands listed e.g.
$ sudo wget
http://netcologne.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list
$ sudo apt-get update && sudo apt-get -y
--allow-unauthenticated in
On 23/12/15 3:32 AM, FrankLike wrote:
On Tuesday, 22 December 2015 at 14:11:29 UTC, Rikki Cattermole wrote:
On 23/12/15 3:09 AM, FrankLike wrote:
Now,we can't setup dmd or ldc like this:
sudo apt-get install dmd
sudo apt-get install ldc2
If I set 'The Installation Source' is :
deb http://d
On Tuesday, 22 December 2015 at 14:11:29 UTC, Rikki Cattermole
wrote:
On 23/12/15 3:09 AM, FrankLike wrote:
Now,we can't setup dmd or ldc like this:
sudo apt-get install dmd
sudo apt-get install ldc2
If I set 'The Installation Source' is :
deb http://downloads.dlang.org/releases/2015/ main
On 23/12/15 3:09 AM, FrankLike wrote:
Now,we can't setup dmd or ldc like this:
sudo apt-get install dmd
sudo apt-get install ldc2
If I set 'The Installation Source' is :
deb http://downloads.dlang.org/releases/2015/ main
But it's error,why?
Thank you.
dlang.org does not host a apt reposi
Now,we can't setup dmd or ldc like this:
sudo apt-get install dmd
sudo apt-get install ldc2
If I set 'The Installation Source' is :
deb http://downloads.dlang.org/releases/2015/ main
But it's error,why?
Thank you.
Thanks, everyone, I have looked a bit at different frameworks,
and it seems that libasync might have a decently narrow scope to
fit what I need.
I have a background in Java, so a lot of this OS-specific stuff
is new to me (EPoll etc.). In Java that stuff is used under the
hood for you, withou
The same as in C [1].
Just change
#include
to
import core.sys.posix.poll;
[1] http://linux.die.net/man/2/poll
I have a background in Java, so I am a bit handicapped :-)
On Sunday, 20 December 2015 at 01:17:50 UTC, Basile B. wrote:
On Saturday, 19 December 2015 at 14:16:23 UTC, TheDGuy wrote:
is it possible to set the color of a single pixel with Cairo?
Not like you would do with a classic canvas (2d grid), because
colors are applied with `cairo_fill()` and `
On Tuesday, 22 December 2015 at 03:30:32 UTC, ShinraTensei wrote:
I recently noticed massive increase in new languages for a
person to jump into(Nim, Rust, Go...etc) but my question is
weather the D is actually used anywhere or are there chances of
it dying anytime soon.
So far I've tried a whi
I am testing simple code in Geany (Windows 7, DMD compiler):
import std.stdio,std.net.curl;
void main()
{
// Return a char[] containing the content specified by an URL
auto content = get("dlang.org");
}
It compiled ok, but I get error after running exe file:
object.Error@(0): Access Violation
Am Mon, 21 Dec 2015 23:29:14 +
schrieb Adam D. Ruppe :
> On Monday, 21 December 2015 at 23:17:45 UTC, Daniel Kozák wrote:
> > If you want to reinvent the wheel you can use
>
> [...] it isn't like the bundled functions with the OS are
> hard to use [...]
>
epoll and similar interfaces are
56 matches
Mail list logo