Dlang,Socket,Chat Server

2018-03-14 Thread sarahjohn via Digitalmars-d
I want to write a chat server. Using the programming language D. (Dlang) It is desirable to use OOP. My example.(Not working) import std.stdio; import std.concurrency; import core.thread; import std.conv; import std.socket; synchronized class DataInfo{ shared this() { } public

Re: Confusing TLS

2018-03-14 Thread matthewwade via Digitalmars-d
Ensure yourself and your clients' information. Get it today to comprehend compelling and effective confirmation.https://www.courseworkempire.co.uk/

Re: dmd -unittest= (same syntax as -i)

2018-03-14 Thread Seb via Digitalmars-d
On Wednesday, 14 March 2018 at 21:22:01 UTC, Timothee Cour wrote: would a PR for `dmd -unittest= (same syntax as -i)` be welcome? wouldn't that avoid all the complicatiosn with version(StdUnittest) ? eg use case: # compile with unittests just for package foo (excluding subpackage foo.bar) dmd

Re: Opt-in non-null class references?

2018-03-14 Thread SimonN via Digitalmars-d
On Sunday, 11 March 2018 at 09:28:39 UTC, aliak wrote: Does this maybe boil down to if two templates should be covariant on their parameter types? I'm not sure if this is always good. I haven't thought about it deeply, but I assume that some templated functions should be contravariant, and th

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread 9il via Digitalmars-d
On Wednesday, 14 March 2018 at 16:16:55 UTC, Andrei Alexandrescu wrote: On 03/14/2018 01:01 AM, 9il wrote: On Tuesday, 13 March 2018 at 17:10:03 UTC, jmh530 wrote: "Note that using row-major ordering may require more memory and time than column-major ordering, because the routine must transpos

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread 9il via Digitalmars-d
On Wednesday, 14 March 2018 at 12:45:24 UTC, jmh530 wrote: On Wednesday, 14 March 2018 at 05:01:38 UTC, 9il wrote: Maybe we should use only column major order. --Ilya In my head I had been thinking that the Mat type you want to introduce would be just an alias to a 2-dimensional Slice with

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread 9il via Digitalmars-d
On Tuesday, 13 March 2018 at 17:10:03 UTC, jmh530 wrote: [1] mir-lapack uses Canonical slices in many of these functions. I assume this is correct, but I have a nagging feeling that I should compare the results of some of these functions with another language to really convince myself...When y

Re: dmd -unittest= (same syntax as -i)

2018-03-14 Thread H. S. Teoh via Digitalmars-d
On Thu, Mar 15, 2018 at 01:08:11AM +, Jonathan Marler via Digitalmars-d wrote: > On Wednesday, 14 March 2018 at 21:22:01 UTC, Timothee Cour wrote: > > would a PR for `dmd -unittest= (same syntax as -i)` be > > welcome? wouldn't that avoid all the complicatiosn with > > version(StdUnittest) ?

Re: core.math and std.math

2018-03-14 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 15 March 2018 at 00:37:39 UTC, jmh530 wrote: On Thursday, 15 March 2018 at 00:16:05 UTC, Manu wrote: Why does core.math exist? It's basically empty, but with a couple of select functions which seem arbitrarily chosen... Isn't core.math compiler intrinsics? The corresponding funct

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread Paul O'Neil via Digitalmars-d
On 03/14/2018 02:33 AM, 9il wrote: On Wednesday, 14 March 2018 at 05:40:42 UTC, Manu wrote: I'd like to understand why implement a distinct vector type, rather than just a Nx1/1xN matrix? This is just and API quesiton of how elements of Nx1/1xN matrix should be accessed. E.g. should one spec

Re: dmd -unittest= (same syntax as -i)

2018-03-14 Thread Jonathan Marler via Digitalmars-d
On Wednesday, 14 March 2018 at 21:22:01 UTC, Timothee Cour wrote: would a PR for `dmd -unittest= (same syntax as -i)` be welcome? wouldn't that avoid all the complicatiosn with version(StdUnittest) ? eg use case: # compile with unittests just for package foo (excluding subpackage foo.bar) dmd

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread jmh530 via Digitalmars-d
On Wednesday, 14 March 2018 at 23:30:55 UTC, Sam Potter wrote: [snip] OTOH, the fact that D doesn't have a REPL may kill it from the get go (hard to do exploratory data analysis). There is one in dlang-community (there might be others, can't recall), but it does not yet support Windows and

Re: core.math and std.math

2018-03-14 Thread jmh530 via Digitalmars-d
On Thursday, 15 March 2018 at 00:16:05 UTC, Manu wrote: Why does core.math exist? It's basically empty, but with a couple of select functions which seem arbitrarily chosen... Isn't core.math compiler intrinsics? The corresponding functions in std.math call the core.math versions.

Re: D course material

