Re: Trying to compile weather program

2015-08-25 Thread Martin Nowak via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 05:27:16 UTC, Tony wrote: I happened to notice that among my libcurl*s libcurl-gnutls.so.3 libcurl-gnutls.so.4 libcurl-gnutls.so.4.3.0 libcurl.so.3 libcurl.so.4 libcurl.so.4.3.0 none were just libcurl.so. So I made a link for libcurl.so to the latest version and n

Re: Trying to compile weather program

2015-08-25 Thread Martin Nowak via Digitalmars-d-learn
On Sunday, 23 August 2015 at 09:54:37 UTC, Tony wrote: auto loc = getJSON("ipinfo.io/")["loc"] .str.split(","); BTW, the IP location doesn't work too reliably, if someone knows a better alternative...

Re: Role of D in Python and performance computing [was post on using go 1.5 and GC latency]

2015-08-25 Thread via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 05:09:56 UTC, Laeeth Isharc wrote: On Monday, 24 August 2015 at 21:57:41 UTC, rsw0x wrote: On Monday, 24 August 2015 at 21:20:39 UTC, Russel Winder wrote: For Python and native code, D is a great fit, perhaps more so that Rust, except that Rust is getting more mind

Re: Role of D in Python and performance computing [was post on using go 1.5 and GC latency]

2015-08-25 Thread rsw0x via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 07:18:24 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 25 August 2015 at 05:09:56 UTC, Laeeth Isharc wrote: On Monday, 24 August 2015 at 21:57:41 UTC, rsw0x wrote: [...] Horses for courses ? Eg for Andy Smith's problem of processing trade information of tens of g

Re: Role of D in Python and performance computing [was post on using go 1.5 and GC latency]

2015-08-25 Thread via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 07:21:13 UTC, rsw0x wrote: An option implies you can turn it off, has this changed since the last time I used Rust?(admittedly, a while back) Rust supports other reference types, so you decide by design whether you want to use linear typing or not?

Re: Digger 2.3 & verstr.h problem

2015-08-25 Thread Robert M. Münch via Digitalmars-d-learn
On 2015-08-24 14:27:52 +, Vladimir Panteleev said: Well, yes, your problem is that DMD 2.067 isn't finding a file while compiling DMD HEAD. So you would need to debug DMD 2.067 to find why it refuses to compile DMD HEAD. Any way that I can switch to 2.068 for building HEAD? Not that I exp

Re: Ranges - Question about desing choices

2015-08-25 Thread cym13 via Digitalmars-d-learn
On Monday, 24 August 2015 at 17:59:00 UTC, Michal Minich wrote: Ok. What about this: there exactly the same 3 primitives as in D range, but popFront is requred to be called first, before calling front, or empty properties. Why current approach against this? Wouldn't that mean a null placehold

__traits(allMembers) and aliases

2015-08-25 Thread Mike Parker via Digitalmars-d-learn
Is there a way to determine whether a given symbol is an alias? Consider this: ``` module funcs; alias FuncPtr = void function(); @ChooseMe FuncPtr funcPtr; alias anotherName = funcPtr; ``` Handing this module off to __traits(allMembers), then checking for the UDA on each member, I can filter

Re: __traits(allMembers) and aliases

2015-08-25 Thread Dejan Lekic via Digitalmars-d-learn
It is off-topic (sorry for that), but how you grab only those (say functions) in a module that are annotated with @ChoseMe ?? allMembers trait gives bunch of strings, and I could not find a way to use them with hasUDA template...

[Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Jack via Digitalmars-d-learn
So I've been using Dgame to learn about game development and I'm having an error when I'm trying to set a sprite's position initialized and stored in another class. Basically my code is: //Texman.d// Class Texman { //variables void addSprite(strin

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Jack via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 12:50:50 UTC, Jack wrote: So I've been using Dgame to learn about game development and I'm having an error when I'm trying to set a sprite's position initialized and stored in another class. Basically my code is: //Texman.d// C

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Namespace via Digitalmars-d-learn
Edit: Basically my code is: //Texman.d// Class TextureManager { //variables void addSprite(string sprite_file, string name) { Surface wiki_img = Surface(sprite_file); Texture wiki_tex = Text

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Namespace via Digitalmars-d-learn
Note that Texture is (in constrast to Sprite) a struct and not a class, so it is a value type. Dgame tries to use as many value types as possible to reduce the amount of garbage.

Re: Digger 2.3 & verstr.h problem

2015-08-25 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 07:32:50 UTC, Robert M. Münch wrote: On 2015-08-24 14:27:52 +, Vladimir Panteleev said: Well, yes, your problem is that DMD 2.067 isn't finding a file while compiling DMD HEAD. So you would need to debug DMD 2.067 to find why it refuses to compile DMD HEAD.

dmd 2.068 deducing purity

2015-08-25 Thread Jack Applegame via Digitalmars-d-learn
Using lambdas in 2.068 becomes painful: import std.algorithm; struct Foo { int baz(int v) { static int id; return v + id++; } void bar() { auto arr1 = [1, 2, 3]; auto arr2 = [4, 5, 6]; arr1.m

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Jack via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 13:22:43 UTC, Namespace wrote: Edit: Basically my code is: //Texman.d// Class TextureManager { //variables void addSprite(string sprite_file, string name) { Surface wiki_img =

Re: __traits(allMembers) and aliases

2015-08-25 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 12:48:12 UTC, Dejan Lekic wrote: It is off-topic (sorry for that), but how you grab only those (say functions) in a module that are annotated with @ChoseMe ?? allMembers trait gives bunch of strings, and I could not find a way to use them with hasUDA template...

Re: dmd 2.068 deducing purity

2015-08-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/25/15 9:59 AM, Jack Applegame wrote: Using lambdas in 2.068 becomes painful: import std.algorithm; struct Foo { int baz(int v) { static int id; return v + id++; } void bar() { auto arr1 = [1, 2, 3]; auto arr2 = [4, 5, 6]; arr1.map!(i =>

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Namespace via Digitalmars-d-learn
Thank you for answering so quickly. If you don't mind me asking when will v0.7 be out? Not so soon. But maybe I'll release v0.6.5 with this feature at the end of september. For now you need to store your Texture in e.g. a Texture manager.

Re: __traits(allMembers) and aliases

2015-08-25 Thread Rikki Cattermole via Digitalmars-d-learn
On 26/08/15 12:06 AM, Mike Parker wrote: Is there a way to determine whether a given symbol is an alias? Consider this: ``` module funcs; alias FuncPtr = void function(); @ChooseMe FuncPtr funcPtr; alias anotherName = funcPtr; ``` Handing this module off to __traits(allMembers), then checking f

Re: NYT data article based on work of EMSI, who I think are a D shop

2015-08-25 Thread Justin Whear via Digitalmars-d-learn
On Tue, 25 Aug 2015 04:55:12 +, Laeeth Isharc wrote: > http://www.nytimes.com/2015/08/23/magazine/the-creative-apocalypse-that- wasnt.html > > Interesting article as it corrects misconceptions of a few years back by > looking at the data. This is based on tools from EMSI, > who are a D shop.

Re: dmd 2.068 deducing purity

2015-08-25 Thread Jack Applegame via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 14:05:17 UTC, Steven Schveighoffer wrote: Can you post an example? import std.range; import std.algorithm; class Foo { int baz() { return 1;} void bar() { auto s = [1].map!(i => baz()); // compiles auto r = [1].map!(i => [1].m

Re: NYT data article based on work of EMSI, who I think are a D shop

2015-08-25 Thread anonymous via Digitalmars-d-learn
On Tuesday 25 August 2015 06:55, Laeeth Isharc wrote: > http://www.nytimes.com/2015/08/23/magazine/the-creative-apocalypse-that-wasnt.html > > Interesting article as it corrects misconceptions of a few years > back by looking at the data. This is based on tools from EMSI, > who are a D shop. >

Re: dmd 2.068 deducing purity

2015-08-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/25/15 1:05 PM, Jack Applegame wrote: On Tuesday, 25 August 2015 at 14:05:17 UTC, Steven Schveighoffer wrote: Can you post an example? import std.range; import std.algorithm; class Foo { int baz() {return 1;} void bar() { auto s = [1].map!(i => baz()); // compiles

Should this compile?

2015-08-25 Thread tchaloupka via Digitalmars-d-learn
import std.stdio; import std.range : chain; auto test(string a) { return test(a, "b"); } auto test(string a, string b) { return chain(a, b); } void main() { writeln(test(a)); } Ends with: Error: forward reference to inferred return type of function call 'test' I know this exact

Re: Should this compile?

2015-08-25 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 18:19:40 UTC, tchaloupka wrote: import std.stdio; import std.range : chain; auto test(string a) { return test(a, "b"); } auto test(string a, string b) { return chain(a, b); } void main() { writeln(test(a)); } Ends with: Error: forward reference to inf

Static linking on Linux with dmd or gcc

2015-08-25 Thread TwinkleTheDragon via Digitalmars-d-learn
Greetings! I'm just getting started with D, and just installed both dmd and gdc. Using the Hello, World program as an example, I'm trying to create a completely static / self-contained D binary. Using gdc, this is easy to do: gdc -static hello.d Then when I ldd hello, the system says: no

Re: dmd 2.068 deducing purity

2015-08-25 Thread Jack Applegame via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 18:03:21 UTC, Steven Schveighoffer wrote: https://issues.dlang.org/show_bug.cgi?id=14962 -Steve Thanks.

Re: C++/STL interop

2015-08-25 Thread anonymous via Digitalmars-d-learn
On Monday 24 August 2015 17:37, anonymous wrote: > I saw https://issues.dlang.org/show_bug.cgi?id=14956 . > > > questions: > - is std.basic_string released into the wild? > - where do I find std.basic_string? > - does std.vector exist? That would allow me to get rid of some > C++ clue code (buil

Re: NYT data article based on work of EMSI, who I think are a D shop

2015-08-25 Thread Laeeth Isharc via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 17:06:57 UTC, anonymous wrote: On Tuesday 25 August 2015 06:55, Laeeth Isharc wrote: http://www.nytimes.com/2015/08/23/magazine/the-creative-apocalypse-that-wasnt.html Interesting article as it corrects misconceptions of a few years back by looking at the data.

RAII and Deterministic Destruction

2015-08-25 Thread Jim Hewes via Digitalmars-d-learn
Although C++ can be ugly, one reason I keep going back to it rather then commit more time to reference-based languages like C# is because I like deterministic destruction so much. My question is whether D can REALLY handle this or not. I've not been sure about this for some time so now I'm just

Re: NYT data article based on work of EMSI, who I think are a D shop

2015-08-25 Thread Laeeth Isharc via Digitalmars-d-learn
Hi, I'm the Data group lead at EMSI; my group is the primary user of D in the organization and I can confirm that we are doing some interesting things with it that really leverage D's strengths. I will work on putting together a piece highlighting some of those things--any suggestions for venu

Re: NYT data article based on work of EMSI, who I think are a D shop

2015-08-25 Thread anonymous via Digitalmars-d-learn
On Wednesday 26 August 2015 00:22, Laeeth Isharc wrote: > I'm open to being corrected about where the right place should > be, but it wasn't an accidental decision to post here. I think you might find more interest over in General. Learn tends to be a question/answer kind of thing. So people pro

Re: RAII and Deterministic Destruction

2015-08-25 Thread ZombineDev via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote: Although C++ can be ugly, one reason I keep going back to it rather then commit more time to reference-based languages like C# is because I like deterministic destruction so much. My question is whether D can REALLY handle this or not

Re: RAII and Deterministic Destruction

2015-08-25 Thread ZombineDev via Digitalmars-d-learn
On Wednesday, 26 August 2015 at 01:09:15 UTC, ZombineDev wrote: On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote: Although C++ can be ugly, one reason I keep going back to it rather then commit more time to reference-based languages like C# is because I like deterministic destruction

Re: RAII and Deterministic Destruction

2015-08-25 Thread cym13 via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote: Although C++ can be ugly, one reason I keep going back to it rather then commit more time to reference-based languages like C# is because I like deterministic destruction so much. My question is whether D can REALLY handle this or not

Re: RAII and Deterministic Destruction

2015-08-25 Thread rsw0x via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote: Although C++ can be ugly, one reason I keep going back to it rather then commit more time to reference-based languages like C# is because I like deterministic destruction so much. My question is whether D can REALLY handle this or not

Re: RAII and Deterministic Destruction

2015-08-25 Thread ZombineDev via Digitalmars-d-learn
On Wednesday, 26 August 2015 at 01:18:43 UTC, ZombineDev wrote: On Wednesday, 26 August 2015 at 01:09:15 UTC, ZombineDev wrote: On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote: Although C++ can be ugly, one reason I keep going back to it rather then commit more time to reference-bas

Re: RAII and Deterministic Destruction

2015-08-25 Thread Mike via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 22:35:57 UTC, Jim Hewes wrote: Although C++ can be ugly, one reason I keep going back to it rather then commit more time to reference-based languages like C# is because I like deterministic destruction so much. My question is whether D can REALLY handle this or not