Re: Are there any D scripting engines for use with D?

2016-01-04 Thread Max Klyga via Digitalmars-d-learn
On 2016-01-04 18:40:03 +, Jason Jeffory said: We have many scripting engines available for use in D more or less(lua, python, etc...). Is there a D scripting engine that can be easily integrated into a D project? A sort of "exec()". Something that works at compile time and run time

Re: Templates: Array slices not recognized

2015-04-18 Thread Max Klyga via Digitalmars-d-learn
On 2015-04-18 13:46:19 +, Chris said: The following: import std.stdio : writefln; import std.range.primitives : isInputRange, hasLength; void main() { size_t[] a = [1, 2, 3, 4, 5, 6, 7, 8, 9]; doSomething(a); // works doSomething(a[0..5]); // --- Error: template

Re: Interlocked (compare) exchange

2015-04-17 Thread Max Klyga via Digitalmars-d-learn
On 2015-04-17 10:36:31 +, Szymon Gatner said: Hi, are there equivalents of Interlocked.Exchange [1] and Interlocked.CompareExchange [2] in D? I can't find it in teh docs? [1] https://msdn.microsoft.com/en-us/library/f2090ex9(v=vs.110).aspx [2]

Re: string-int[] array

2015-03-08 Thread Max Klyga via Digitalmars-d-learn
On 2015-03-08 21:11:42 +, Paul said: On Sunday, 8 March 2015 at 18:05:33 UTC, Dennis Ritchie wrote: Is it possible to create such an array in which you can store strings and numbers at the same time? string-int[] array = [4, five]; As there's no mention of performance, what's wrong

Re: Object as function argument

2015-03-05 Thread Max Klyga via Digitalmars-d-learn
On 2015-03-05 19:35:34 +, Chris Sperandio said: Hi, I'm a developer coming from C and I've a question about class instance as method or function parameter. In the book The D Programming Language, I read the instance was passed by reference to functions (in the opposite of structures). I