2018-03-14 Thread Dmitry Olshansky via Digitalmars-d
On Wednesday, 14 March 2018 at 20:27:26 UTC, Ali Çehreli wrote: On 03/14/2018 03:51 AM, Dmitry Olshansky wrote: contact [...] Stewart directly. I think you mean Carl Sturtivant. Oh.. yes, I’m sorry for such a gross misspelling. Ali

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread Manu via Digitalmars-d
On 14 March 2018 at 09:16, Andrei Alexandrescu via Digitalmars-d wrote: > On 03/14/2018 01:01 AM, 9il wrote: >> >> On Tuesday, 13 March 2018 at 17:10:03 UTC, jmh530 wrote: >>> >>> "Note that using row-major ordering may require more memory and time than >>> column-major ordering, because the routi

core.math and std.math

2018-03-14 Thread Manu via Digitalmars-d
Why does core.math exist? It's basically empty, but with a couple of select functions which seem arbitrarily chosen...

Re: I have a patch to let lldb demangle D symbols ; help welcome to improve it

2018-03-14 Thread Timothee Cour via Digitalmars-d
> Even with DMD 2.079 the frame locals don't show up... LDC FTW! confirmed, `fr v` shows frame locals for a binary built with ldc but not dmd (independent of this PR though :) ) => just submitted https://issues.dlang.org/show_bug.cgi?id=18612 On Tue, Mar 13, 2018 at 9:29 AM, Luís Marques via Digi

Re: I have a patch to let lldb demangle D symbols ; help welcome to improve it

2018-03-14 Thread Timothee Cour via Digitalmars-d
> (BTW, if I commented out the plugin path setting I would get an assertion > failure. Just FYI if that helps with the code review.) fixed ; thanks for reporting! On Tue, Mar 13, 2018 at 9:29 AM, Luís Marques via Digitalmars-d wrote: > On Tuesday, 13 March 2018 at 14:00:39 UTC, Luís Marques wr

Re: DConf 2018 - The touristy bits

2018-03-14 Thread Walter Bright via Digitalmars-d
On 3/13/2018 4:19 AM, Chris wrote: I will probably not be able to make it to DConf this year. But here are some tips for those who are interested in history and / or sight-seeing: Thank you, most appreciated!

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread Sam Potter via Digitalmars-d
On Wednesday, 14 March 2018 at 22:17:49 UTC, jmh530 wrote: On Wednesday, 14 March 2018 at 20:21:15 UTC, Sam Potter wrote: Sure. The key word in my statement was "ideally". :-) For what it's worth, there is already an "informal spec" in the form of the high-level interface for numerical linear

Re: dmd -unittest= (same syntax as -i)

2018-03-14 Thread Timothee Cour via Digitalmars-d
I originally proposed it here: https://forum.dlang.org/post/mailman.3166.1517969180.9493.digitalmar...@puremagic.com but it was buried under another thread On Wed, Mar 14, 2018 at 3:04 PM, Adam D. Ruppe via Digitalmars-d wrote: > On Wednesday, 14 March 2018 at 21:22:01 UTC, Timothee Cour wrote: >

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread jmh530 via Digitalmars-d
On Wednesday, 14 March 2018 at 20:21:15 UTC, Sam Potter wrote: Sure. The key word in my statement was "ideally". :-) For what it's worth, there is already an "informal spec" in the form of the high-level interface for numerical linear algebra and sci. comp. that has been developed (over three

Re: dmd -unittest= (same syntax as -i)

2018-03-14 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 14 March 2018 at 21:22:01 UTC, Timothee Cour wrote: would a PR for `dmd -unittest= (same syntax as -i)` be welcome? so when this came up on irc earlier (was that you?) this was the first thought that came to my mind. I'd support it, tho I'm no decision maker.

dmd -unittest= (same syntax as -i)

2018-03-14 Thread Timothee Cour via Digitalmars-d
would a PR for `dmd -unittest= (same syntax as -i)` be welcome? wouldn't that avoid all the complicatiosn with version(StdUnittest) ? eg use case: # compile with unittests just for package foo (excluding subpackage foo.bar) dmd -unittest=foo -unittest=-foo.bar -i main.d

Re: Special Code String for mixins

2018-03-14 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 14 March 2018 at 15:50:13 UTC, Jonathan Marler wrote: I've got a PR for dmd (https://github.com/dlang/dmd/pull/7988) that implements "interpolated strings" which makes generating code with strings MUCH nicer, i.e. Really nice. :thumbs-up:

Re: D course material

2018-03-14 Thread Ali Çehreli via Digitalmars-d
On 03/14/2018 03:51 AM, Dmitry Olshansky wrote: contact [...] Stewart directly. I think you mean Carl Sturtivant. Ali

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread Sam Potter via Digitalmars-d
On Wednesday, 14 March 2018 at 17:36:18 UTC, bachmeier wrote: On Wednesday, 14 March 2018 at 17:22:16 UTC, Sam Potter wrote: Ideally data structures and algorithms covering this would be in the standard library? I sure hope not. At least not for a long time anyway. It would be hard to make an

