Re: @property get/set or public varaible?

2016-12-05 Thread ArturG via Digitalmars-d-learn
On Sunday, 4 December 2016 at 20:44:05 UTC, Jonathan M Davis wrote: On Sunday, December 04, 2016 15:30:22 vladdeSV via Digitalmars-d-learn wrote: Hello! I have a question not directly related to D as it is with coding standards. My issue at hand is if I have one variable for a class, which

Re: [Semi-OT] I don't want to leave this language!

2016-12-05 Thread Ilya Yaroshenko via Digitalmars-d-learn
Hi e-y-e, The main problem with D for production is its runtime. GC, DRuntime, Phobos is big constraint for real world software production. Good D code should be nothrow, @nogc, and betterC. BetterC means that it must not require DRuntime to link and to start. I started Mir as

Re: Set Union of SortedRanges

2016-12-05 Thread Nordlöw via Digitalmars-d-learn
On Monday, 5 December 2016 at 20:18:24 UTC, Nordlöw wrote: What's the fastest way of calculating a set-union of two or more SortedRanges (all containing unique values)? Doh, I meant intersection, not union: http://forum.dlang.org/post/jthiwaxkyykalwfyk...@forum.dlang.org

Re: Building with dub fails on Ubuntu 16.10.

2016-12-05 Thread moe via Digitalmars-d-learn
On Monday, 5 December 2016 at 07:32:21 UTC, Daniel Kozak wrote: On Saturday, 3 December 2016 at 16:07:47 UTC, moe wrote: On Sunday, 11 September 2016 at 02:17:21 UTC, Vlasov Roman wrote: Hello, guys. I tried to build HelloWorld with dub, but i got strange linker error: [...] I just

Re: [Semi-OT] I don't want to leave this language!

2016-12-05 Thread bachmeier via Digitalmars-d-learn
On Monday, 5 December 2016 at 17:18:25 UTC, e-y-e wrote: Currently I have been learning D for about a year and a half. This may seem like a short time, but this is the longest I have stuck with any language. I have only been learning for 4 years and I am currently in university studying first

Re: [Semi-OT] I don't want to leave this language!

2016-12-05 Thread e-y-e via Digitalmars-d-learn
On Monday, 5 December 2016 at 20:25:00 UTC, Ilya Yaroshenko wrote: Hi e-y-e, The main problem with D for production is its runtime. GC, DRuntime, Phobos is big constraint for real world software production. Good D code should be nothrow, @nogc, and betterC. BetterC means that it must not

Set Union of SortedRanges

2016-12-05 Thread Nordlöw via Digitalmars-d-learn
What's the fastest way of calculating a set-union of two or more SortedRanges (all containing unique values)? Any typical branchings of the algorithm depending on the lengths of the SortedRanges?

Set Intersection of SortedRanges

2016-12-05 Thread Nordlöw via Digitalmars-d-learn
What's the fastest way of calculating a set-intersection of two or more SortedRanges (all containing unique values)? Any typical branchings of the algorithm depending on the lengths of the SortedRanges?

Re: the best language I have ever met(?)

2016-12-05 Thread Igor Shirkalin via Digitalmars-d-learn
On Monday, 5 December 2016 at 17:27:21 UTC, Igor Shirkalin wrote: On Monday, 5 December 2016 at 16:39:33 UTC, eugene wrote: On Monday, 5 December 2016 at 16:07:41 UTC, Igor Shirkalin wrote: I didnt count, but its about ten thousend a year, i.e. nothing. if you earned nothing using D language

[Semi-OT] I don't want to leave this language!

2016-12-05 Thread e-y-e via Digitalmars-d-learn
Currently I have been learning D for about a year and a half. This may seem like a short time, but this is the longest I have stuck with any language. I have only been learning for 4 years and I am currently in university studying first year of computer systems engineering. My main problem

Re: the best language I have ever met(?)

2016-12-05 Thread Igor Shirkalin via Digitalmars-d-learn
On Monday, 5 December 2016 at 16:39:33 UTC, eugene wrote: On Monday, 5 December 2016 at 16:07:41 UTC, Igor Shirkalin wrote: I didnt count, but its about ten thousend a year, i.e. nothing. if you earned nothing using D language why do you recommend it?))) People usually earn money using

Re: Set Intersection of SortedRanges

2016-12-05 Thread Nordlöw via Digitalmars-d-learn
On Monday, 5 December 2016 at 21:48:49 UTC, Nordlöw wrote: Ahh, setops has intersection aswell: https://dlang.org/phobos/std_algorithm_setops.html#setIntersection I should have a guessed that. Ahh again, but current Phobos is currently not optimized for the case when all inputs are

Re: Set Intersection of SortedRanges

2016-12-05 Thread Nordlöw via Digitalmars-d-learn
On Monday, 5 December 2016 at 21:34:39 UTC, Nordlöw wrote: What's the fastest way of calculating a set-intersection of two or more SortedRanges (all containing unique values)? Ahh, setops has intersection aswell: https://dlang.org/phobos/std_algorithm_setops.html#setIntersection I should

Re: [Semi-OT] I don't want to leave this language!

2016-12-05 Thread sarn via Digitalmars-d-learn
On Monday, 5 December 2016 at 17:18:25 UTC, e-y-e wrote: Currently I have been learning D for about a year and a half. This may seem like a short time, but this is the longest I have stuck with any language. I have only been learning for 4 years and I am currently in university studying first

Re: Set Intersection of SortedRanges

