Re: git workflow for D

2017-12-03 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 4 December 2017 at 01:54:57 UTC, ketmar wrote: Basile B. wrote: On Sunday, 3 December 2017 at 22:22:47 UTC, Arun Chandrasekaran wrote: Git CLI is arcane and esoteric. I've lost my commits before (yeah, my mistake). Who hasn't ;) me. Happened to me last time because i tried a

Re: git workflow for D

2017-12-03 Thread ketmar via Digitalmars-d-learn
Basile B. wrote: On Sunday, 3 December 2017 at 22:22:47 UTC, Arun Chandrasekaran wrote: Git CLI is arcane and esoteric. I've lost my commits before (yeah, my mistake). Who hasn't ;) me. Happened to me last time because i tried a command supposed to remove untracked files in

Re: git workflow for D

2017-12-03 Thread Arun Chandrasekaran via Digitalmars-d-learn
On Sunday, 3 December 2017 at 23:39:49 UTC, Basile B. wrote: On Sunday, 3 December 2017 at 22:22:47 UTC, Arun Chandrasekaran wrote: Git CLI is arcane and esoteric. I've lost my commits before (yeah, my mistake). Who hasn't ;) Happened to me last time because i tried a command supposed to

Re: git workflow for D

2017-12-03 Thread Basile B. via Digitalmars-d-learn
On Sunday, 3 December 2017 at 22:22:47 UTC, Arun Chandrasekaran wrote: Git CLI is arcane and esoteric. I've lost my commits before (yeah, my mistake). Who hasn't ;) Happened to me last time because i tried a command supposed to remove untracked files in submodules...but used "reset" in a

Re: How to declare immutable struct outside of try catch and reference it later

2017-12-03 Thread Basile B. via Digitalmars-d-learn
On Sunday, 3 December 2017 at 22:33:40 UTC, kdevel wrote: On Sunday, 3 December 2017 at 14:58:03 UTC, Basile B. wrote: In this case i'd go for a typed pointer, e.g --- immutable struct Configuration { this(string){/*load some file...*/} int value; } Configuration* config; void main()

Re: Windows Share Path

2017-12-03 Thread rjframe via Digitalmars-d-learn
On Sun, 03 Dec 2017 16:42:46 +, vino wrote: > Question: > Is there a way to map network drive in windows using D code, similar to > the windows command such as "net use" or "pushd" or powershell command > New-PSDrive.? > > From, > Vino.B There's WNetAddConnection2[1] and

Re: How to declare immutable struct outside of try catch and reference it later

2017-12-03 Thread kdevel via Digitalmars-d-learn
On Sunday, 3 December 2017 at 14:58:03 UTC, Basile B. wrote: In this case i'd go for a typed pointer, e.g --- immutable struct Configuration { this(string){/*load some file...*/} int value; } Configuration* config; void main() { try config = new Configuration("config.sdl");

Re: git workflow for D

2017-12-03 Thread Arun Chandrasekaran via Digitalmars-d-learn
Git CLI is arcane and esoteric. I've lost my commits before (yeah, my mistake). Since then I always access git via mercurial. In comparison Mercurial is far better a VCS tool.

Re: git workflow for D

2017-12-03 Thread Mengu via Digitalmars-d-learn
On Sunday, 3 December 2017 at 20:05:47 UTC, bitwise wrote: I've finally started learning git, due to our team expanding beyond one person - awesome, right? Anyways, I've got things more or less figured out, which is nice, because being clueless about git is a big blocker for me trying to do

Re: git workflow for D

2017-12-03 Thread Basile B. via Digitalmars-d-learn
On Sunday, 3 December 2017 at 20:05:47 UTC, bitwise wrote: I've finally started learning git, due to our team expanding beyond one person - awesome, right? Anyways, I've got things more or less figured out, which is nice, because being clueless about git is a big blocker for me trying to do

git workflow for D

