ini library in OSX

2014-09-07 Thread Joel via Digitalmars-d-learn
Is there any ini library that works in OSX? I've tried the ones I found. I think they have the same issue. Joels-MacBook-Pro:ChrisMill joelcnz$ dmd ini -unittest ini.d(330): Error: cannot pass dynamic arrays to extern(C) vararg functions ini.d(387): Error: undefined identifier 'replace', did yo

Re: Allowing Expressions such as (low < value < high)

2014-09-07 Thread AsmMan via Digitalmars-d-learn
On Thursday, 4 September 2014 at 20:33:45 UTC, Nordlöw wrote: On Thursday, 4 September 2014 at 20:25:52 UTC, monarch_dodra wrote: In the case of D, it's a C compatibility thing. Other languages I don't know. FYI, auto x = 1 < 2 < 3; as C++ is accepted (but warned about) by GCC as x.cpp:

D1: Windows DWORD conversion in D

2014-09-07 Thread jicman via Digitalmars-d-learn
Greetings. I have a type long variable, ie. long v = 1024; and I have to pass it to a Window's function and it's not working. I found out that I have to pass a DWORD to the function, and I know that dchar is somewhat close to DWORD, so, how do I pass this to this Windows function? Anyone

Re: Novice web developer trying to learn D

2014-09-07 Thread Rikki Cattermole via Digitalmars-d-learn
On Sunday, 7 September 2014 at 21:06:48 UTC, zuzuleinen wrote: Hello, First, here is my Linkedin profile http://www.linkedin.com/in/andreiboar in order to make an image of my professional background. I do realise here are really good programmers for which this background might sound like a j

Re: Novice web developer trying to learn D

2014-09-07 Thread Chris Nicholson-Sauls via Digitalmars-d-learn
There's Adam Ruppe's excellent "D Cookbook" available here: https://www.packtpub.com/application-development/d-cookbook And since you specifically said "web developer" I hope you're looking at vibe.d: http://vibed.org/

Novice web developer trying to learn D

2014-09-07 Thread zuzuleinen via Digitalmars-d-learn
Hello, First, here is my Linkedin profile http://www.linkedin.com/in/andreiboar in order to make an image of my professional background. I do realise here are really good programmers for which this background might sound like a joke, but this is what I did so far. After watching some presen

Re: opSlice() or opIndex() for the entire slice?

2014-09-07 Thread Ali Çehreli via Digitalmars-d-learn
I think I figured this one out. Before 2.066, we did not have proper support for multi-dimensional slicing. The following were the semantics we had: -- The opIndex() overloads provided access to direct elements. Since multi-dimensional support was incomplete, opIndex() was about accessing a

Re: Allowing Expressions such as (low < value < high)

2014-09-07 Thread nikki via Digitalmars-d-learn
On Thursday, 4 September 2014 at 20:03:57 UTC, Nordlöw wrote: Are there any programming languages that extend the behaviour of comparison operators to allow expressions such as if (low < value < high) ? This syntax is currently disallowed by DMD. I'm aware of the risk of a programmer mis

Re: dmd & dub from git master

2014-09-07 Thread notna via Digitalmars-d-learn
I had the same problem just now... on Win8.1 with - DMD32 D Compiler v2.066.0 - DUB version 0.9.21 The workaround is to manually update the "dub.json" file of your project, which was written from "dub init", to the latest vibe-d info on "http://code.dlang.org/packages/vibe-d";, so "dependen

Re: Lossless Bidirectional Enum-Conversions Mixin

2014-09-07 Thread Nordlöw
On Sunday, 7 September 2014 at 17:22:38 UTC, Nordlöw wrote: BidirectionalEnums( "x", "a", "y", "b", "z", "c", ); The enumeration names must of course be given aswell: BidirectionalEnums2( "A", "B", "x", "a", ... ); and two specifies the number of enums involved. We co

Lossless Bidirectional Enum-Conversions Mixin

2014-09-07 Thread Nordlöw
Have anybody come up with some mixin magic that given enum A { x,y,z } enum B { a,b,c } and call to a mixin BidirectionalEnums( "x", "a", "y", "b", "z", "c", ); generates two to!Enum overloads that implement bidirectional (lossless) conversion rules between A and B?

