Re: Simple import question
On Thursday, 16 October 2014 at 10:59:29 UTC, Rei Roldan wrote: On Wednesday, 15 October 2014 at 16:11:22 UTC, Steven Schveighoffer wrote: *snip* You might of missed Adam's response up there: " But the best way is to explicitly pass all the file names to the compiler: dmd yourfile.d file2.d folder/file3.d and so on... Doing that will serve you best in the long run, it will work with any module name and will link better too. " I also prefer explicitly telling the compiler what I want to be compiled instead of the "start here and pull everything you can find" approach. i think you are going in right way
Re: Formatted output of range of tuples
On Monday, 13 October 2014 at 09:20:27 UTC, monarch_dodra wrote: On Wednesday, 8 October 2014 at 23:28:34 UTC, bearophile wrote: anonymous: You can turn the tuples into ranges with `only`: writef("%(%(%s %)\n%)", zip(indexes, source).map!(t => only(t.expand))); This is a nice idea. Expand can probably be replaced by a []. I presume this works only if the types inside the tuple are the same. Expand creates "returns" a TypeTuple though, so it's arguably "free". "[]" allocates a dynamic array, so is costly. On the flip side, "only" is *entirelly* by value, and carries all its arguments. If the tuple is big, then the range can become quite big. you are right man.
Re: COFF on Win32 how to try?
On Saturday, 11 October 2014 at 10:12:47 UTC, Szymon Gatner wrote: On Saturday, 11 October 2014 at 09:21:18 UTC, Rainer Schuetze wrote: On 10.10.2014 20:44, Szymon Gatner wrote: Hi, thanks for all the information. I got Digger (pretty nice tool btw) and it pulled all neccessary repos from GitHub. As my understanding is that I should not be doing "Build" with Diggger I just opened Windows console, entered druntime dir and typed: You have to build dmd, so it should be good starting point to succeed in building the full chain for win64: dmd, druntime and win64. You mean for Win32? Beacause that is what I am after. d:\digger-1.0\repo\druntime>make -f win64.mak MODEL=32mscoff "CC=\"%VCINSTALLDIR %\bin\cl.exe\"" and got: dmd -c -o- -Isrc -Iimport -Hfimport\core\sync\barrier.di src\core\sync\barrier.d src\core\stdc\stdio.d(859): Error: found 'nothrow' when expecting '{' Ahh, I thought it would use a compiled dmd by default. You will have to specify the path to dmd too: make -f win64.mak MODEL=32mscoff "CC=\"%VCINSTALLDIR%\bin\cl.exe\"" DMD=../result/bin/dmd The given dmd path is specific to building with digger (the normal path is ../dmd/src/dmd). You'll have to update sc.ini there, too. So to build HEAD druntime and Phobos I also need HEAD DMD, correct? Installation of 2.066 I have now is not sufficent? sounds good
Re: std.container.Array deep-copy?
On Friday, 10 October 2014 at 10:32:17 UTC, yazd wrote: Like the following? That did not work. Array!Foo y = Array!Foo(x[]); How does it not work? It compiles successfully: http://dpaste.dzfl.pl/583d20e426a0 yeah man.
Re: Multithreading in D
On Thursday, 9 October 2014 at 10:10:20 UTC, Konstantin wrote: Are you looking for parallel? http://dlang.org/library/std/parallelism/parallel.html I have seen this, but I'm not sure how to use it. Maybe: float[][] maps = new float[#threads][resolution * resolution]; foreach(i, ref elem; parallel(maps)){ elem = generateTerrain(...); } Does this look right? Yeah, it is.
Re: 'write' crashes without extra window
On Wednesday, 8 October 2014 at 09:17:01 UTC, Gary Willoughby wrote: On Wednesday, 8 October 2014 at 03:33:38 UTC, Adam D. Ruppe wrote: You could just wrap the write function in a try/catch to explicitly ignore the error. Or if the write function is there only for debug purposes you could wrap it in a debug/version block. http://ddili.org/ders/d.en/cond_comp.html Yeah, exactly man
Re: line numbers in linux stack traces?
On Sunday, 5 October 2014 at 09:10:06 UTC, Nick Sabalausky wrote: I know this keeps getting asked every year or so, but I couldn't find recent info. Are line numbers in linux stack traces supposed to be working at this point? Because I'm not getting any with 2.066.0 with either -g or -gc even when running under gdb. Kind of a pain, esp. compared to D dev on windows. yeah, I got that problem two or three times.
Re: curl and proxy
On Friday, 3 October 2014 at 10:53:27 UTC, Marc Schütz wrote: On Friday, 3 October 2014 at 04:57:28 UTC, AntonSotov wrote: auto http = HTTP("dlang.org"); http.onReceive = (ubyte[] data) { writeln(cast(string) (data)); return data.length; }; http.proxy = "192.168.111.111"; http.proxyPort = 1788; WHAT HERE ? http.perform(); // how to make Сurl authorize on a proxy. I specify proxyUser and proxyPassword? I think there's currently no way. curl provides this as an option (CurlOption.proxyuserpwd): curl.set(CurlOption.proxyuserpwd, "myuser:mypasswd"); But unfortunately the `curl` struct is a private member of `HTTP`... satisfied with your answer.