Re: time difference - beautify my code

2015-07-03 Thread dd0s via Digitalmars-d-learn
cool, thx for the detailed explanation guys!

Re: etc.c.zlib help

2015-07-03 Thread Matthew Gamble via Digitalmars-d-learn
On Friday, 3 July 2015 at 02:16:45 UTC, Mike Parker wrote: On 7/3/2015 8:44 AM, Matthew Gamble wrote: [...] The Phobos source actually includes the C source for zlib. You can find it in the DMD distribution in src/phobos/etc/c/zlib/. When Phobos is compiled, it also compiles zlib and pulls

Re: Linear algebra library with no dependency Why every linear algebra library has LAPACK dependency

2015-07-03 Thread bachmeier via Digitalmars-d-learn
On Friday, 3 July 2015 at 23:51:30 UTC, kerdemdemir wrote: This question is not only about D linear algebra libraries but also for other linear algebra libraries in other languages. I am working with some scientific developers in my current project. When we were talking I said I know a

Re: How to setup GDC with Visual D?

2015-07-03 Thread Nicholas Wilson via Digitalmars-d-learn
On Friday, 3 July 2015 at 23:45:15 UTC, Guy Gervais wrote: On Friday, 3 July 2015 at 19:17:28 UTC, Marko Grdinic wrote: Any advice regarding how I can get this to work? Thanks. I got GDC to work with VS2013 + VisualD by going into Tools-Options (The VS menu, not the one under Visual D) and

Re: etc.c.zlib help

2015-07-03 Thread Mike Parker via Digitalmars-d-learn
On 7/4/2015 1:28 AM, Matthew Gamble wrote: Wow Mike. This seems like the most likely explanation to me. I'm a bit hesitant to compile phobos from source on this machine with -m32mscoff. Perhaps a similar test would be to compile my program on a 32-bit windows machine? I can do this at work on

Re: etc.c.zlib help

2015-07-03 Thread Mike Parker via Digitalmars-d-learn
Oh, and issues should be reported at https://issues.dlang.org/.

Re: How to setup GDC with Visual D?

2015-07-03 Thread Guy Gervais via Digitalmars-d-learn
On Friday, 3 July 2015 at 19:17:28 UTC, Marko Grdinic wrote: Any advice regarding how I can get this to work? Thanks. I got GDC to work with VS2013 + VisualD by going into Tools-Options (The VS menu, not the one under Visual D) and adding the paths under Projects and Solutions - Visual D

Linear algebra library with no dependency Why every linear algebra library has LAPACK dependency

2015-07-03 Thread kerdemdemir via Digitalmars-d-learn
This question is not only about D linear algebra libraries but also for other linear algebra libraries in other languages. I am working with some scientific developers in my current project. When we were talking I said I know a great linear algebra library LAPACK but my friend who is very

Re: turning an array of structs into a struct of arrays

2015-07-03 Thread Laeeth Isharc via Digitalmars-d-learn
Not necessarily the best solution to the problem, but I just wanted to show this because I think it's kinda cool: https://gist.github.com/John-Colvin/103d3c064ad6cb4cf435#file-transformmembers-d Very impressive - now I have to try to understand how it works...!

Re: etc.c.zlib help

2015-07-03 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 3 July 2015 at 16:28:29 UTC, Matthew Gamble wrote: On Friday, 3 July 2015 at 02:16:45 UTC, Mike Parker wrote: On 7/3/2015 8:44 AM, Matthew Gamble wrote: [...] The Phobos source actually includes the C source for zlib. You can find it in the DMD distribution in

How to setup GDC with Visual D?

2015-07-03 Thread Marko Grdinic via Digitalmars-d-learn
DMC works fine, but when I try to compile using GDC it seems it can't find the compiler: Building Release GDC x64\ConsoleApp1.exe... failed launching gdc -m64 -O3 -frelease -fXf=Release GDC x64\ConsoleApp1.json -fdeps=Release GDC x64\ConsoleApp1.dep -o Release GDC x64\ConsoleApp1.exe main.d

Re: How to setup GDC with Visual D?

2015-07-03 Thread rsw0x via Digitalmars-d-learn
On Friday, 3 July 2015 at 19:17:28 UTC, Marko Grdinic wrote: [...] Have you tried using LDC? I'm unsure of GDC's support on Windows. LDC is D's LLVM compiler, and GDC/LDC generally produce binaries with similar performance. You can find a download link here:

Re: turning an array of structs into a struct of arrays

2015-07-03 Thread John Colvin via Digitalmars-d-learn
On Friday, 3 July 2015 at 10:52:03 UTC, Laeeth Isharc wrote: I have an array of structs eg struct PriceBar { DateTime date; double open; double high; double low; double close; } (which fields are present in this particular struct will depend on template arguments). what is the

Re: bigint compile time errors

2015-07-03 Thread Paul D Anderson via Digitalmars-d-learn
On Friday, 3 July 2015 at 02:37:00 UTC, Paul D Anderson wrote: The following code fails to compile and responds with the given error message. Varying the plusTwo function doesn't work; as long as there is an arithmetic operation the error occurs. [...]

Re: time difference - beautify my code

2015-07-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, July 02, 2015 19:42:57 anonymous via Digitalmars-d-learn wrote: On Thursday, 2 July 2015 at 19:03:49 UTC, dd0s wrote: i got a date t described in seconds from 1.1.1970, I.e., you have a unix timestamp. and i want to check if the current time is further than 12 hours from

Re: DMD unittest doesn't work when using visual studio with a Windows Subsystem and Winmain combination

2015-07-03 Thread Babu via Digitalmars-d-learn
On Friday, 3 July 2015 at 08:59:17 UTC, Ronnie wrote: Hi I added some unittests {} code in a small test app. With a int main(string[] args){ ... } unittest { ... } and dmd -unittest, everything works fine. If I make a Windows app with a winmain int myWinMain(HINSTANCE hInstance, HINSTANCE

Re: how to avoid cycle detected?

2015-07-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, July 02, 2015 06:56:26 Steven Schveighoffer via Digitalmars-d-learn wrote: On 7/1/15 6:25 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Wednesday, July 01, 2015 08:52:38 Steven Schveighoffer via Digitalmars-d-learn wrote: The runtime cannot introspect the code to

Re: time difference - beautify my code

2015-07-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, July 02, 2015 19:03:48 dd0s via Digitalmars-d-learn wrote: i got a date t described in seconds from 1.1.1970, and i want to check if the current time is further than 12 hours from the given time t. the following code works but it's super ugly =S please give me some ideas how to

Re: turning an array of structs into a struct of arrays

2015-07-03 Thread Babu via Digitalmars-d-learn
On Friday, 3 July 2015 at 10:52:03 UTC, Laeeth Isharc wrote: I have an array of structs eg struct PriceBar { DateTime date; double open; double high; double low; double close; } (which fields are present in this particular struct will depend on template arguments). what is the

turning an array of structs into a struct of arrays

2015-07-03 Thread Laeeth Isharc via Digitalmars-d-learn
I have an array of structs eg struct PriceBar { DateTime date; double open; double high; double low; double close; } (which fields are present in this particular struct will depend on template arguments). what is the best way to turn these at compile time into a struct of arrays?

Re: turning an array of structs into a struct of arrays

2015-07-03 Thread Laeeth Isharc via Digitalmars-d-learn
see https://github.com/economicmodeling/soa Thanks v much for this. Figured out in the meantime one solution here (probably quite ugly): https://gist.github.com/Laeeth/9174498f9b79dc90ac18