Re: How to pack types with variables in one message to send it to another thread? [tuple]

2014-09-07 Thread MarisaLovesUsAll via Digitalmars-d-learn
No need. Message has additional arguments. Btw, thanks for help! I found a solution. struct Message { uint id; string command; Variant[] args; this(T...)(uint id, string command, T args) { this.id = id; this.command = command; this.args = variantArray

Re: How to pack types with variables in one message to send it to another thread? [tuple]

2014-09-07 Thread Philippe Sigaud via Digitalmars-d-learn
You can also create new types: struct UseSprite { string s;} struct UseAnimation { string s;} >> It's not a class instance, it's a class type. Something like >> `cast(Sprite) null` in parameters. It can be replaced by string >> "Sprite", but in this case I can't use receive() as it is. E.g. >> >

Higher Order AA Algorithms

2014-09-07 Thread Nordlöw
What's the preferred to apply higher-order algorithms such as map and filter on AAs which operate on both key and value? Has there been any progress since http://forum.dlang.org/thread/mailman.75.1392335793.6445.digitalmars-d-le...@puremagic.com

Re: How to pack types with variables in one message to send it to another thread? [tuple]

2014-09-07 Thread Rikki Cattermole via Digitalmars-d-learn
On 8/09/2014 12:39 a.m., MarisaLovesUsAll wrote: Thanks for reply. Strings are immutable so thats ok. A class instance that isn't immutable isn't. It's not a class instance, it's a class type. Something like `cast(Sprite) null` in parameters. It can be replaced by string "Sprite", but in this

Re: How to pack types with variables in one message to send it to another thread? [tuple]

2014-09-07 Thread MarisaLovesUsAll via Digitalmars-d-learn
Thanks for reply. Strings are immutable so thats ok. A class instance that isn't immutable isn't. It's not a class instance, it's a class type. Something like `cast(Sprite) null` in parameters. It can be replaced by string "Sprite", but in this case I can't use receive() as it is. E.g. send

Re: How to pack types with variables in one message to send it to another thread? [tuple]

2014-09-07 Thread hane via Digitalmars-d-learn
On Sunday, 7 September 2014 at 10:42:37 UTC, MarisaLovesUsAll wrote: Hi! I'm trying to make my program multithreaded, and I was stuck at messaging between threads. I need to pack types and variables into one message. Will I use Tuples or something? e.g. class Sprite {}; send(tid, Sprite, "c

Re: How to pack types with variables in one message to send it to another thread? [tuple]

2014-09-07 Thread Rikki Cattermole via Digitalmars-d-learn
On 7/09/2014 10:42 p.m., MarisaLovesUsAll wrote: Hi! I'm trying to make my program multithreaded, and I was stuck at messaging between threads. I need to pack types and variables into one message. Will I use Tuples or something? e.g. class Sprite {}; send(tid, Sprite, "create", myInt); Don't

How to pack types with variables in one message to send it to another thread? [tuple]

2014-09-07 Thread MarisaLovesUsAll via Digitalmars-d-learn
Hi! I'm trying to make my program multithreaded, and I was stuck at messaging between threads. I need to pack types and variables into one message. Will I use Tuples or something? e.g. class Sprite {}; send(tid, Sprite, "create", myInt); Also I don't understand how to use

Re: Installing LDC on Windows

2014-09-07 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2014-09-06 at 21:52 +, David Nadlinger via Digitalmars-d-learn wrote: > On Saturday, 6 September 2014 at 16:11:55 UTC, Russel Winder via > Digitalmars-d-learn wrote: > > I installed the other MinGW option and it provides > > libgcc_s_sjlj-1.dll > > which is not helping me actually run

rdmd --makedepend requires -of; how to just print to stdout?

2014-09-07 Thread kraybit via Digitalmars-d-learn
In 2.065 rdmd would just print the stuff from --makedepend to stdout, now it seems to require -of. How to print to stdout like before? (On Windows) cheers! /k