[OT] tilix packaging

2017-11-29 Thread drug via Digitalmars-d
Gerald, I'd like to learn how to make deb packages, could you share your scripts etc you use to build packages for tilix? Thank in advance)

Re: We're looking for a Software Developer! (D language)

2017-11-29 Thread Ola Fosheim Grostad via Digitalmars-d-announce
On Wednesday, 29 November 2017 at 15:11:17 UTC, Paulo Pinto wrote: Wirth puts it nicely, it is all about algorithms, data structures and learning how to apply them to any language. Yes, they also mention machine learning, which borrows from many fields close to applied mathematics. Linear

Re: Private imports and Objects

2017-11-29 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 30, 2017 06:29:43 helxi via Digitalmars-d-learn wrote: > 1. Why are imports visible from outside the package when you do > selective imports? > > //mod.d > module mod; > > import std.stdio : writeln; > > public void greet() > { > writeln("Hello"); > } > > > //app.d >

Re: Thoughts about D

2017-11-29 Thread Ola Fosheim Grostad via Digitalmars-d
On Thursday, 30 November 2017 at 03:29:56 UTC, Walter Bright wrote: The code *size* causes problems because it pushes the executing code out of the cache. Not if you do a branch to a cold cacheline on assert failure.

Re: std.range.interfaces : InputRange moveFront

2017-11-29 Thread Ali Çehreli via Digitalmars-d-learn
On 11/29/2017 08:31 PM, Tony wrote: What does the moveFront() method do in the InputRange interface? std.range.interfaces : InputRange.moveFront() move is an operation that transfers the state of the source to the destination. The front element becomes its .init value and its previous

Private imports and Objects

2017-11-29 Thread helxi via Digitalmars-d-learn
1. Why are imports visible from outside the package when you do selective imports? //mod.d module mod; import std.stdio : writeln; public void greet() { writeln("Hello"); } //app.d import mod; void main() { mod.greet(); writeln("You should not be seeing this."); }

Re: Thoughts about D

2017-11-29 Thread Walter Bright via Digitalmars-d
On 11/29/2017 8:49 PM, Jonathan M Davis wrote: Well, we could always have an alternate implementation of assertions for release builds that acted closer to C's assert. My plan for release builds is to have an option to make them just execute a HALT instruction. Short, sweet, un-ignorable and

Re: Thoughts about D

2017-11-29 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 30 November 2017 at 04:21:20 UTC, Steven Schveighoffer wrote: On 11/29/17 10:29 PM, Walter Bright wrote: Another issue (I should check this again) was doing null checks on member function calls, which is not necessary since if they're null it'll seg fault. Just happened last

Re: Thoughts about D

2017-11-29 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, November 29, 2017 20:08:53 Walter Bright via Digitalmars-d wrote: > On 11/29/2017 8:02 PM, Jonathan M Davis wrote: > > Well, given that assertions would normally be used in a debug build > > where > > you generally don't optimize, and the debug symbols are compiled in, I > >

std.range.interfaces : InputRange moveFront

2017-11-29 Thread Tony via Digitalmars-d-learn
What does the moveFront() method do in the InputRange interface? std.range.interfaces : InputRange.moveFront()

Re: Thoughts about D

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d
On 11/29/17 10:29 PM, Walter Bright wrote: Another issue (I should check this again) was doing null checks on member function calls, which is not necessary since if they're null it'll seg fault. Just happened last release. https://dlang.org/changelog/2.077.0.html#removePreludeAssert -Steve

Re: Changing the class data underneath some reference

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/29/17 10:22 PM, Jonathan M Davis wrote: With classes, you could also assign the entire state of the object similar to what you'd get with structs and opAssign, but you'd have to write a member function to do it. There's no reason that you couldn't do the equivalent of opAssign. It's just

Re: Thoughts about D

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d
On 11/29/17 10:23 PM, Walter Bright wrote: On 11/29/2017 6:54 PM, Steven Schveighoffer wrote: But even though it doesn't come with Windows, it can be installed once, and shared between all applications that use it. That's the theory. Unfortunately, that relies on the library not changing.

Re: Thoughts about D

