Re: Networking library

2018-03-14 Thread Seb via Digitalmars-d-learn
On Thursday, 15 March 2018 at 00:10:28 UTC, Cecil Ward wrote: On Thursday, 15 March 2018 at 00:06:49 UTC, Cecil Ward wrote: Can anyone point me in the direction of a library that provides very very lightweight (minimum overhead) asynchronous i/o routines for - shopping list [...] Actually

[Issue 18484] [dip1000] Subtype allows reference to escape with implicit casting

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18484 --- Comment #2 from Walter Bright --- https://github.com/dlang/dmd/pull/8036 --

[Issue 18615] Rebindable!A doesn't use class A's opEquals (returns a is b instead)

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18615 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

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)

[Issue 18484] [dip1000] Subtype allows reference to escape with implicit casting

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18484 Walter Bright changed: What|Removed |Added CC|

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

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

[Issue 18615] New: Rebindable!A doesn't use class A's opEquals (returns a is b instead)

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18615 Issue ID: 18615 Summary: Rebindable!A doesn't use class A's opEquals (returns a is b instead) Product: D Version: D2 Hardware: x86_64 OS: Linux

[Issue 18540] [scope] incorrect "escapes a reference to parameter e, perhaps annotate with return"

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18540 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18554] `tupleof` ignoring `private` shouldn't be accepted in @safe code

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18554 Walter Bright changed: What|Removed |Added CC|

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

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) ?

[Issue 18592] Associative array assignment with a destructor should be @safe if the destructor is @safe

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18592 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

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

Re: How do I make only the array itself immutable?

2018-03-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, March 15, 2018 02:06:23 Marc via Digitalmars-d-learn wrote: > Can I make it work? > > >struct S > >{ > > > > int[] l; > > > >} > > then > > >auto s = S(); > >s.l ~= 1; // ok > >s.l = []; // error It's not possible to do anything like that, and it really doesn't make sense when you

How do I make only the array itself immutable?

2018-03-14 Thread Marc via Digitalmars-d-learn
Can I make it work? struct S { int[] l; } then auto s = S(); s.l ~= 1; // ok s.l = []; // error

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

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)

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

[Issue 18614] New: dmd source uses bool return inconsistently (true should mean success)

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18614 Issue ID: 18614 Summary: dmd source uses bool return inconsistently (true should mean success) Product: D Version: D2 Hardware: x86 OS: All Status:

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.

[Issue 18613] New: Documentation: recommended construction/destruction patterns for manual memory management

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18613 Issue ID: 18613 Summary: Documentation: recommended construction/destruction patterns for manual memory management Product: D Version: D2 Hardware: All OS: All

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 >>>

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: Networking library

2018-03-14 Thread Cecil Ward via Digitalmars-d-learn
On Thursday, 15 March 2018 at 00:06:49 UTC, Cecil Ward wrote: Can anyone point me in the direction of a library that provides very very lightweight (minimum overhead) asynchronous i/o routines for - shopping list [...] Actually I realise that if I could simply write a wrapper pretty

Re: CTFE and -betterC

2018-03-14 Thread Flamaros via Digitalmars-d-learn
On Wednesday, 14 March 2018 at 01:17:54 UTC, rikki cattermole wrote: You will still need DllMain, that is a platform requirement. I am not sure about that because when DllAnalyser don't see it in the opengl32.dll from the system32 directory. And the documentation indicate that it is

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

Networking library

2018-03-14 Thread Cecil Ward via Digitalmars-d-learn
Can anyone point me in the direction of a library that provides very very lightweight (minimum overhead) asynchronous i/o routines for - shopping list 1. sending and receiving IPv4 / IPv6 packets, 2. sending receiving ICMP and 3, handling incoming outgoing TCP connections and 4. handling SCTP

[Issue 18612] New: missing debug info: frame locals (eg lldb fr v) not shown with dmd (works with ldc)

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18612 Issue ID: 18612 Summary: missing debug info: frame locals (eg lldb fr v) not shown with dmd (works with ldc) Product: D Version: D2 Hardware: x86 OS: Mac OS X

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

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

Re: Function argument that is a pointer to memory which the function is not allowed to modify, as in C const