2017-12-03 Thread bitwise via Digitalmars-d-learn
I've finally started learning git, due to our team expanding beyond one person - awesome, right? Anyways, I've got things more or less figured out, which is nice, because being clueless about git is a big blocker for me trying to do any real work on dmd/phobos/druntime. As far as working on a

Re: Implicit nothrow with -betterC

2017-12-03 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 3 December 2017 at 15:24:27 UTC, Manuel Maier wrote: I've been experimenting with the -betterC switch and stumbled upon something that didn't quite make sense to me. betterC doesn't change the language, it just doesn't compile in all the features automatically. So rules about

Re: Windows Share Path

2017-12-03 Thread vino via Digitalmars-d-learn
On Sunday, 3 December 2017 at 01:27:40 UTC, codephantom wrote: On Saturday, 2 December 2017 at 14:23:48 UTC, Vino wrote: Hi, Even tried the Option "Run with Highest Privilege" but no luck. and also tried with option "Configure for : Windows Vista , Windows Server 2008" From, Vino.B You

template specialization and Rebindable

2017-12-03 Thread vit via Digitalmars-d-learn
Why is template param T != B but T == Rebindable!(const(B)) when specialization is T : const(A)? abstract class A{} class B : A{} string foo(T : const(A))(T x){ return T.stringof; } void main(){ import std.typecons : Rebindable; import std.stdio : writeln; Rebindable!(const

Re: Struct inside a class: How to get outer?

2017-12-03 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-12-03 10:57, Nick Sabalausky (Abscissa) wrote: On 12/03/2017 03:46 AM, bauss wrote: It wouldn't make much sense either, if a struct  was able to do it. Why is that? It would get an extra field, making the size of the struct larger and not compatible with a C struct. But I guess

Implicit nothrow with -betterC

2017-12-03 Thread Manuel Maier via Digitalmars-d-learn
I've been experimenting with the -betterC switch and stumbled upon something that didn't quite make sense to me. I've put together a small example [1] of Win32 code with a window callback that has to be nothrow as per the definition of WNDPROC somewhere in core.sys.windows. However, calling

Re: How to declare immutable struct outside of try catch and reference it later

2017-12-03 Thread Basile B. via Digitalmars-d-learn
On Sunday, 3 December 2017 at 05:49:54 UTC, Fra Mecca wrote: I have this code: Configuration conf = void ; try { conf = parse_config("config.sdl"); } catch (Exception e) { std.stdio.stderr.writeln("Error reading configuration file: ", e.msg); exit(1); }

Re: How to declare immutable struct outside of try catch and reference it later

2017-12-03 Thread kdevel via Digitalmars-d-learn
On Sunday, 3 December 2017 at 14:16:42 UTC, kdevel wrote: int main () { try { real_main (); } catch (Exception e) { std.stdio.stderr.writeln(e.msg); return 1; } return 0; } ``` This is better: int main () { try { return real_main (); } catch

Re: How to declare immutable struct outside of try catch and reference it later

2017-12-03 Thread kdevel via Digitalmars-d-learn
On Sunday, 3 December 2017 at 05:49:54 UTC, Fra Mecca wrote: I have this code: Configuration conf = void ; try { conf = parse_config("config.sdl"); } catch (Exception e) { std.stdio.stderr.writeln("Error reading configuration file: ", e.msg); exit(1); }

Re: Struct inside a class: How to get outer?

2017-12-03 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
On 12/03/2017 03:46 AM, bauss wrote: On Sunday, 3 December 2017 at 07:38:47 UTC, Jonathan M Davis wrote: As I understand it, there is no outer for nested structs, only nested classes. So, you'll either have to use a nested class or explicitly pass a reference to the outer class to the nested

Re: Struct inside a class: How to get outer?

2017-12-03 Thread bauss via Digitalmars-d-learn
On Sunday, 3 December 2017 at 07:38:47 UTC, Jonathan M Davis wrote: On Sunday, December 03, 2017 01:05:00 Nick Sabalausky via Digitalmars-d- learn wrote: Is this even possible? My attempts: class Outer { struct Inner { void foo() { // Error: no property 'outer' for type