Re: What is the memory usage of my app?

2015-04-18 Thread Adil via Digitalmars-d-learn
On Friday, 17 April 2015 at 14:50:29 UTC, Márcio Martins wrote: On Friday, 17 April 2015 at 14:49:19 UTC, Márcio Martins wrote: On Thursday, 16 April 2015 at 12:17:24 UTC, Adil wrote: I've written a simple socket-server app that securities (stock market shares) data and allows clients to query

Re: About @ and UDA

2015-04-18 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-04-17 21:35, Jacob Carlborg wrote: UDA's were available when these attributes/keywords were created. Reasons why they're still not UDA's are probably a mix of avoiding code breakage and someone that needs to make the change. Were _not_ available ... -- /Jacob Carlborg

Internal symbols?

2015-04-18 Thread Etienne via Digitalmars-d-learn
Is there a way to prevent DMD from exporting a symbol? Basically, I would need an attribute like extern(none) because my library makes heavy use of CTFE and the linker takes 13 seconds, while OMF is also off the table for me and this is creating tons of problems... Thanks in advance!

Re: randomUUID for runtime / how to generate UUIDs in runtime

2015-04-18 Thread via Digitalmars-d-learn
On Friday, 17 April 2015 at 19:17:32 UTC, Jesse Phillips wrote: On Friday, 17 April 2015 at 14:05:26 UTC, Ozan Süel wrote: ... You'll need to use a constructor: this() { myid = randomUUID(); } That's it. Thanks Ali Jesse. I have to put it in a constructor. Regards, Ozan

Re: std.array.split - Template instantiating error

2015-04-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/18/15 4:18 AM, nrgyzer wrote: array.d(1510): Error not a property splitter(range, sep).array sample.d(6): Error template instance std.array.split!(string, char) error instantiating Are you using -property switch? Looks like std.array does not obey property switch requirements. I

Templates: Array slices not recognized

2015-04-18 Thread Chris via Digitalmars-d-learn
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 slices.doSomething cannot deduce function from argument

Re: Templates: Array slices not recognized

2015-04-18 Thread Chris via Digitalmars-d-learn
On Saturday, 18 April 2015 at 16:26:57 UTC, Max Klyga wrote: 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

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: Templates: Array slices not recognized

2015-04-18 Thread ketmar via Digitalmars-d-learn
On Sat, 18 Apr 2015 17:50:56 +, Chris wrote: Doh! You're right! My bad. However, this makes the function less generic, but it doesn't matter here. maybe `auto ref` can help here? signature.asc Description: PGP signature

Re: Where is COFFIMPLIB

2015-04-18 Thread Darrell Gallion via Digitalmars-d-learn
http://ftp.digitalmars.com/coffimplib.zip

Re: Where is COFFIMPLIB

2015-04-18 Thread Darrell Gallion via Digitalmars-d-learn
On Friday, 17 April 2015 at 14:20:10 UTC, Darrell Gallion wrote: Attempting to link to snappy.lib on windows. Getting the infamous Error 43: Not a Valid Library File The conversion from COFF Format to OMF Format seems like the issue. The fix isn't so clear. There's an ftp site that needs a

Re: Where is COFFIMPLIB

2015-04-18 Thread Darrell Gallion via Digitalmars-d-learn
On Friday, 17 April 2015 at 19:38:08 UTC, Jacob Carlborg wrote: If you compile as 64bit or with the -m32mscoff flag the compiler will output object files in the COFF format. Thought there were other complications on Windows for 64bit?

Linker errors building tools from git master

2015-04-18 Thread Gary Willoughby via Digitalmars-d-learn
I've cloned the main repositories and i'm trying to get everything building successfully. DMD, druntime and phobos all built without a hitch. When building the tools however i'm getting a lot of warnings from new compiler features (which is to be expected i guess) but i'm also getting linker

Building website from git master, why does it checkout DMD v2.066.1 and die?

2015-04-18 Thread Gary Willoughby via Digitalmars-d-learn
I'm trying to build the website from git master and i'm getting some errors. Here is the last part of the output: ... touch ../dub-0.9.22/.cloned mkdir -p /tmp/.stable_dmd-2.066.1 TMPFILE=$(mktemp deleteme.) curl -fsSL http://downloads.dlang.org/releases/2014/dmd.2.066.1.linux.zip