2018-03-14 Thread ag0aep6g via Digitalmars-d-learn
On 03/14/2018 11:23 PM, Cecil Ward wrote: say in C I have a function with a pointer argument     foo( const sometype_t * p ) I have asked about this D nightmare before. Using the same pattern in D or the in argument qualifier as far as I can see the value of the pointer is then itself

Re: Function argument that is a pointer to memory which the function is not allowed to modify, as in C const

2018-03-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, March 14, 2018 22:23:47 Cecil Ward via Digitalmars-d-learn wrote: > say in C I have a function with a pointer argument > foo( const sometype_t * p ) > > I have asked about this D nightmare before. Using the same > pattern in D or the in argument qualifier as far as I can see

Re: What is the "right" way to create a generic type getter (and setter) ?

2018-03-14 Thread ag0aep6g via Digitalmars-d-learn
On 03/14/2018 11:13 PM, James Blachly wrote: Suppose I have a struct (which is really a memory map of a data file I am reading in) with too many data members to reasonably code getters/setters for by hand.  I wish to either retrieve individual values or set individual values, which could be

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

Function argument that is a pointer to memory which the function is not allowed to modify, as in C const

2018-03-14 Thread Cecil Ward via Digitalmars-d-learn
say in C I have a function with a pointer argument foo( const sometype_t * p ) I have asked about this D nightmare before. Using the same pattern in D or the in argument qualifier as far as I can see the value of the pointer is then itself effectively locked made constant. Without

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

What is the "right" way to create a generic type getter (and setter) ?

2018-03-14 Thread James Blachly via Digitalmars-d-learn
For context, please keep in mind I am coming from a python background, but am very much enjoying strong typing, although it is taking some significant adjustment. Suppose I have a struct (which is really a memory map of a data file I am reading in) with too many data members to reasonably

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: Seeking lecturer - D language (Moscow)

2018-03-14 Thread Aliak via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 11:44:10 UTC, Simen Kjærås wrote: https://issues.dlang.org/show_bug.cgi?id=5710 might be worth it, even if it means moving from friends and a comfy job in Norway... -- Simen !!! Haha Norway? So up for a Norway D meetup? Oslo? Turns out I even work with

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

Re: Seeking lecturer - D language (Moscow)

2018-03-14 Thread Stefan Koch via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 11:44:10 UTC, Simen Kjærås wrote: On Wednesday, 14 March 2018 at 11:38:20 UTC, Dmitry Olshansky wrote: - I owe you a bottle of your favorite beverage and your favorite bug in Bugzilla if you agree ;) https://issues.dlang.org/show_bug.cgi?id=5710 might be worth

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,

[Issue 18172] std.getopt should allow taking parameters by `ref` (like std.format.formattedRead), s.t. it can be used in @safe

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18172 Jonathan M Davis changed: What|Removed |Added CC|

[Issue 18172] std.getopt should allow taking parameters by `ref` (like std.format.formattedRead), s.t. it can be used in @safe

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18172 --- Comment #2 from Jack Stouffer --- Actually the problem is way worse. Consider string file1 = "file.dat"; string file2 = "file2.dat"; getopt(args, "file1", "info about arg", file1, "file2", file2);

[Issue 18172] std.getopt should allow taking parameters by `ref` (like std.format.formattedRead), s.t. it can be used in @safe

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18172 Jack Stouffer changed: What|Removed |Added Keywords||safe

Re: Proposal for a standard Decimal type in alpha

2018-03-14 Thread rumbu via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 15:18:18 UTC, Jordi Gutiérrez Hermoso wrote: On Wednesday, 14 March 2018 at 14:57:12 UTC, rumbu wrote: For 20 decimal digits, you can use decimal128 (having a 34 decimal digits precision) and set the context precision to 20.

[Issue 7804] Cannot alias __traits directly

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7804 Basile B. changed: What|Removed |Added Keywords||pull --- Comment #11 from

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

Ecoji-d v1.0.0 is released - Base1024 using emojis 

2018-03-14 Thread Anton Fediushin via Digitalmars-d-announce
, I'm glad to announce that ecoji-d - pure D implementation of ecoji encoding version 1️⃣.0️⃣.0️⃣ is finally released❗ What is ecoji? Ecoji encodes data as base1024 with an emoji character set. It can be used instead of boring and old base64 冷冷冷. Encoding example: --- $ echo "Base64 is so

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