2016-12-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 6 December 2016 at 01:46:38 UTC, Nicholas Wilson wrote: On Monday, 5 December 2016 at 22:10:34 UTC, Nordlöw wrote: On Monday, 5 December 2016 at 21:48:49 UTC, Nordlöw wrote: Ahh, setops has intersection aswell: https://dlang.org/phobos/std_algorithm_setops.html#setIntersection I

Re: Set Intersection of SortedRanges

2016-12-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 5 December 2016 at 22:10:34 UTC, Nordlöw wrote: On Monday, 5 December 2016 at 21:48:49 UTC, Nordlöw wrote: Ahh, setops has intersection aswell: https://dlang.org/phobos/std_algorithm_setops.html#setIntersection I should have a guessed that. Ahh again, but current Phobos is

Re: Set Intersection of SortedRanges

2016-12-05 Thread Nicholas Wilson via Digitalmars-d-learn
Whoops forgot to add checks for .empty on the ranges, and I don't think reduce!equal work but you get the point.

Re: [Semi-OT] I don't want to leave this language!

2016-12-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 5 December 2016 at 20:49:50 UTC, e-y-e wrote: On Monday, 5 December 2016 at 20:25:00 UTC, Ilya Yaroshenko wrote: [...] You know from the 15th December I will have a month of free time, and I would love to get myself up to speed with Mir to contribute to it. If you don't mind me

The order of libraries makes error in dub

2016-12-05 Thread unDEFER via Digitalmars-d-learn
Hello, dub makes string like the next to compile my program (WS_32.LIB at the beginning): $ dmd -m32mscoff -lib -of.dub\\build\\library-debug-windows-x86-dmd_2072-83D2723917096513EB360761C22DDD87\\db.lib -debug -g -w -version=Have_bdb2d WS_32.LIB libdb53d.lib source/berkeleydb/* -vcolumns

Re: How to use library compiled with Microsoft Visual Studio 2015 in D?

2016-12-05 Thread unDEFER via Digitalmars-d-learn
On Monday, 5 December 2016 at 07:21:30 UTC, Jacob Carlborg wrote: If you compile your D code with the "-m32mscoff" flag it will produce COFF objects and use the Visual Studio tool chain (linker and runtime). Compiling for 64bit (-m64) will always produce COFF objects. Big thanks! -m32mscoff

Re: How to use library compiled with Microsoft Visual Studio 2015 in D?

2016-12-05 Thread unDEFER via Digitalmars-d-learn
OK, I have found. It must be library WS2_32.LIB from Microsoft SDK. But dumpbin doesn't show __imp__htonl@4 symbol there. The magic! Thank you!

Re: The order of libraries makes error in dub

2016-12-05 Thread Mike Parker via Digitalmars-d-learn
On Monday, 5 December 2016 at 14:29:42 UTC, unDEFER wrote: On Monday, 5 December 2016 at 11:51:52 UTC, unDEFER wrote: "libs-posix": ["db"], "sourceFiles-windows-dmd": ["libdb53d.lib", "WS_32.LIB"], "dflags-windows": ["-m32mscoff"], "subPackages": [ I understand that I

Re: The order of libraries makes error in dub

2016-12-05 Thread unDEFER via Digitalmars-d-learn
On Monday, 5 December 2016 at 11:51:52 UTC, unDEFER wrote: "libs-posix": ["db"], "sourceFiles-windows-dmd": ["libdb53d.lib", "WS_32.LIB"], "dflags-windows": ["-m32mscoff"], "subPackages": [ I understand that I don't must add "sourceFiles-windows-dmd" to lib project, I

Re: The order of libraries makes error in dub

2016-12-05 Thread unDEFER via Digitalmars-d-learn
On Monday, 5 December 2016 at 15:16:27 UTC, unDEFER wrote: 2) Its put to linker command at the first "libdb53d.lib WS2_32.lib" and AFTER that -m32mscoff. As result "cannot open file". Oh, the reason was mistype. And I have found how-to hide linker warning ("lflags-windows":

Re: The order of libraries makes error in dub

2016-12-05 Thread rikki cattermole via Digitalmars-d-learn
On 06/12/2016 3:59 AM, Mike Parker wrote: snip Also, let's be clear here, the errors you saw above are linker errors, not DUB errors. This one in particular is very common on Windows when using the MS linker: warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use

Re: The order of libraries makes error in dub

2016-12-05 Thread unDEFER via Digitalmars-d-learn
On Monday, 5 December 2016 at 14:59:26 UTC, Mike Parker wrote: "libs-windows-dmd":["libdb53d.lib","ws2_32.lib"] I have used "sourceFiles-windows-dmd", because it is the single that I could find. Thank you, "libs-windows-dmd":["libdb53d","WS2_32"] works much better, but again these errors:

Re: the best language I have ever met(?)

2016-12-05 Thread Igor Shirkalin via Digitalmars-d-learn
On Saturday, 3 December 2016 at 15:02:35 UTC, eugene wrote: On Friday, 18 November 2016 at 17:54:52 UTC, Igor Shirkalin wrote: That was preface. Now I have server written in D for C++ pretty ancient client. Most things are three times shorter in size and clear (@clear? suffix). All

Re: the best language I have ever met(?)

2016-12-05 Thread eugene via Digitalmars-d-learn
On Monday, 5 December 2016 at 16:07:41 UTC, Igor Shirkalin wrote: I didnt count, but its about ten thousend a year, i.e. nothing. if you earned nothing using D language why do you recommend it?))) People usually earn money using programming langs.