understanding std.algorithm.mutation.fill behaivor.

2016-12-27 Thread LeqxLeqx via Digitalmars-d-learn
Perhaps this is a stupid question, and I apologize if it is, but why doesn't this compile: import std.algorithm; import std.stdio; void main() { char[] array = [1, 2, 3, 4]; char value = 2; fill(array, value); } if this does: import std.algorithm; im

Re: Working with Modules

2016-12-27 Thread Guy Asking a Question via Digitalmars-d-learn
On Wednesday, 28 December 2016 at 02:12:32 UTC, pineapple wrote: On Wednesday, 28 December 2016 at 02:08:44 UTC, Guy Asking a Question wrote: import test; <---dmd choking here. You will need to use the -I option of dmd/rdmd to inform the compiler of where your `HopefullySomeDLibrary` director

Re: Working with Modules

2016-12-27 Thread pineapple via Digitalmars-d-learn
On Wednesday, 28 December 2016 at 02:08:44 UTC, Guy Asking a Question wrote: import test; <---dmd choking here. You will need to use the -I option of dmd/rdmd to inform the compiler of where your `HopefullySomeDLibrary` directory is located, as well as any other places you will want to import

Re: Working with Modules

2016-12-27 Thread Guy Asking a Question via Digitalmars-d-learn
The code... tester.d module main; import std.stdio; import test; <---dmd choking here. int main(string[] args) { writefln("Hello World\n"); writefln(add(a, b)); return 0; } test.d module test; int add(int a, int b) { return a + b; }

Working with Modules

2016-12-27 Thread Guy Asking a Question via Digitalmars-d-learn
I am just starting up with dmd and code::blocks. Generally I have as my project structure something like this (sorry if your forum doesn't format this nicely, use the '-'es for directory nesting): ProjectA -SubProject1 -SubProject2 ProjectB -SubProject1 -SubProjectB HopefullySomeDPr

Re: DMD specify VS version in sc.ini

2016-12-27 Thread rjframe via Digitalmars-d-learn
On Tue, 27 Dec 2016 22:09:49 +, Ryan wrote: > I have a C library I want to link against that was compiled with VS > 2013. I have VS2013 and VS2015 installed. I want DMD to use the 2013 > version, since the C-runtime in 2015 is not backwards compatible. > > Looking at sc.ini I see several entr

Re: CTFE difference between dmd and ldc2

2016-12-27 Thread Johan Engelen via Digitalmars-d-learn
On Tuesday, 27 December 2016 at 17:56:07 UTC, Stefan Koch wrote: On Tuesday, 27 December 2016 at 17:50:15 UTC, Joseph Rushton Wakeling wrote: Hello all, [ ... ] Can anyone advise what could be going wrong here? This looks like a nasty CTFE bug to me :-( Thanks & best wishes, -- Joe I

DMD specify VS version in sc.ini

2016-12-27 Thread Ryan via Digitalmars-d-learn
I have a C library I want to link against that was compiled with VS 2013. I have VS2013 and VS2015 installed. I want DMD to use the 2013 version, since the C-runtime in 2015 is not backwards compatible. Looking at sc.ini I see several entries that relate to the linker, CRT, and SDK. How do I

Re: [question] Access from UDA constructor to parent symbol

2016-12-27 Thread Jerry via Digitalmars-d-learn
On Monday, 26 December 2016 at 21:15:03 UTC, Adam D. Ruppe wrote: On Monday, 26 December 2016 at 20:07:56 UTC, crimaniak wrote: // I want to see Foo here and use it's reflection to iterate fields and methods. then pass foo to it What do you mean parent symbol? I assumed you mean

Re: Build your own Trie entry table

2016-12-27 Thread Dmitry Olshansky via Digitalmars-d-learn
On Monday, 26 December 2016 at 10:12:20 UTC, Remi Thebault wrote: Hello I want to map a dchar to its Bidi_Class. I've built an utility that reads UnicodeData.txt into an AA and builds a trie with std.uni.codepointTrie from it. I use Trie.store() to export the trie entry table into a D module.

Re: Gui programing in D

2016-12-27 Thread Mike Wey via Digitalmars-d-learn
On 12/27/2016 01:47 PM, Samson Akomire wrote: I am working with GTKD for GUI Application in D programing language. D programing Language is truly wholesome in all definitions.I have a great difficulty in setting widgets width and height. I will also appreciate any direction to resources to learn

Re: CTFE difference between dmd and ldc2

2016-12-27 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Tuesday, 27 December 2016 at 17:56:07 UTC, Stefan Koch wrote: I doubt that this is a CTFE bug since there should be little difference in the ctfe code between ldc and dmd. That said, it is of course a possibility. I'll have a look. Thanks! It's very weird how, of the values in the `state`

Re: CTFE difference between dmd and ldc2

2016-12-27 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 27 December 2016 at 17:50:15 UTC, Joseph Rushton Wakeling wrote: Hello all, [ ... ] Can anyone advise what could be going wrong here? This looks like a nasty CTFE bug to me :-( Thanks & best wishes, -- Joe I doubt that this is a CTFE bug since there should be little differ

CTFE difference between dmd and ldc2

2016-12-27 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
Hello all, I've recently been working on a port of the mir.random Mersenne Twister implementation to Phobos, and I've run into a bit of weirdness with CTFE. Specifically, I use some CTFE functionality to generate a default starting state for the generator: https://github.com/WebDrake/mersen

Gui programing in D

2016-12-27 Thread Samson Akomire via Digitalmars-d-learn
I am working with GTKD for GUI Application in D programing language. D programing Language is truly wholesome in all definitions.I have a great difficulty in setting widgets width and height. I will also appreciate any direction to resources to learn GTKD.

Re: [question] Access from UDA constructor to parent symbol

2016-12-27 Thread crimaniak via Digitalmars-d-learn
On Tuesday, 27 December 2016 at 02:05:27 UTC, Ali Çehreli wrote: On 12/26/2016 02:04 PM, crimaniak wrote: So my main question: how it is possible to do such thing? Just to make sure we're on the same page: :) * There is 'interface' in addition to 'class' Yes. I want it for structs exactly.