2017-11-29 Thread Walter Bright via Digitalmars-d
On 11/29/2017 8:02 PM, Jonathan M Davis wrote: Well, given that assertions would normally be used in a debug build where you generally don't optimize, and the debug symbols are compiled in, I wouldn't think that that would matter much in most cases. I want them in the release build, which

Re: Thoughts about D

2017-11-29 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, November 29, 2017 19:29:56 Walter Bright via Digitalmars-d wrote: > On 11/29/2017 7:15 PM, Jonathan M Davis wrote: > > I wouldn't have expected assertions to cost much more than however much > > it costs to evaluate the expression being asserted unless the assertion > > fails. Now,

[Issue 18020] [Reg 2.078] no property opCmp for anon class

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18020 Mike changed: What|Removed |Added CC||slavo5...@yahoo.com --- Comment

Re: Thoughts about D

2017-11-29 Thread Walter Bright via Digitalmars-d
On 11/29/2017 7:15 PM, Jonathan M Davis wrote: I wouldn't have expected assertions to cost much more than however much it costs to evaluate the expression being asserted unless the assertion fails. Now, even that can slow down a program a fair bit, depending on what's being asserted and how many

Re: Andrei's "The D Programming Language" book. Up to date?

2017-11-29 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 29, 2017 17:26:11 Nick Treleaven via Digitalmars-d- learn wrote: > On Wednesday, 4 October 2017 at 20:49:26 UTC, John Gabriele wrote: > > What's changed in the language, library, and community since > > then that I should be aware of if following along with and > > learning

Re: Thoughts about D

2017-11-29 Thread Walter Bright via Digitalmars-d
On 11/29/2017 6:54 PM, Steven Schveighoffer wrote: But even though it doesn't come with Windows, it can be installed once, and shared between all applications that use it. That's the theory. Unfortunately, that relies on the library not changing. Microsoft changes it all the time, hence "dll

Re: Changing the class data underneath some reference

2017-11-29 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 29, 2017 21:12:58 Steven Schveighoffer via Digitalmars-d-learn wrote: > On 11/29/17 7:40 PM, David Colson wrote: > > Hello all! > > > > I'm getting settled into D and I came into a problem. A code sample > > shows it best: > > > > class SomeType > > { > > > > string

Re: Thoughts about D

2017-11-29 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, November 28, 2017 18:18:20 Walter Bright via Digitalmars-d wrote: > On 11/28/2017 9:27 AM, Jacob Carlborg wrote: > > Why would druntime be a barrier for you for those projects? > > When the C version is 90K and the translated D version is 1200K, it is a > barrier. It's a barrier for

[Issue 12625] [scope] [DIP1000] implicit slicing of RValue static array should be illegal

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12625 --- Comment #22 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b8cb63a01cc20051f0f057a1556bcec1533443fa fix Issue 12625 - [scope] [DIP1000] implicit slicing of

[Issue 12625] [scope] [DIP1000] implicit slicing of RValue static array should be illegal

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12625 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Thoughts about D

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d
On 11/29/17 9:16 PM, Walter Bright wrote: On 11/29/2017 3:36 PM, Jon Degenhardt wrote: On Wednesday, 29 November 2017 at 16:57:36 UTC, H. S. Teoh wrote: While generally I would still use fullblown D rather than BetterC for my projects, the bloat from druntime/phobos does still bother me at

Re: Changing the class data underneath some reference

2017-11-29 Thread A Guy With a Question via Digitalmars-d-learn
On Thursday, 30 November 2017 at 00:40:51 UTC, David Colson wrote: Hello all! I'm getting settled into D and I came into a problem. A code sample shows it best: class SomeType { string text; this(string input) {text = input;} } void main() { SomeType foo = new

Re: Thoughts about D

2017-11-29 Thread Walter Bright via Digitalmars-d
On 11/29/2017 3:36 PM, Jon Degenhardt wrote: On Wednesday, 29 November 2017 at 16:57:36 UTC, H. S. Teoh wrote: While generally I would still use fullblown D rather than BetterC for my projects, the bloat from druntime/phobos does still bother me at the back of my mind.  IIRC, the Phobos docs

Re: Thoughts about D