Re: Special Code String for mixins

2018-03-14 Thread Stefan Koch via Digitalmars-d
On Wednesday, 14 March 2018 at 15:50:13 UTC, Jonathan Marler wrote: On Wednesday, 15 March 2017 at 13:50:28 UTC, Inquie wrote: [...] I've got a PR for dmd (https://github.com/dlang/dmd/pull/7988) that implements "interpolated strings" which makes generating code with strings MUCH nicer, i.e.

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread bachmeier via Digitalmars-d
On Wednesday, 14 March 2018 at 17:22:16 UTC, Sam Potter wrote: Ideally data structures and algorithms covering this would be in the standard library? I sure hope not. At least not for a long time anyway. It would be hard to make any progress if it were in the standard library. At this stage f

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread Sam Potter via Digitalmars-d
On Wednesday, 14 March 2018 at 16:16:55 UTC, Andrei Alexandrescu wrote: Maybe we should use only column major order. --Ilya Has row-major fallen into disuse? Leaving aside interop between libraries and domains where row major is often used (e.g. computer graphics), the issue is semantic, I

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread jmh530 via Digitalmars-d
On Wednesday, 14 March 2018 at 16:16:55 UTC, Andrei Alexandrescu wrote: Has row-major fallen into disuse? [snip] C has always been row major and is not in disuse (the GSL library has gsl_matrix and that is row-major). However, Fortran and many linear algebra languages/frameworks have also al

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread Andrei Alexandrescu via Digitalmars-d
On 03/14/2018 01:01 AM, 9il wrote: On Tuesday, 13 March 2018 at 17:10:03 UTC, jmh530 wrote: "Note that using row-major ordering may require more memory and time than column-major ordering, because the routine must transpose the row-major order to the column-major order required by the underlyin

Re: Special Code String for mixins

2018-03-14 Thread Jonathan Marler via Digitalmars-d
On Wednesday, 15 March 2017 at 13:50:28 UTC, Inquie wrote: I hate building code strings for string mixins as it's very ugly and seems like a complete hack. How bout, instead, we have a special code string similar to a multiline string that allows us to represent valid D code. The compiler can

Re: #dbugfix Issue 15984

2018-03-14 Thread MWumpusZ via Digitalmars-d
+1 An unfortunate thing with the bug report is that compact examples tend to involve fairly dodgy looking assert(false) contracts - which look and feel like "you're doing it wrong". BUT the issue exists in realistic code, it just isn't as compactly demonstrable :|

Re: D course material

2018-03-14 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, March 14, 2018 08:31:17 M.M. via Digitalmars-d wrote: > On Tuesday, 13 March 2018 at 23:05:24 UTC, Jonathan M Davis wrote: > > On Tuesday, March 13, 2018 21:30:13 aberba via Digitalmars-d > > > > wrote: > >> [...] > > > > LOL. TDPL big? It's only 463 pages including the index. I have

Re: Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

2018-03-14 Thread jmh530 via Digitalmars-d
On Wednesday, 14 March 2018 at 05:01:38 UTC, 9il wrote: Maybe we should use only column major order. --Ilya In my head I had been thinking that the Mat type you want to introduce would be just an alias to a 2-dimensional Slice with a particular SliceKind and iterator. Am I right on that? I

Re: D course material

2018-03-14 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote: Hi, folks! I’m testing waters for a D course at one University for first time it’ll be an optional thing. It’s still discussed but may very well become a reality. Thanks for the answers! Answering some ideas: - yes, TDPL mi

Re: D course material

2018-03-14 Thread Martin Tschierschke via Digitalmars-d
On Wednesday, 14 March 2018 at 08:53:17 UTC, Andre Pany wrote: On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote: [...] Hi Dmitry, for presenting D to my team I used following example. It highlights some features of D: Meta programming, templates, CTFE, UFCS, OOP in D, Func

Re: D course material

2018-03-14 Thread Andre Pany via Digitalmars-d
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote: Hi, folks! I’m testing waters for a D course at one University for first time it’ll be an optional thing. It’s still discussed but may very well become a reality. Before you ask - no, I’m not lecturing and in fact, I didn’t

Re: D course material

2018-03-14 Thread M.M. via Digitalmars-d
On Tuesday, 13 March 2018 at 23:05:24 UTC, Jonathan M Davis wrote: On Tuesday, March 13, 2018 21:30:13 aberba via Digitalmars-d wrote: [...] LOL. TDPL big? It's only 463 pages including the index. I have plenty of books that are double that size, if not larger. Regardless, TDPL is an excell

Re: Special Code String for mixins

2018-03-14 Thread Robert M. Münch via Digitalmars-d
On 2017-03-15 13:50:28 +, Inquie said: I hate building code strings for string mixins as it's very ugly and seems like a complete hack. ... Even a bit old, I would like to pick-up this topic, as I totally agree with the statement. Thinking this a bit further, it would be very nice to h