[Issue 18611] New: struct initializer works for dynamic arrays but not associative arrays

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18611 Issue ID: 18611 Summary: struct initializer works for dynamic arrays but not associative arrays Product: D Version: D2 Hardware: All OS: All Status:

Re: Why does struct initializer works for arrays but not for associative arrays?

2018-03-14 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 14 March 2018 at 15:17:54 UTC, Jonathan M Davis wrote: On Wednesday, March 14, 2018 13:36:51 Andre Pany via Digitalmars-d-learn wrote: [...] Well, I think that you have two issues here: 1. Struct literals work in only a few, specific circumstances. Why, I don't know, but IIRC,

Re: Why does struct initializer works for arrays but not for associative arrays?

2018-03-14 Thread Seb via Digitalmars-d-learn
On Wednesday, 14 March 2018 at 15:17:54 UTC, Jonathan M Davis wrote: On Wednesday, March 14, 2018 13:36:51 Andre Pany via Digitalmars-d-learn wrote: [...] Well, I think that you have two issues here: 1. Struct literals work in only a few, specific circumstances. Why, I don't know, but IIRC,

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

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

[Issue 18610] New: dman missing in 2.079 Windows package

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18610 Issue ID: 18610 Summary: dman missing in 2.079 Windows package Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: trivial

Re: Why does file order matters when using -run option?

2018-03-14 Thread Seb via Digitalmars-d-learn
On Wednesday, 14 March 2018 at 14:44:24 UTC, Marc wrote: assume the files: app.d void main() { import myModule : foo; writeln(foo(...)); } myModule.d module myModule; int foo(int n) { } the following fail: dmd -run app.d mymodule.d give error like this: Error: module

[Issue 18417] Make const and immutable postblit constructors illegal

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18417 --- Comment #8 from Jonathan M Davis --- (In reply to RazvanN from comment #6) > PR : https://github.com/dlang/dmd/pull/8032 > > The PR makes it illegal to declare a postblit const/immutable/shared, > however, > it is

[Issue 15869] RVO can overwrite argument

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15869 --- Comment #8 from FeepingCreature --- Agreed. --

Re: Proposal for a standard Decimal type in alpha

2018-03-14 Thread Jordi Gutiérrez Hermoso via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 14:57:12 UTC, rumbu wrote: For 20 decimal digits, you can use decimal128 (having a 34 decimal digits precision) and set the context precision to 20. http://rumbu13.github.io/decimal/doc/decimal.html#.DecimalControl.precision I would also sometimes like around

Re: Why does struct initializer works for arrays but not for associative arrays?

2018-03-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, March 14, 2018 13:36:51 Andre Pany via Digitalmars-d-learn wrote: > Hi, > > I do not understand why struct initializer works for arrays but > not for > associative arrays: > > struct Bar > { > string s; > } > > struct Foo > { > Bar[string] asso; > Bar[] arr; > } > >

[Issue 18417] Make const and immutable postblit constructors illegal

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18417 --- Comment #7 from Radu Racariu --- As Steven Schveighoffer asked, how do you see an immutable refcounted struct working after this change? Consider this simplified example:

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: Why does struct initializer works for arrays but not for associative arrays?