2017-11-29 Thread Walter Bright via Digitalmars-d
On 11/29/2017 8:57 AM, H. S. Teoh wrote: BetterC is a door-opener for an awful lot of areas D has been excluded from, and requiring druntime is a barrier for that. Doesn't this mean that we should rather focus our efforts on improving druntime instead of throwing out the baby with the bathwater

Re: Changing the class data underneath some reference

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/29/17 7:40 PM, David Colson wrote: Hello all! I'm getting settled into D and I came into a problem. A code sample shows it best: class SomeType {     string text;     this(string input) {text = input;} } void main() {     SomeType foo = new SomeType("Hello");     SomeType bar =

Re: Thoughts about D

2017-11-29 Thread A Guy With a Question via Digitalmars-d
On Thursday, 30 November 2017 at 00:23:10 UTC, codephantom wrote: On Thursday, 30 November 2017 at 00:05:10 UTC, Michael V. Franklin wrote: On Wednesday, 29 November 2017 at 16:57:36 UTC, H. S. Teoh wrote: Doesn't this mean that we should rather focus our efforts on improving druntime

Re: We're looking for a Software Developer! (D language)

2017-11-29 Thread Joakim via Digitalmars-d-announce
On Wednesday, 29 November 2017 at 10:47:31 UTC, aberba wrote: On Thursday, 8 January 2015 at 11:10:09 UTC, Johanna Burgos wrote: Your Mission Your Track Record Degree in Computer Science, or closely-related It baffles me that recruitment still works using this as a requirement. A CS

Re: Floating point types default to NaN?

2017-11-29 Thread codephantom via Digitalmars-d-learn
On Friday, 24 November 2017 at 14:30:44 UTC, A Guy With a Question wrote: I would have expected 0 to be the default value. What's the logic behind having them being NaN by default? https://dlang.org/spec/type.html http://www.drdobbs.com/cpp/nans-just-dont-get-no-respect/240005723

Re: Changing the class data underneath some reference

2017-11-29 Thread codephantom via Digitalmars-d-learn
On Thursday, 30 November 2017 at 00:52:25 UTC, codephantom wrote: ... sorry, don't know how the int * got in there ;-) Anyway..who said you can't use pointers in D? Just change: //SomeType bar = foo; SomeType * bar =

Re: Localization (i18n) Options

2017-11-29 Thread Gerald via Digitalmars-d
On Tuesday, 28 November 2017 at 07:39:19 UTC, Ivan Trombley wrote: On Sunday, 24 January 2016 at 19:18:28 UTC, Gerald wrote: On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote: Please, write a HowTo some where. GtkD lack of documentation it's very anoying. I've gotten this going with

Re: Changing the class data underneath some reference

2017-11-29 Thread codephantom via Digitalmars-d-learn
On Thursday, 30 November 2017 at 00:40:51 UTC, David Colson wrote: Hello all! I'm getting settled into D and I came into a problem. A code sample shows it best: class SomeType { string text; this(string input) {text = input;} } void main() { SomeType foo = new

Re: Changing the class data underneath some reference

2017-11-29 Thread David Colson via Digitalmars-d-learn
On Thursday, 30 November 2017 at 00:40:51 UTC, David Colson wrote: Hello all! I'm getting settled into D and I came into a problem. A code sample shows it best: class SomeType { string text; this(string input) {text = input;} } void main() { SomeType foo = new

Changing the class data underneath some reference

2017-11-29 Thread David Colson via Digitalmars-d-learn
Hello all! I'm getting settled into D and I came into a problem. A code sample shows it best: class SomeType { string text; this(string input) {text = input;} } void main() { SomeType foo = new SomeType("Hello"); SomeType bar = foo; foo = new SomeType("World");

Re: Thoughts about D

2017-11-29 Thread codephantom via Digitalmars-d
On Thursday, 30 November 2017 at 00:05:10 UTC, Michael V. Franklin wrote: On Wednesday, 29 November 2017 at 16:57:36 UTC, H. S. Teoh wrote: Doesn't this mean that we should rather focus our efforts on improving druntime instead of throwing out the baby with the bathwater with BetterC?

Re: Thoughts about D

2017-11-29 Thread Michael V. Franklin via Digitalmars-d
On Wednesday, 29 November 2017 at 16:57:36 UTC, H. S. Teoh wrote: Doesn't this mean that we should rather focus our efforts on improving druntime instead of throwing out the baby with the bathwater with BetterC? Exactly! We should be making a better D, not a better C. Mike

