Re: how to compile D programs without console window

2018-07-14 Thread Flaze07 via Digitalmars-d-learn
On Sunday, 15 July 2018 at 01:20:25 UTC, evilrat wrote: ... "lflags": [ "/SUBSYSTEM:windows" ], ... didn't know that, thank you

Re: mir-optim v0.0.1: betterC nonlinear least squares

2018-07-14 Thread 9il via Digitalmars-d-announce
On Friday, 13 July 2018 at 16:20:30 UTC, jmh530 wrote: On Tuesday, 10 July 2018 at 02:10:56 UTC, 9il wrote: The algorigbms from https://github.com/JuliaNLSolvers are good candidates. No plans to implement them for now, but PRs are wellcome. Another type of functionality that would be

Re: Sutter's ISO C++ Trip Report - The best compliment is when someone else steals your ideas....

2018-07-14 Thread Steven Schveighoffer via Digitalmars-d
On 7/13/18 4:47 PM, Patrick Schluter wrote: On Friday, 13 July 2018 at 20:12:36 UTC, Steven Schveighoffer wrote: On 7/13/18 3:53 PM, Paolo Invernizzi wrote: On Friday, 13 July 2018 at 13:15:39 UTC, Steven Schveighoffer wrote: On 7/13/18 8:55 AM, Adam D. Ruppe wrote: [...] But it doesn't

Re: @safe - why does this compile?

