vibe.d is blocking threads

2016-04-27 Thread RuZzz via Digitalmars-d-learn
Code: import std.concurrency; import core.thread; //import vibe.http.client; // If uncommented this line, the thread "worker" does not start void worker() { foreach (i; 0 .. 5) { Thread.sleep(500.msecs); writeln(i, " (worker)"); }

Re: dmd-2.067.0-b1

2015-02-14 Thread RuZzz via Digitalmars-d-learn
It is your profile? http://www.cyberforum.ru/members/491746.html

Re: How to make a Currency class from std.BigInt?

2015-02-14 Thread RuZzz via Digitalmars-d-learn
The next version https://bpaste.net/show/dc3c5f10f2ca I use https://github.com/dsimcha/Rational/blob/master/rational.d I want to do it: auto c = new Currencies!Rational.rational.Rational!(BigInt); where Rational.rational.Rational it is std.rational.Rational I get the error: Error: template

Re: How to make a Currency class from std.BigInt?

2015-02-11 Thread RuZzz via Digitalmars-d-learn
https://github.com/acmeism/RosettaCodeData/blob/master/Task/Arithmetic-Rational/D/arithmetic-rational.d

Re: How to make a Currency class from std.BigInt?

2015-02-11 Thread RuZzz via Digitalmars-d-learn
With eris lib some problems, the first error: .../.dub/packages/eris-0.0.1/eris/integer/digits.d(241): Error: cannot implicitly convert expression (digits.length) of type ulong to int What can I import to use rational numbers? I found it

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
Thanks. Do I need to use rational fractions for the Currencies class?

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
On Saturday, 31 January 2015 at 15:02:09 UTC, Colin wrote: Maybe you can articulate it in one post what this class is trying to achieve? Maybe this? https://github.com/andersonpd/decimal/blob/master/decimal/bigfloat.d The main thing is not to lose currency in calculations that use arithmetic.

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
The next version, which does not work: https://bpaste.net/show/b9c85de68d07

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
I want to understand the correct architecture of the class.

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
Maybe I need good examples on C++, for this class, because a lot of examples on C++.

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
I am looking for not only free solutions.

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
The next version https://bpaste.net/show/9468f24d9df0

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
How to get amount of digit after point in a double for to get integer from a double? assert(amountAfterPoint(1.456) == 3); assert(amountAfterPoint(0.6) == 5);

Re: How to make a Currency class from std.BigInt?

2015-01-31 Thread RuZzz via Digitalmars-d-learn
without to!string

Re: How to make a Currency class from std.BigInt?

2015-01-30 Thread RuZzz via Digitalmars-d-learn
What do I need to learn?

How to make a Currency class from std.BigInt?

2015-01-30 Thread RuZzz via Digitalmars-d-learn
module axfinance.api.currencies; import std.array, std.stdio, std.system, std.bigint, std.conv; class Currencies { public: this(ulong pf) { exponent(pf); } bool integer(BigInt pb) {

What is the Final?

2015-01-20 Thread RuZzz via Digitalmars-d-learn
Alexandrescu The_D_Programming_Language page 264: 7.1.10 Subtyping with structs. The @disable Attribute import std.stdio; ... unittest { auto a = Final!Widget(new Widget); a.print(); // Fine, just print a auto b = a; // Fine, a and b are bound to the same Widget a = b; // Error! //

Error when downloading with +

2014-11-26 Thread RuZzz via Digitalmars-d-learn
Hi ppl! When dub builds the project, he tries to load the http://code.dlang.org/packages/libevent/2.0.1+2.0.16.zip file, and dub gives out this error: Running DUB build dub build @ /mnt/hdd2_3/ftp/workspace_eclipse/axt-d-base-application The following changes will

Re: Error when downloading with +

2014-11-26 Thread RuZzz via Digitalmars-d-learn
On Wednesday, 26 November 2014 at 10:01:32 UTC, Suliman wrote: This is an issue with your version of dub with a buggy url encoding method. Download the latest at code.dlang.org http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/22266/ thanks, up-dating to version 0.9.22

Re: Network scanner

2014-11-11 Thread RuZzz via Digitalmars-d-learn
OS WinXP

Re: Network scanner

2014-11-11 Thread RuZzz via Digitalmars-d-learn
netstat reports that the socket is in the TIME_WAIT or CLOSE_WAIT state.

Network scanner

2014-11-06 Thread RuZzz via Digitalmars-d-learn
Hi ppl! I want to scan the local network to find nodes with open 80 port. code: import core.thread, core.atomic; import std.stdio, std.system, std.file, std.conv, std.datetime, std.socket, std.socketstream, std.stream; import vibe.core.log; import vibe.d; void main() { ushort port =

Re: Network scanner

2014-11-06 Thread RuZzz via Digitalmars-d-learn
Or the program doesn't find the address after IP 192.168.110.34...