2018-03-14 Thread Uknown via Digitalmars-d-learn
On Wednesday, 14 March 2018 at 13:36:51 UTC, Andre Pany wrote: Hi, I do not understand why struct initializer works for arrays but not for associative arrays: struct Bar { string s; } struct Foo { Bar[string] asso; Bar[] arr; } void main() { Foo foo = { arr: [{s:

Re: Proposal for a standard Decimal type in alpha

2018-03-14 Thread Gary Willoughby via Digitalmars-d-announce
On Thursday, 21 December 2017 at 13:59:28 UTC, Jack Stouffer wrote: A couple of months ago, Andrei noted that a donor asked for a precise decimal type for D specifically: https://forum.dlang.org/post/osnema$d5s$1...@digitalmars.com. I've also heard this asked for many times, so I decided to

Re: Proposal for a standard Decimal type in alpha

2018-03-14 Thread rumbu via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 14:41:21 UTC, Jordi Gutiérrez Hermoso wrote: On Wednesday, 14 March 2018 at 14:29:48 UTC, Seb wrote: https://forum.dlang.org/thread/mutegviphsjwqzqfo...@forum.dlang.org?page=1 While certainly impressive and feature-complete, rumbu's isn't a bigdecimal library.

Re: "Error: address of variable this assigned to this with longer lifetime"

2018-03-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, March 14, 2018 07:11:49 Nathan S. via Digitalmars-d-learn wrote: > On Tuesday, 13 March 2018 at 22:33:56 UTC, Jonathan M Davis wrote: > > And you can't get rid of it, because the object can still be > > moved, which would invalidate the pointer that you have > > referring to the

[Issue 18417] Make const and immutable postblit constructors illegal

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18417 --- Comment #6 from RazvanN --- PR : https://github.com/dlang/dmd/pull/8032 The PR makes it illegal to declare a postblit const/immutable/shared, however, it is still possible to make a postblit const/immutable/shared by

Re: Why does file order matters when using -run option?

2018-03-14 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 14 March 2018 at 14:44:24 UTC, Marc wrote: Why does -run fail here? I thought it was a shorthand to this batch: Check the help text: $ dmd -h dmd [...] -run [...] Argument to pass when running the resulting program Notice that there's only one file there.

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

Why does file order matters when using -run option?

2018-03-14 Thread Marc via Digitalmars-d-learn
assume the files: app.d void main() { import myModule : foo; writeln(foo(...)); } myModule.d module myModule; int foo(int n) { } the following fail: dmd -run app.d mymodule.d give error like this: Error: module `myModule` is in file 'myModule.d' which cannot be read

Re: Proposal for a standard Decimal type in alpha

2018-03-14 Thread Jordi Gutiérrez Hermoso via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 14:29:48 UTC, Seb wrote: https://forum.dlang.org/thread/mutegviphsjwqzqfo...@forum.dlang.org?page=1 While certainly impressive and feature-complete, rumbu's isn't a bigdecimal library. I need arbitrary precision (in this case, exactly 20 decimal digits), not

[Issue 18609] New: `is` expression identifier accessible outside `static if`

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18609 Issue ID: 18609 Summary: `is` expression identifier accessible outside `static if` Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

Re: Proposal for a standard Decimal type in alpha

2018-03-14 Thread Seb via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 14:23:44 UTC, Jordi Gutiérrez Hermoso wrote: On Friday, 12 January 2018 at 15:44:01 UTC, Jack Stouffer wrote: On Thursday, 21 December 2017 at 13:59:28 UTC, Jack Stouffer wrote: ... While I believe my library has certain API advantages, I'm really not

Re: Proposal for a standard Decimal type in alpha

2018-03-14 Thread Jordi Gutiérrez Hermoso via Digitalmars-d-announce
On Friday, 12 January 2018 at 15:44:01 UTC, Jack Stouffer wrote: On Thursday, 21 December 2017 at 13:59:28 UTC, Jack Stouffer wrote: ... While I believe my library has certain API advantages, I'm really not interested in duplicating a bunch of work when rumbu's version is pretty much

User Stories: Funkwerk

2018-03-14 Thread Mike Parker via Digitalmars-d-announce
The final post in the series on Funkwerk is the first in a new series of User Stories. Three Funkwerk developers share some of their enthusiasm about D. Michael Schnelle talks about the power of ranges, Ronny Spiegel tells us how generated code is better code, and Stefan Rohe shows off some of

Why does struct initializer works for arrays but not for associative arrays?

2018-03-14 Thread Andre Pany via Digitalmars-d-learn
Hi, I do not understand why struct initializer works for arrays but not for associative arrays: struct Bar { string s; } struct Foo { Bar[string] asso; Bar[] arr; } void main() { Foo foo = { arr: [{s: "123"}], asso: ["0": {s: "123"}] // does not work }; }

Re: The D Language Foundation at Open Collective

2018-03-14 Thread Martin Tschierschke via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 12:00:42 UTC, Seb wrote: On Wednesday, 14 March 2018 at 11:51:04 UTC, Martin Tschierschke wrote: [...] And last but not least place a small donate button on every page! Not sure whether that's a good idea, it might look a bit needy. We already have a donate

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?

Re: Added Wiki page Programming_in_D_tutorial_on_Embedded_Linux_ARM_devices

2018-03-14 Thread Uknown via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 09:29:26 UTC, dangbinghoo wrote: hello there, Just added a paper for cross compiling D on arm linux devices. https://wiki.dlang.org/Programming_in_D_tutorial_on_Embedded_Linux_ARM_devices As my english is not that good, every body who find mistakes just try to

Re: Added Wiki page Programming_in_D_tutorial_on_Embedded_Linux_ARM_devices

2018-03-14 Thread Uknown via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 10:25:04 UTC, Seb wrote: On Wednesday, 14 March 2018 at 09:29:26 UTC, dangbinghoo wrote: [snip] As my english is not that good, every body who find mistakes just try to fix it. The MediaWiki notation for links is [link title] - not Markdown. Pandoc can convert

Re: Seeking lecturer - D language (Moscow)

2018-03-14 Thread Dmitry Olshansky via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 11:44:10 UTC, Simen Kjærås wrote: On Wednesday, 14 March 2018 at 11:38:20 UTC, Dmitry Olshansky wrote: - I owe you a bottle of your favorite beverage and your favorite bug in Bugzilla if you agree ;) https://issues.dlang.org/show_bug.cgi?id=5710 might be worth

Re: The D Language Foundation at Open Collective

2018-03-14 Thread Seb via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 11:51:04 UTC, Martin Tschierschke wrote: On Tuesday, 13 March 2018 at 15:45:51 UTC, Mike Parker wrote: On Tuesday, 13 March 2018 at 15:26:24 UTC, Martin Tschierschke wrote: The Website needs the link, too!: https://dlang.org/foundation/donate.html Yes,

[Issue 7804] Cannot alias __traits directly

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7804 Basile B. changed: What|Removed |Added Keywords|rejects-valid | Severity|normal

Re: how to make private class member private

2018-03-14 Thread Seb via Digitalmars-d-learn
On Wednesday, 14 March 2018 at 04:30:17 UTC, Amorphorious wrote: On Wednesday, 14 March 2018 at 01:41:33 UTC, psychoticRabbit wrote: On Tuesday, 13 March 2018 at 21:38:59 UTC, Amorphorious wrote: You are a moron...etc..etc..etc..etc. See. This is what happens when you have

Re: The D Language Foundation at Open Collective

2018-03-14 Thread Martin Tschierschke via Digitalmars-d-announce
On Tuesday, 13 March 2018 at 15:45:51 UTC, Mike Parker wrote: On Tuesday, 13 March 2018 at 15:26:24 UTC, Martin Tschierschke wrote: The Website needs the link, too!: https://dlang.org/foundation/donate.html Yes, there's a PR for it waiting to be merged.

Re: Seeking lecturer - D language (Moscow)

2018-03-14 Thread Simen Kjærås via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 11:38:20 UTC, Dmitry Olshansky wrote: - I owe you a bottle of your favorite beverage and your favorite bug in Bugzilla if you agree ;) https://issues.dlang.org/show_bug.cgi?id=5710 might be worth it, even if it means moving from friends and a comfy job in

Seeking lecturer - D language (Moscow)

2018-03-14 Thread Dmitry Olshansky via Digitalmars-d-announce
At the moment it’s a bit early stage but we are looking for enthusiast who has spare time and desire to spread the knowledge of D supremacy among students. The course will replace an equivalent of 1 year C++ course, but may start as half-year proof of concept. Facts: - 3h per week, scheedule

Re: Added Wiki page Programming_in_D_tutorial_on_Embedded_Linux_ARM_devices

2018-03-14 Thread Aravinda VK via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 09:29:26 UTC, dangbinghoo wrote: hello there, Just added a paper for cross compiling D on arm linux devices. https://wiki.dlang.org/Programming_in_D_tutorial_on_Embedded_Linux_ARM_devices As my english is not that good, every body who find mistakes just try to

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

Re: RefRange behavior

2018-03-14 Thread Alex via Digitalmars-d-learn
On Wednesday, 14 March 2018 at 10:22:45 UTC, Alex wrote: Is there a simple workaround, maybe? ok, the workaround would be to enumerate the member and to use the former notation.

[Issue 15869] RVO can overwrite argument

2018-03-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15869 Ketmar Dark changed: What|Removed |Added CC|

  1   2   >