Re: std.array.split - Template instantiating error

2015-04-18 Thread nrgyzer via Digitalmars-d-learn
On Saturday, 18 April 2015 at 13:00:59 UTC, Steven Schveighoffer wrote: On 4/18/15 4:18 AM, nrgyzer wrote: array.d(1510): Error not a property splitter(range, sep).array sample.d(6): Error template instance std.array.split!(string, char) error instantiating Are you using -property switch?

Iterate over enum

2015-04-18 Thread HaraldZealot via Digitalmars-d-learn
Is it possible iterate over enum (preferable in compile time) or at least check that particular value belong to enum?

Re: Iterate over enum

2015-04-18 Thread Ali Çehreli via Digitalmars-d-learn
On 04/18/2015 01:30 PM, HaraldZealot wrote: Is it possible iterate over enum (preferable in compile time) or at least check that particular value belong to enum? EnumMembers: http://dlang.org/phobos/std_traits.html#EnumMembers It returns a static tuple, meaning that a foreach over those

Input ranges

2015-04-18 Thread via Digitalmars-d-learn
It seems input ranges without any indirection in memory are not working well with algorithms. This seems to be understood by the D community. I did not know. Here is my story on the topic so far: Recently, I learned that I did not know input ranges much at all, totally misjudging

Re: Iterate over enum

2015-04-18 Thread HaraldZealot via Digitalmars-d-learn
On Saturday, 18 April 2015 at 20:42:09 UTC, Ali Çehreli wrote: On 04/18/2015 01:30 PM, HaraldZealot wrote: Is it possible iterate over enum (preferable in compile time) or at least check that particular value belong to enum? EnumMembers: http://dlang.org/phobos/std_traits.html#EnumMembers

Re: Where is COFFIMPLIB

2015-04-18 Thread Darrell Gallion via Digitalmars-d-learn
On Friday, 17 April 2015 at 14:39:52 UTC, Adam D. Ruppe wrote: coffimplib is a paid utility out of the $15 extended utility package http://digitalmars.com/eup.html buy from here (be sure javascript is enabled or the form won't even appear) http://digitalmars.com/shop.html and yeah i

Re: Where is COFFIMPLIB

2015-04-18 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 18 April 2015 at 23:01:28 UTC, Darrell Gallion wrote: Why would anyone buy this? It was pretty cool back in the 90's. coffimplib wasn't there Weird, it is supposed to be.

std.array.split - Template instantiating error

2015-04-18 Thread nrgyzer via Digitalmars-d-learn
Hi, I've the following source: import std.array : split; import std.stdio : writeln; void main() { string myString = Hello World; string[] splitted = myString.split( ); } But when I compile the code above, I'm getting the following error: Error: template instance

Re: std.array.split - Template instantiating error

2015-04-18 Thread nrgyzer via Digitalmars-d-learn
On Saturday, 18 April 2015 at 08:13:00 UTC, Rikki Cattermole wrote: On 18/04/2015 8:08 p.m., nrgyzer wrote: Hi, I've the following source: import std.array : split; import std.stdio : writeln; void main() { string myString = Hello World; string[] splitted = myString.split( ); } But

Re: std.array.split - Template instantiating error

2015-04-18 Thread Rikki Cattermole via Digitalmars-d-learn
On 18/04/2015 8:08 p.m., nrgyzer wrote: Hi, I've the following source: import std.array : split; import std.stdio : writeln; void main() { string myString = Hello World; string[] splitted = myString.split( ); } But when I compile the code above, I'm getting the following error:

Re: std.array.split - Template instantiating error

2015-04-18 Thread biozic via Digitalmars-d-learn
On Saturday, 18 April 2015 at 08:08:41 UTC, nrgyzer wrote: Hi, I've the following source: import std.array : split; import std.stdio : writeln; void main() { string myString = Hello World; string[] splitted = myString.split( ); } But when I compile the code above, I'm getting the