Re: Thoughts about D

2017-11-29 Thread Jon Degenhardt via Digitalmars-d
On Wednesday, 29 November 2017 at 16:57:36 UTC, H. S. Teoh wrote: While generally I would still use fullblown D rather than BetterC for my projects, the bloat from druntime/phobos does still bother me at the back of my mind. IIRC, the Phobos docs used to state that the philosophy for Phobos

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d
On 11/29/17 4:46 PM, Timon Gehr wrote: On 29.11.2017 20:49, Steven Schveighoffer wrote: On 11/29/17 2:01 PM, Timon Gehr wrote: OK, now I get what you are saying. In the same vein, I tested applying attributes to functions themselves: @("a") int fun() { return 0; } pragma(msg, typeof()); //

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread John via Digitalmars-d
On Wednesday, 29 November 2017 at 21:46:51 UTC, Timon Gehr wrote: On 29.11.2017 20:49, Steven Schveighoffer wrote: On 11/29/17 2:01 PM, Timon Gehr wrote: OK, now I get what you are saying. In the same vein, I tested applying attributes to functions themselves: @("a") int fun() { return 0; }

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Timon Gehr via Digitalmars-d
On 29.11.2017 20:49, Steven Schveighoffer wrote: On 11/29/17 2:01 PM, Timon Gehr wrote: OK, now I get what you are saying. In the same vein, I tested applying attributes to functions themselves: @("a") int fun() { return 0; } pragma(msg, typeof()); // int function() @("b") int gun() {

Re: Note from a donor

2017-11-29 Thread Joakim via Digitalmars-d
On Friday, 17 November 2017 at 23:35:49 UTC, MrSmith wrote: On Friday, 17 November 2017 at 23:31:07 UTC, David Nadlinger wrote: The more promising avenue would probably be to distribute LLD with DMD. This still leaves the system library licensing to deal with, but if I remember correctly, one

Re: Time to move logger from experimental to std ?

2017-11-29 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, November 29, 2017 14:32:54 Basile B. via Digitalmars-d wrote: > Hello, most of the changes made during the current year to the > std.experimental.logger package are related to the cosmetic > style. Isn't this a sign showing that the experimentation is > achieved ? > > > Facts: > -

Re: Chocolatey Packages for DMD, LDC, and GDC

2017-11-29 Thread Manuel Maier via Digitalmars-d
On Wednesday, 29 November 2017 at 16:04:04 UTC, Jacob Carlborg wrote: On 2017-11-28 20:04, Manuel Maier wrote: Another thing I don't think it does is patching the sc.ini with Visual Studio environment variables, like the dmd installer does. No, it basically only extracts the downloaded

Re: Time to move logger from experimental to std ?

2017-11-29 Thread Claude via Digitalmars-d
On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote: Hello, most of the changes made during the current year to the std.experimental.logger package are related to the cosmetic style. Isn't this a sign showing that the experimentation is achieved ? I tried deriving FileLogger

Re: First Impressions!