2018-07-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/14/18 2:50 AM, Timoses wrote: On Friday, 13 July 2018 at 22:17:59 UTC, Dukc wrote: On Friday, 13 July 2018 at 13:52:27 UTC, Timoses wrote: I suppose this is another good example of how casting can be dangerous? E.g. also:     immutable int i = 3;     int* j = cast(int*)     assert(i ==

Re: how to compile D programs without console window

2018-07-14 Thread evilrat via Digitalmars-d-learn
On Saturday, 14 July 2018 at 09:43:48 UTC, Flaze07 wrote: On Saturday, 14 July 2018 at 09:39:21 UTC, rikki cattermole wrote: If you're using dub, throw them into lflags and remove the -L. https://forum.dlang.org/post/gmcsxgfsfnwllploo...@forum.dlang.org hmm, for some unknown reason it says

Re: Weird bugs in DMD 2.81.0

2018-07-14 Thread solidstate1991 via Digitalmars-d
Well, it seems I fixed the AA issue by removing a totally unrelated thing (an undoable event chain system, that got "deprecated"), but now I got another weird issue. Sometimes setting a dynamic array's length causes an access violation. Still only on WindowMaker, and nothing in

Is there any tool that will auto publish my changes.

2018-07-14 Thread Venkat via Digitalmars-d-learn
I am writing a simple vibe.d app. The following is what I do right now. - I make changes. - build - Restart the server. Is there any tool that will auto publish my changes as I save them ? I am using Visual Studio Code. Thanks Venkat

Re: Find out druntime/import and phobos folder on Linux

2018-07-14 Thread Mike Franklin via Digitalmars-d-learn
On Saturday, 14 July 2018 at 19:04:01 UTC, Andre Pany wrote: Somehow also the DMD executable needs to know which Phobos/DRuntime it should use. How does DMD is working here? Maybe I can do the same... DMD determines default import and library paths from the dmd.conf file typically at

Re: Weird bugs in DMD 2.81.0

2018-07-14 Thread solidstate1991 via Digitalmars-d
On Saturday, 14 July 2018 at 07:01:59 UTC, Seb wrote: Any chance you can make a minimal, reproducible example of this? Would be great because then it can be put on bugzilla and other people can have a look at it too. I might try, but first I'll look at the functions to see if I can fix some

What determines if an algorithm goes in std.algorithm or std.range

2018-07-14 Thread aliak via Digitalmars-d
Alo, I'm wondering how phobos devs view or determine what goes in to std.algorithm and what goes in to std.range. To me some of them are quite obvious - well, most things can arguably be an algorithm. But for example "refRange" is clearly a range specific thing, but "transpose" is not. And

Re: Find out druntime/import and phobos folder on Linux

2018-07-14 Thread Anonymouse via Digitalmars-d-learn
On Saturday, 14 July 2018 at 17:19:20 UTC, Andre Pany wrote: Is there a way to find out both paths based on the dmd executable folder? What I found out so far, these paths are not always correct: /usr/include/dmd/druntime/import /usr/include/dmd/phobos Arch Linux and derivatives keep them

Re: Find out druntime/import and phobos folder on Linux

2018-07-14 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 14 July 2018 at 19:00:56 UTC, Anonymouse wrote: On Saturday, 14 July 2018 at 17:19:20 UTC, Andre Pany wrote: Is there a way to find out both paths based on the dmd executable folder? What I found out so far, these paths are not always correct: /usr/include/dmd/druntime/import

Re: Check whether a range is empty

2018-07-14 Thread Ali Çehreli via Digitalmars-d-learn
First, please show us code that demonstrates the issue. On 07/14/2018 07:47 AM, vino.B wrote: >The reason it never prints the text "Empty" is that the out of the > "r" is just an empty array. > > OUTPUT: > [] > [] If that's the output of r, then r is not empty but has two elements and

Find out druntime/import and phobos folder on Linux

2018-07-14 Thread Andre Pany via Digitalmars-d-learn
Hi, The IntelliJ D Language plugin has support for D-scanner and DCD. Both tools needs to know the paths to druntime/import and Phobos source folder. In IntelliJ you set the path to the folder where dmd binary is located. Based on this information on Windows and MacOS it is possible to

Re: Funding code-d

2018-07-14 Thread Joakim via Digitalmars-d-announce
On Friday, 13 July 2018 at 14:20:19 UTC, Mike Parker wrote: As promised in my tweet of June 30 (and to the handful of people who emailed me), the cloud of mystery surrounding the use of the money raised for code-d and its supporting tools has now been (partially) lifted! In this post, I lay

Re: Copy Constructor DIP

2018-07-14 Thread Jacob Carlborg via Digitalmars-d
On Friday, 13 July 2018 at 01:18:48 UTC, Andrei Alexandrescu wrote: On 7/12/18 2:30 PM, ag0aep6g wrote: You're still potentially changing the semantics of existing code. `@implicit` can be a UDA today: enum implicit = 0; struct C {     @implicit this(ref C another) {} } Today,

Re: Symmetry Autumn of Code

2018-07-14 Thread Joakim via Digitalmars-d-announce
On Saturday, 14 July 2018 at 13:57:12 UTC, Laeeth Isharc wrote: On Saturday, 14 July 2018 at 07:30:26 UTC, Joakim wrote: On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote: Thanks to the sponsorship of Symmetry Investments, the D Language Foundation is happy to announce the Symmetry

Re: Check whether a range is empty

2018-07-14 Thread vino.B via Digitalmars-d-learn
On Saturday, 14 July 2018 at 14:28:52 UTC, vino.B wrote: On Friday, 13 July 2018 at 19:45:03 UTC, Steven Schveighoffer wrote: On 7/13/18 3:29 PM, vino.B wrote: [...] Well, empty is how you detect whether any range is empty, and as far as ranges are concerned, your code is correctly

Re: dpp now compiles julia.h headers

2018-07-14 Thread Laeeth Isharc via Digitalmars-d-announce
On Friday, 13 July 2018 at 22:22:25 UTC, Meta wrote: On Friday, 13 July 2018 at 19:02:56 UTC, Laeeth Isharc wrote: Atila Neves' d++ now compiles julia.h. Modulo bugs this makes it possible to embed Julia in D (and probably the other way around, but I have not tried).

Re: Check whether a range is empty

2018-07-14 Thread vino.B via Digitalmars-d-learn
On Friday, 13 July 2018 at 19:45:03 UTC, Steven Schveighoffer wrote: On 7/13/18 3:29 PM, vino.B wrote: [...] Well, empty is how you detect whether any range is empty, and as far as ranges are concerned, your code is correctly checking for empty. A couple comments: 1. Why are you using

Re: DIP 1014--Hooking D's struct move semantics--Final Review

2018-07-14 Thread Shachar Shemesh via Digitalmars-d
On 14/07/18 15:56, Johan Engelen wrote: First off: I am trying to wear a strict language lawyer hat. D spec is already very much ill specced which is _very_ problematic for language and compiler development. I am not attacking the proposal in order to kill it. I am merely commenting on points

Re: Symmetry Autumn of Code

2018-07-14 Thread Laeeth Isharc via Digitalmars-d-announce
On Saturday, 14 July 2018 at 07:09:21 UTC, Timoses wrote: On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote: Thanks to the sponsorship of Symmetry Investments, the D Language Foundation is happy to announce the Symmetry Autumn of Code! We're looking for three university students

Re: Call method with Variant array as parameters

2018-07-14 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 14 July 2018 at 11:37:20 UTC, Timoses wrote: On Saturday, 14 July 2018 at 11:08:21 How about this? import std.variant: Variant; import std.traits : isCallable; class Foo { void bar(string s, long l) { import std.stdio : writeln; writeln(s); writeln(l);

Re: Symmetry Autumn of Code

2018-07-14 Thread Laeeth Isharc via Digitalmars-d-announce
On Saturday, 14 July 2018 at 07:30:26 UTC, Joakim wrote: On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote: Thanks to the sponsorship of Symmetry Investments, the D Language Foundation is happy to announce the Symmetry Autumn of Code! We're looking for three university students to

Re: DIP 1014--Hooking D's struct move semantics--Final Review

2018-07-14 Thread Johan Engelen via Digitalmars-d
On Thursday, 12 July 2018 at 10:22:33 UTC, Shachar Shemesh wrote: On 11/07/18 20:04, Johan Engelen wrote: On Wednesday, 27 June 2018 at 07:13:14 UTC, Mike Parker wrote: DIP 1014, "Hooking D's struct move semantics", is now ready for final review. after quick read: (would be much easier to

[Issue 19083] make target doc compile error: mach_header conflicts with other

2018-07-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19083 Seb changed: What|Removed |Added CC||greensunn...@gmail.com --- Comment #1 from Seb ---

[Issue 19082] Cannot inline "...Slides.numberOfFullFrames", "...Slides.gap"

2018-07-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19082 Seb changed: What|Removed |Added CC||greensunn...@gmail.com --- Comment #1 from Seb ---

Re: Copy Constructor DIP

2018-07-14 Thread rikki cattermole via Digitalmars-d
On 14/07/2018 11:49 PM, Johan Engelen wrote: On Saturday, 14 July 2018 at 10:53:17 UTC, Andrei Alexandrescu wrote: I now deeply regret ever telling Razvan to mention future possible directions. This DIP must do implicit copy constructors and do it well, nothing less and nothing more.

Re: Copy Constructor DIP

2018-07-14 Thread Johan Engelen via Digitalmars-d
On Saturday, 14 July 2018 at 10:53:17 UTC, Andrei Alexandrescu wrote: I now deeply regret ever telling Razvan to mention future possible directions. This DIP must do implicit copy constructors and do it well, nothing less and nothing more. Strongly agree with this. In my review on Github I

Re: Call method with Variant array as parameters

2018-07-14 Thread Timoses via Digitalmars-d-learn
On Saturday, 14 July 2018 at 11:08:21 UTC, Andre Pany wrote: Hi, I have a class with methods and I want to call a method by using a variant array. The length of the array and the types exactly fits the method signature. In the last line of main you see the coding which should be generated.

[Issue 19087] New: `final switch` cannot be used in -betterC

2018-07-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19087 Issue ID: 19087 Summary: `final switch` cannot be used in -betterC Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Call method with Variant array as parameters

2018-07-14 Thread Andre Pany via Digitalmars-d-learn
Hi, I have a class with methods and I want to call a method by using a variant array. The length of the array and the types exactly fits the method signature. In the last line of main you see the coding which should be generated. I need some coding which looks at the signature of bar and

Re: Copy Constructor DIP

2018-07-14 Thread Andrei Alexandrescu via Digitalmars-d
On 7/14/18 5:03 AM, Luís Marques wrote: If there is "no other meaning of @implicit" (other than the intersection of those two properties) why don't you just call it something like @copyctor? I'm totally cool with giving the attribute a more obscure name such as @copyctor or anything people

Re: how to compile D programs without console window

2018-07-14 Thread Flaze07 via Digitalmars-d-learn
On Saturday, 14 July 2018 at 09:39:21 UTC, rikki cattermole wrote: If you're using dub, throw them into lflags and remove the -L. https://forum.dlang.org/post/gmcsxgfsfnwllploo...@forum.dlang.org hmm, for some unknown reason it says that it is unable to find SUBSYSTEM:windows.lib

Re: how to compile D programs without console window

2018-07-14 Thread rikki cattermole via Digitalmars-d-learn
On 14/07/2018 9:32 PM, Flaze07 wrote: how do you compile a D programs without a console window ? I found this link https://wiki.dlang.org/D_for_Win32 I know that you need .def file, but how do you link to .def ? WinAPI: FreeConsole(); Optlink linker (default for 32bit):

how to compile D programs without console window

2018-07-14 Thread Flaze07 via Digitalmars-d-learn
how do you compile a D programs without a console window ? I found this link https://wiki.dlang.org/D_for_Win32 I know that you need .def file, but how do you link to .def ?

Re: Copy Constructor DIP

2018-07-14 Thread Manu via Digitalmars-d
On Sat., 14 Jul. 2018, 2:00 am rikki cattermole via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: > On 14/07/2018 1:04 PM, Manu wrote: > > Determining that requires at least a cursory exploration. > > Given how many of us are objecting to the syntax, I'm going to place > this requirement

Re: Copy Constructor DIP

2018-07-14 Thread Luís Marques via Digitalmars-d
On Saturday, 14 July 2018 at 00:41:37 UTC, Andrei Alexandrescu wrote: The specification of @implicit is in the DIP in full: a constructor that takes by reference a qualified typeof(this) and has the @implicit attribute will be callable implicitly by the compiler. There is no other meaning of

Re: Copy Constructor DIP

2018-07-14 Thread rikki cattermole via Digitalmars-d
On 14/07/2018 1:04 PM, Manu wrote: Determining that requires at least a cursory exploration. Given how many of us are objecting to the syntax, I'm going to place this requirement upon a 'yes' answer by me. That an attempt is made for an alternative syntax discussion. It's a fair request I

Re: Symmetry Autumn of Code

2018-07-14 Thread Joakim via Digitalmars-d-announce
On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote: Thanks to the sponsorship of Symmetry Investments, the D Language Foundation is happy to announce the Symmetry Autumn of Code! We're looking for three university students to hack on D this autumn, from September - January. We're

Re: Symmetry Autumn of Code

2018-07-14 Thread Timoses via Digitalmars-d-announce
On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote: Thanks to the sponsorship of Symmetry Investments, the D Language Foundation is happy to announce the Symmetry Autumn of Code! We're looking for three university students to hack on D this autumn, from September - January. We're

Re: Weird bugs in DMD 2.81.0

2018-07-14 Thread Seb via Digitalmars-d
On Saturday, 14 July 2018 at 01:27:03 UTC, solidstate1991 wrote: On Saturday, 14 July 2018 at 00:58:08 UTC, solidstate1991 wrote: I found a temporary workaround. Basically I just save the content of the AA, then reapply it after the application's constructor finished, before that it always

Re: @safe - why does this compile?

2018-07-14 Thread Timoses via Digitalmars-d-learn
On Friday, 13 July 2018 at 22:17:59 UTC, Dukc wrote: On Friday, 13 July 2018 at 13:52:27 UTC, Timoses wrote: I suppose this is another good example of how casting can be dangerous? E.g. also: immutable int i = 3; int* j = cast(int*) assert(i == 3); *j = 4; assert(j ==

Re: Orange not working?

2018-07-14 Thread Timoses via Digitalmars-d-learn
On Friday, 13 July 2018 at 21:38:18 UTC, JN wrote: I'm curious, are the tests in any way OS specific? I see the tests are passing, but trying the latest DMD on Windows and orange v2.0.0, when I add "@nonSerialized" to a struct member, I get this: C:\Users\jacek\Desktop\test_orange>dub run

Re: Symmetry Autumn of Code

2018-07-14 Thread Seb via Digitalmars-d-announce
On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote: Thanks to the sponsorship of Symmetry Investments, the D Language Foundation is happy to announce the Symmetry Autumn of Code! We're looking for three university students to hack on D this autumn, from September - January. We're

Re: Guido van Rossum has resigned

2018-07-14 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 07/12/2018 05:16 PM, Walter Bright wrote: as Python's BDFL. https://mail.python.org/pipermail/python-committers/2018-July/005664.html Interesting. My takeaway after reading his post: Despite his obvious and understandable frustration, it must be immensely satisfying to create a tool,

Symmetry Autumn of Code

2018-07-14 Thread Mike Parker via Digitalmars-d-announce
Thanks to the sponsorship of Symmetry Investments, the D Language Foundation is happy to announce the Symmetry Autumn of Code! We're looking for three university students to hack on D this autumn, from September - January. We're also in search of potential mentors and ideas for student