2017-11-29 Thread A Guy With a Question via Digitalmars-d
On Tuesday, 28 November 2017 at 22:08:48 UTC, Mike Parker wrote: On Tuesday, 28 November 2017 at 19:39:19 UTC, Michael V. Franklin wrote: This DIP is related (https://github.com/dlang/DIPs/blob/master/DIPs/DIP1012.md) but I don't know what's happening with it. It's awaiting formal

Re: Chocolatey Packages for DMD, LDC, and GDC

2017-11-29 Thread Manuel Maier via Digitalmars-d
On Wednesday, 29 November 2017 at 01:49:00 UTC, rjframe wrote: dvm works well with cmd; not so much with Powershell. Indeed, I was using powershell! Using cmd now and suddenly it all works. In Powershell, the current directory and working directory are separate; `cd` outside your home

Re: Basic questions about D lang?

2017-11-29 Thread Jesse Phillips via Digitalmars-d-learn
On Tuesday, 28 November 2017 at 13:39:11 UTC, Jayam wrote: Can we compile our program to multi program ? Based on your C# reference you must be referring to the "Mixed Platform" build option. No, that is a .NET thing and D is not on .NET (that project has died). D requires a more

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d
On 11/29/17 2:01 PM, Timon Gehr wrote: OK, now I get what you are saying. In the same vein, I tested applying attributes to functions themselves: @("a") int fun() { return 0; } pragma(msg, typeof()); // int function() @("b") int gun() { return 1; } pragma(msg, typeof()); // int function()

Re: Time to move logger from experimental to std ?

2017-11-29 Thread Nathan S. via Digitalmars-d
On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote: - There only 4 issues for logger Considering that one of those issues is that the logger outputs garbage when given a wstring or a dstring, I would not take this as an indication that it's time to "graduate" the logger from

Re: Time to move logger from experimental to std ?

2017-11-29 Thread notna via Digitalmars-d
On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote: Hello, most of the changes made during the current year to the std.experimental.logger package are related to the cosmetic style. Isn't this a sign showing that the experimentation is achieved ? [...] +1

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Timon Gehr via Digitalmars-d
On 29.11.2017 19:18, Steven Schveighoffer wrote: On 11/29/17 12:20 PM, Timon Gehr wrote: I don't understand what you mean. Function types _contain_ parameter declarations. (Including attributes and default initializers.) I too, am confused. I thought you meant that the types of the

Re: Andrei's "The D Programming Language" book. Up to date?

2017-11-29 Thread John Gabriele via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 17:26:11 UTC, Nick Treleaven wrote: On Wednesday, 4 October 2017 at 20:49:26 UTC, John Gabriele wrote: What's changed in the language, library, and community since then that I should be aware of if following along with and learning from that book? Here's a

Re: Thoughts about D

2017-11-29 Thread bpr via Digitalmars-d
On Wednesday, 29 November 2017 at 16:57:36 UTC, H. S. Teoh wrote: On Tue, Nov 28, 2017 at 06:18:20PM -0800, Walter Bright via Digitalmars-d wrote: [...] BetterC is a door-opener for an awful lot of areas D has been excluded from, and requiring druntime is a barrier for that. Doesn't this mean

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d
On 11/29/17 12:20 PM, Timon Gehr wrote: I don't understand what you mean. Function types _contain_ parameter declarations. (Including attributes and default initializers.) I too, am confused. I thought you meant that the types of the parameters would have attributes that might

Re: Andrei's "The D Programming Language" book. Up to date?

2017-11-29 Thread Nick Treleaven via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 17:50:59 UTC, Arun Chandrasekaran wrote: Multiple alias this You can only have one subtyping member currently. Shared Not all of shared's guarantees are implemented yet. SafeD @safe (and therefore SafeD) isn't fully implemented. So, it doesn't necessarily

Re: Andrei's "The D Programming Language" book. Up to date?

2017-11-29 Thread Arun Chandrasekaran via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 17:26:11 UTC, Nick Treleaven wrote: Here's a list of significant things - maybe incomplete: https://wiki.dlang.org/Differences_With_TDPL Multiple alias this You can only have one subtyping member currently. Shared Not all of shared's guarantees are

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-29 Thread Nick Treleaven via Digitalmars-d
On Sunday, 19 November 2017 at 22:54:38 UTC, Walter Bright wrote: I can't see the problem. You go from nullable to non-nullable by checking for null, and the other direction happens implicitly. Implicit conversions have their problems with overloading, The C# implementation doesn't affect

[Issue 18020] New: [Reg 2.078] no property opCmp for anon class

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18020 Issue ID: 18020 Summary: [Reg 2.078] no property opCmp for anon class Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid

Re: Andrei's "The D Programming Language" book. Up to date?

2017-11-29 Thread Nick Treleaven via Digitalmars-d-learn
On Wednesday, 4 October 2017 at 20:49:26 UTC, John Gabriele wrote: What's changed in the language, library, and community since then that I should be aware of if following along with and learning from that book? Here's a list of significant things - maybe incomplete:

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Timon Gehr via Digitalmars-d
On 29.11.2017 17:58, Steven Schveighoffer wrote: On 11/29/17 11:45 AM, Timon Gehr wrote: On 29.11.2017 17:21, Andrei Alexandrescu wrote: On 11/29/2017 07:53 AM, Seb wrote: UDAs for function arguments would be really awesome to have. They should be part of the same DIP. -- Andrei More

Re: Shared and race conditions

2017-11-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 17:03:42 UTC, Steven Schveighoffer wrote: On 11/29/17 11:13 AM, Wanderer wrote: I'm trying to simulate a race condition in D with the following code: (https://run.dlang.io/is/RfOX0I) One word of caution, I think the running of your code on run.dlang.io is

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Meta via Digitalmars-d
On Wednesday, 29 November 2017 at 16:45:04 UTC, Timon Gehr wrote: On 29.11.2017 17:21, Andrei Alexandrescu wrote: On 11/29/2017 07:53 AM, Seb wrote: UDAs for function arguments would be really awesome to have. They should be part of the same DIP. -- Andrei More generally, any declaration

Re: Shared and race conditions

2017-11-29 Thread Wanderer via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 17:03:42 UTC, Steven Schveighoffer wrote: On 11/29/17 11:13 AM, Wanderer wrote: I'm trying to simulate a race condition in D with the following code: (https://run.dlang.io/is/RfOX0I) One word of caution, I think the running of your code on run.dlang.io is

Re: Thoughts about D

2017-11-29 Thread H. S. Teoh via Digitalmars-d
On Tue, Nov 28, 2017 at 06:18:20PM -0800, Walter Bright via Digitalmars-d wrote: [...] > When the C version is 90K and the translated D version is 1200K, it is > a barrier. It's a barrier for others, as well. > > Another barrier for me has turned out to be the way assert() works in > D. It just

Re: Shared and race conditions

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/29/17 11:13 AM, Wanderer wrote: I'm trying to simulate a race condition in D with the following code: (https://run.dlang.io/is/RfOX0I) One word of caution, I think the running of your code on run.dlang.io is cached. Refreshing doesn't make it re-run. https://run.dlang.io/is/k0LhQA

Re: Shared and race conditions

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/29/17 11:51 AM, Michael wrote: On Wednesday, 29 November 2017 at 16:33:50 UTC, Steven Schveighoffer wrote: On 11/29/17 11:13 AM, Wanderer wrote: [...] [snip] [...] Using the compiler switch -vcg-ast, I see no synchronization of these methods. [...] Any idea what has changed in

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d
On 11/29/17 11:45 AM, Timon Gehr wrote: On 29.11.2017 17:21, Andrei Alexandrescu wrote: On 11/29/2017 07:53 AM, Seb wrote: UDAs for function arguments would be really awesome to have. They should be part of the same DIP. -- Andrei More generally, any declaration should ideally support

Re: Shared and race conditions

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/29/17 11:46 AM, Wanderer wrote: On Wednesday, 29 November 2017 at 16:33:50 UTC, Steven Schveighoffer wrote: On 11/29/17 11:13 AM, Wanderer wrote: [...] [snip] [...] Using the compiler switch -vcg-ast, I see no synchronization of these methods. [...] That's what I assume, I was

Re: Shared and race conditions

2017-11-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 16:33:50 UTC, Steven Schveighoffer wrote: On 11/29/17 11:13 AM, Wanderer wrote: [...] [snip] [...] Using the compiler switch -vcg-ast, I see no synchronization of these methods. [...] Any idea what has changed in DMD-nightly to retain the correct

Re: Time to move logger from experimental to std ?

2017-11-29 Thread Jack Stouffer via Digitalmars-d
On Wednesday, 29 November 2017 at 14:32:54 UTC, Basile B. wrote: Hello, most of the changes made during the current year to the std.experimental.logger package are related to the cosmetic style. Isn't this a sign showing that the experimentation is achieved ? Facts: - There only 4 issues

Re: Shared and race conditions

2017-11-29 Thread Wanderer via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 16:33:50 UTC, Steven Schveighoffer wrote: On 11/29/17 11:13 AM, Wanderer wrote: [...] [snip] [...] Using the compiler switch -vcg-ast, I see no synchronization of these methods. [...] That's what I assume, I was just lucky not to see a race. Thanks

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Timon Gehr via Digitalmars-d
On 29.11.2017 17:21, Andrei Alexandrescu wrote: On 11/29/2017 07:53 AM, Seb wrote: UDAs for function arguments would be really awesome to have. They should be part of the same DIP. -- Andrei More generally, any declaration should ideally support UDAs. One issue with UDAs on function

Re: Shared and race conditions

2017-11-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/29/17 11:13 AM, Wanderer wrote: I'm trying to simulate a race condition in D with the following code: [snip] But all I get is correct IDs without any sign of a race (i.e. duplicate ids). Does compiler add synchronization for `shared` data? Using the compiler switch -vcg-ast, I see

Re: Shared and race conditions

2017-11-29 Thread Wanderer via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 16:19:05 UTC, Michael wrote: On Wednesday, 29 November 2017 at 16:13:13 UTC, Wanderer wrote: [...] I unfortunately cannot answer your question but I am noticing that running the code with DMD gives you an unordered sequence of IDs, but running with

Re: Shared and race conditions

2017-11-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 16:19:05 UTC, Michael wrote: On Wednesday, 29 November 2017 at 16:13:13 UTC, Wanderer wrote: [...] I unfortunately cannot answer your question but I am noticing that running the code with DMD gives you an unordered sequence of IDs, but running with

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Andrei Alexandrescu via Digitalmars-d
On 11/29/2017 07:53 AM, Seb wrote: UDAs for function arguments would be really awesome to have. They should be part of the same DIP. -- Andrei

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Jacob Carlborg via Digitalmars-d
On 2017-11-29 13:53, Seb wrote: UDAs for function arguments would be really awesome to have. Just imagine how nice the Vibe.d web routes would look like: auto postUser(@body User user, @errors Errors errors) Instead of: @body("user") @errorDisplay auto postUsers(User _user, string  _error)

Re: Shared and race conditions

2017-11-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 16:13:13 UTC, Wanderer wrote: I'm trying to simulate a race condition in D with the following code: (https://run.dlang.io/is/RfOX0I) ``` import std.stdio; import core.thread; import std.concurrency; shared struct IdGen(T) { T id; this(T start) {

Shared and race conditions

2017-11-29 Thread Wanderer via Digitalmars-d-learn
I'm trying to simulate a race condition in D with the following code: (https://run.dlang.io/is/RfOX0I) ``` import std.stdio; import core.thread; import std.concurrency; shared struct IdGen(T) { T id; this(T start) { id = start; } T next() { id =

Re: Chocolatey Packages for DMD, LDC, and GDC

2017-11-29 Thread Jacob Carlborg via Digitalmars-d
On 2017-11-28 20:04, Manuel Maier wrote: I didn't know about that tool yet, but I like the idea! However, when I played around with it just now, I ran into the "Cannot find dmd-2.0.x.x.bat file" issue [1]. And yes, I misread the installation instructions (thought it said "run install dmd").

Re: We're looking for a Software Developer! (D language)

2017-11-29 Thread Paulo Pinto via Digitalmars-d-announce
On Wednesday, 29 November 2017 at 12:05:06 UTC, Ola Fosheim Grostad wrote: On Wednesday, 29 November 2017 at 10:47:31 UTC, aberba wrote: to death learning these stuff in lectures. I learnt them beyond the syllables years back on my own at a much quicker pase. CS isnt about the languages

[Issue 17955] compiler segfault in DsymbolSemanticVisitor::visit(UnittestDeclaration*)

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17955 --- Comment #4 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a41e3d26d62d498551abeb0da10c7356731b0fe7 Merge pull request #7277 from WalterBright/fix17955 fix Issue

Time to move logger from experimental to std ?

2017-11-29 Thread Basile B. via Digitalmars-d
Hello, most of the changes made during the current year to the std.experimental.logger package are related to the cosmetic style. Isn't this a sign showing that the experimentation is achieved ? Facts: - There only 4 issues for logger -

[Issue 18019] getopt worng behaviour (ConvException instead of GetOptException)

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18019 --- Comment #2 from Dmitry --- Thank you for the explanation. Now I found it in the documentation: > If the option has a parameter, that must be "stuck" to the option > without any intervening space or "=" But it is not the

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Michael V. Franklin via Digitalmars-d
On Tuesday, 28 November 2017 at 19:38:44 UTC, Meta wrote: I'd be interested in working on a DIP like this Michael, but I also want to expand the scope to allowing UDAs on function arguments as well. We should have some solid use cases in mind; let's take this to private email. I'm on IRC

Re: DUB: "Invalid source/import path"

2017-11-29 Thread JamesD via Digitalmars-d-dwt
On Monday, 27 November 2017 at 07:53:21 UTC, Manuel Maier wrote: On Monday, 15 May 2017 at 06:24:12 UTC, Ivan Trombley wrote: Never mind. Figured it out. It would be nice to know what it was that you figured out. I just ran into the same issue building gdub

[Issue 18019] getopt worng behaviour (ConvException instead of GetOptException)

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18019 Basile B. changed: What|Removed |Added CC||b2.t...@gmx.com

[Issue 18012] [reg 2.077.0] segfault in dmd

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18012 Martin Nowak changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 17955] compiler segfault in DsymbolSemanticVisitor::visit(UnittestDeclaration*)

2017-11-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17955 Martin Nowak changed: What|Removed |Added CC||paolo.inverni...@gmail.com ---

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Seb via Digitalmars-d
On Tuesday, 28 November 2017 at 19:38:44 UTC, Meta wrote: On Tuesday, 28 November 2017 at 02:20:15 UTC, Michael V. Franklin wrote: On Sunday, 19 November 2017 at 13:35:13 UTC, Michael V. Franklin wrote: What's the official word? Does it require a DIP? For those who might want to know,

Re: We're looking for a Software Developer! (D language)

2017-11-29 Thread Ola Fosheim Grostad via Digitalmars-d-announce
On Wednesday, 29 November 2017 at 10:47:31 UTC, aberba wrote: to death learning these stuff in lectures. I learnt them beyond the syllables years back on my own at a much quicker pase. CS isnt about the languages themselves, that is trivial. Basically covered in the first or second semester.

Re: Basic questions about D lang?

2017-11-29 Thread user1234 via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 11:32:51 UTC, Jayam wrote: In D lang, [...] 3. Can we make library file and use that in any project like 'Util class' ? Of course ! Plenty of them can be found here: https://code.dlang.org/?sort=updated=library

Re: Basic questions about D lang?

2017-11-29 Thread crimaniak via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 11:32:51 UTC, Jayam wrote: In D lang, 1. Is there any feature async/ await like "c#" ? I can't find feature like async. As for me, async/await feature is a half-baked solution. With vibe-d you can write asynchronous code without thinking about it at all.

Re: We're looking for a Software Developer! (D language)

2017-11-29 Thread Paulo Pinto via Digitalmars-d-announce
On Wednesday, 29 November 2017 at 10:47:31 UTC, aberba wrote: On Thursday, 8 January 2015 at 11:10:09 UTC, Johanna Burgos wrote: Your Mission Your Track Record Degree in Computer Science, or closely-related It baffles me that recruitment still works using this as a requirement. A CS

Re: Basic questions about D lang?

2017-11-29 Thread rikki cattermole via Digitalmars-d-learn
On 29/11/2017 11:32 AM, Jayam wrote: In D lang, 1. Is there any feature async/ await like "c#" ? I can't find feature like async. No. The idea is floating around however. 2. Is Garbage Collector work default without any code to force like in c# or do we need to manually trigger it ?

Basic questions about D lang?

2017-11-29 Thread Jayam via Digitalmars-d-learn
In D lang, 1. Is there any feature async/ await like "c#" ? I can't find feature like async. 2. Is Garbage Collector work default without any code to force like in c# or do we need to manually trigger it ? 3. Can we make library file and use that in any project like 'Util class' ?

Re: Strange error when compiling with dmd, not with ldc

2017-11-29 Thread user1234 via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 10:55:35 UTC, user1234 wrote: On Wednesday, 29 November 2017 at 06:18:09 UTC, Fra Mecca wrote: [...] You must also use a type constructor later, when a Configuration is declared: ``` immutable(Configuration) config; config.toString.writeln; // okay this

Re: Strange error when compiling with dmd, not with ldc

2017-11-29 Thread user1234 via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 06:18:09 UTC, Fra Mecca wrote: I have this struct: immutable struct Configuration { string title; string baseurl; string url; string email; string author; string parser; string target; string urlFormat; string urlFormatCmd;

  1   2   >