Can file name, module name, class name and variable name be the same?

2016-01-17 Thread WhatMeWorry via Digitalmars-d-learn
file 1: camera.d --- module camera; class Camera { public: // Camera Attributes vec3 position = vec3(0.0f, 0.0f, 0.0f); . . . }; --- file 2: main.d --- module main; import camera; Camera camera; // Compile error (1)

[Issue 15456] sc.ini: Access denied for non-superusers on Windows 10

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15456 --- Comment #6 from Brad Anderson --- Yep, it's just the permissions. The other issue issue I hit in the above comments is unrelated (though still a problem). Either pull request will fix this issue. --

Re: extern(C++, ns)

2016-01-17 Thread jmh530 via Digitalmars-d
On Monday, 18 January 2016 at 03:58:35 UTC, Walter Bright wrote: Yes. Or, in the last case, even just fooa(). It also seems to work if I combine the M and N D packages in that case.

Re: extern(C++, ns)

2016-01-17 Thread Walter Bright via Digitalmars-d
On 1/17/2016 6:16 PM, jmh530 wrote: On Sunday, 17 January 2016 at 19:47:46 UTC, Walter Bright wrote: and yes, M.X.fooa() will wind up referring to the same externally defined symbol X::fooa() as N.X.fooa(). Just for clarification. Suppose instead of file2 having fooa, it has foob, so there

[Issue 13678] TypeInfo.initializer is inconsistent

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13678 Marco Leise changed: What|Removed |Added Summary|TypeInfo.init is|TypeInfo.initializer is

Re: dmd installation question

2016-01-17 Thread Brad Anderson via Digitalmars-d
On Saturday, 16 January 2016 at 01:16:22 UTC, Dibyendu Majumdar wrote: Hi [snip] Upon investigating it appears that the sc.ini file is not readable by the user. If I log in as Administrator then the build works. What am I doing wrong? Regards We've got a wealth of fixes for this now

[Issue 15576] New: extern(C++) wrong mangling

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576 Issue ID: 15576 Summary: extern(C++) wrong mangling Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

[Issue 9347] new std.signals2 implementation

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9347 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 2447] There's no disconnectall for std.signals

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2447 Issue 2447 depends on issue 9347, which changed state. Issue 9347 Summary: new std.signals2 implementation https://issues.dlang.org/show_bug.cgi?id=9347 What|Removed |Added

Re: Using D with IntelliJ

2016-01-17 Thread Minas Mina via Digitalmars-d-announce
On Monday, 18 January 2016 at 00:14:52 UTC, Israel wrote: On Sunday, 17 January 2016 at 09:29:02 UTC, Minas Mina wrote: I have written a tutorial on how to set up D with IntelliJ. https://www.reddit.com/r/programming/comments/41cuud/using_d_with_intellij/ Comments appreciated :) Thanks.

[Issue 13911] rename std.stdio to std.io

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13911 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: DMD - issue building shared library

2016-01-17 Thread bitwise via Digitalmars-d
On Sunday, 17 January 2016 at 22:12:44 UTC, Dibyendu Majumdar wrote: Presumably there is no compiler flag to auto generate this? There's no compiler flag, but you can use this: https://github.com/D-Programming-Language/druntime/blob/master/src/core/sys/windows/dll.d#L473 Bit

Distributed Memory implementation

2016-01-17 Thread tcak via Digitalmars-d
I, due to a need, will start implementation of distributed memory system. Idea is that: Let's say you have allocated 1 GiB space in memory. This memory is blocked into 4 KiB. After some reservation, and free operations, now only the blocks 0, 12, and 13 are free to be allocated. Problem

Re: Premake officially gains D support

2016-01-17 Thread Manu via Digitalmars-d
On 17 January 2016 at 10:18, Dibyendu Majumdar via Digitalmars-d wrote: > On Friday, 15 January 2016 at 21:13:22 UTC, Dibyendu Majumdar wrote: >> >> On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote: >>> >>> Perhaps of interest, I have been maintaining D support in

[Issue 12062] std.range.flatten

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12062 Jack Stouffer changed: What|Removed |Added CC||j...@jackstouffer.com

Re: extern(C++, ns)

2016-01-17 Thread Manu via Digitalmars-d
On 15 January 2016 at 12:25, Walter Bright via Digitalmars-d wrote: > On 1/14/2016 6:24 PM, Walter Bright wrote: >> >> On 1/13/2016 9:39 PM, Walter Bright wrote: >>> >>>https://issues.dlang.org/show_bug.cgi?id=15565 >> >> >>

[Issue 13901] Improvements to documentation

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13901 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 12548] Safer malloc/calloc/realloc wrappers in Phobos

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12548 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15574] wrong order of linker arguments breaks with as-needed

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15574 --- Comment #1 from Martin Nowak --- We should pass any linker arguments in the same order as they were passed to dmd. This requires some refactoring of command line parsing and link part. For pragma(lib) we can only choose between

Re: How do you keep up with the Kardashi^W^W github?

2016-01-17 Thread Steven Schveighoffer via Digitalmars-d
On 1/13/16 9:01 AM, Andrei Alexandrescu wrote: I'm sure there must be better techniques. How do you keep up with github? All my github email goes into a specific folder. My email client organizes by thread, so while there may be 100 messages some days, there's generally a far fewer number

[Issue 10378] Local imports hide local symbols

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10378 Steven Schveighoffer changed: What|Removed |Added CC|

[Issue 15572] Windows installer leaves "sc.ini" inaccessible

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15572 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de

Re: topN using a heap

2016-01-17 Thread Andrei Alexandrescu via Digitalmars-d
On 01/17/2016 03:32 PM, Ivan Kazmenko wrote: Here is a more verbose version. OK, very nice. Thanks! I've modified topN to work as follows. In a loop: * If nth <= r.length / log2(r.length)^^2 (or is similarly close to r.length), use topNHeap with one heap and stop * If nth <= r.length /

Re: core.time Duration how to get units in double/float format?

2016-01-17 Thread Borislav Kosharov via Digitalmars-d-learn
On Sunday, 17 January 2016 at 18:57:13 UTC, biozic wrote: On Sunday, 17 January 2016 at 14:43:26 UTC, Borislav Kosharov wrote: Seeing that TickDuration is being deprecated and that I should use Duration instead, I faced a problem. I need to get total seconds like a float. Using

Re: extern(C++, ns)

2016-01-17 Thread Walter Bright via Digitalmars-d
On 1/17/2016 3:55 AM, Daniel Murphy wrote: So now we have two public symbols called 'mylib', and because they conflict they can't be used to disambiguate eg 'someotherlib.funca' with 'library.a.funca'. Consider these two C++ files: --file 1- namespace (X) { int fooa() { ... }

Re: DUB - link error on Windows 10 64-bit

2016-01-17 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Sunday, 17 January 2016 at 03:07:39 UTC, Mike Parker wrote: Have you verified that this is the only DMD installation on your path? Looks like the problem is not in dub - but the fact that a shared library in D requires a DllMain - as described in:

[Issue 15456] sc.ini: Access denied for non-superusers on Windows 10

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15456 Rainer Schuetze changed: What|Removed |Added Keywords||pull --- Comment #5

Re: Logo for D

2016-01-17 Thread Karabuta via Digitalmars-d-announce
On Saturday, 16 January 2016 at 20:13:07 UTC, anonymous wrote: It's not been rejected outright. More like put on ice. Or maybe I'm just not getting the hints :) Andrei said: "Can we defer any changes to the logo so we don't get sidetracked in this? Just scale the existing logo to fit and

[Issue 15457] Symbol Undefined __lseeki64

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15457 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #1

[Issue 15555] [Reg 2.070.0-b1] Hidden error cause by Throwable.message

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1 Martin Nowak changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: Functions that return type

2016-01-17 Thread data pulverizer via Digitalmars-d-learn
On Sunday, 17 January 2016 at 02:08:06 UTC, Timon Gehr wrote: On 01/16/2016 11:50 PM, data pulverizer wrote: I guess the constraints are that of a static language. (This is not true.) Could you please explain?

Re: Logo for D

2016-01-17 Thread anonymous via Digitalmars-d-announce
On 17.01.2016 18:55, Karabuta wrote: Ohh! A great design is better seen by a designer. "Iron with steal, steel with gold, gold with diamond". Always room for improvement. I don't understand.

[Issue 13265] Please detect the DXSDK when configuring sc.ini in the installer

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13265 Rainer Schuetze changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14999] Out of memory when compiling vibe.d

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14999 Martin Nowak changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: On Dub

2016-01-17 Thread Martin Nowak via Digitalmars-d
On Sunday, 17 January 2016 at 11:21:41 UTC, Russel Winder wrote: Dub has a "run" capability, but apparently no "install" one. Also it appears to leave compilation products inside the ~/.dub directory. Well run already runs the binary, so you can just use that `dub run myprog -- args`.

Re: std.experimental.yesnogc

2016-01-17 Thread ZombineDev via Digitalmars-d
On Thursday, 14 January 2016 at 14:52:19 UTC, Andrei Alexandrescu wrote: On 01/14/2016 09:50 AM, bachmeier wrote: On Thursday, 14 January 2016 at 07:44:16 UTC, Jacob Carlborg wrote: std.experimental.memory.rc std.experimental.memory.gc std.experimental.memory.manual // or something +1 I

Re: DMD - issue building shared library

2016-01-17 Thread bitwise via Digitalmars-d
On Sunday, 17 January 2016 at 16:10:01 UTC, Dibyendu Majumdar wrote: LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup _DllMainCRTStartup: D shared libs on windows still require a DllMain. If you follow this post here[1] to create one, it should solve some of your problem.

Re: Beta D 2.070.0-b2

2016-01-17 Thread Martin Nowak via Digitalmars-d-announce
Second and last beta for the 2.070.0 release. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.070.0.html Please report any bugs at https://issues.dlang.org -Martin

Re: topN using a heap

2016-01-17 Thread Ivan Kazmenko via Digitalmars-d
On Sunday, 17 January 2016 at 16:06:31 UTC, Andrei Alexandrescu wrote: On 01/17/2016 06:41 AM, Ivan Kazmenko wrote: The average case is O(n + (k log n log k)) for small enough k. So, any k below roughly n / log^2 (n) makes the second summand less than the first. I don't understand how you

Re: DMD - issue building shared library

2016-01-17 Thread Dibyendu Majumdar via Digitalmars-d
On Sunday, 17 January 2016 at 19:10:16 UTC, bitwise wrote: On Sunday, 17 January 2016 at 16:10:01 UTC, Dibyendu Majumdar wrote: LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup _DllMainCRTStartup: D shared libs on windows still require a DllMain. If you follow this post

Re: core.time Duration how to get units in double/float format?

2016-01-17 Thread biozic via Digitalmars-d-learn
On Sunday, 17 January 2016 at 14:43:26 UTC, Borislav Kosharov wrote: Seeing that TickDuration is being deprecated and that I should use Duration instead, I faced a problem. I need to get total seconds like a float. Using .total!"seconds" returns a long and if the duration is less than 1 second

Re: Beta D 2.070.0-b1

2016-01-17 Thread Martin Nowak via Digitalmars-d-announce
On 01/14/2016 11:13 AM, Nordlöw wrote: > I'm missing changelog entry for > > - new algorithm `std.algorithm.comparison.either` > - update for return type of `findSplit*` enabling bool-conversion in for > instance > > if (const hit = haystack.findSplit(needle)) > { > // use hit > } There is

Beta D 2.070.0-b2

2016-01-17 Thread Martin Nowak via Digitalmars-d-announce
Second and last beta for the 2.070.0 release. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.070.0.html Please report any bugs at https://issues.dlang.org -Martin

Re: fix for enumerating local import dependencies, resolving all rdmd link errors

2016-01-17 Thread zabruk70 via Digitalmars-d
On Friday, 12 July 2013 at 06:23:33 UTC, Timothee Cour wrote: I wrote a recursive dependency analyzer and plugged it in a modified rdmd, and it does indeed work in all cases I tried Timothee, can you share your RDMD changes? This is annoing bug still here. Thank you.

Re: Using D with IntelliJ

2016-01-17 Thread Israel via Digitalmars-d-announce
On Sunday, 17 January 2016 at 09:29:02 UTC, Minas Mina wrote: I have written a tutorial on how to set up D with IntelliJ. https://www.reddit.com/r/programming/comments/41cuud/using_d_with_intellij/ Comments appreciated :) Thanks. Would be nice if you could do one for setting up DCD as it

[Issue 15575] Wrong value for static immutable struct with union

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15575 ag0ae...@gmail.com changed: What|Removed |Added Keywords||ice CC|

[Issue 15575] Wrong value for static immutable struct with union

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15575 --- Comment #1 from Cédric Picard --- I should mention that the code is inspired by Adam Ruppe's arsd/color.d and that a comment next to the "if (__ctfe)" part mentions that it is a hack arround bug 10937. That may be

copying directories recursively

2016-01-17 Thread anonymous via Digitalmars-d-learn
TL;DR: Is there a simple way to copy directories recursively? My goal is to copy the directories ./src/dlang.org/{css,images,js} and their contents to ./ddo/{css,images,js}. Naively I tried this: void main() { import file = std.file; auto outputPath = "./ddo/"; foreach (dir;

Re: topN using a heap

2016-01-17 Thread deadalnix via Digitalmars-d
On Saturday, 16 January 2016 at 15:25:50 UTC, Andrei Alexandrescu wrote: https://github.com/D-Programming-Language/phobos/pull/3934 So, say you're looking for the smallest 10 elements out of 100_000. The quickselect algorithm (which topN currently uses) will successively partition the set in

[Issue 15575] New: Wrong value for static immutable struct with union

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15575 Issue ID: 15575 Summary: Wrong value for static immutable struct with union Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

Re: topN using a heap

2016-01-17 Thread deadalnix via Digitalmars-d
On Monday, 18 January 2016 at 01:38:16 UTC, Andrei Alexandrescu wrote: On 1/17/16 8:07 PM, deadalnix wrote: A common way to do it is to go quicksort, but only recurse on one side of the set. That should give log(n)^2 complexity on average. Yah, that's quickselect (which this work started

Re: extern(C++, ns)

2016-01-17 Thread jmh530 via Digitalmars-d
On Sunday, 17 January 2016 at 19:47:46 UTC, Walter Bright wrote: and yes, M.X.fooa() will wind up referring to the same externally defined symbol X::fooa() as N.X.fooa(). Just for clarification. Suppose instead of file2 having fooa, it has foob, so there is no conflict within X as to the

Re: Beta D 2.070.0-b2

2016-01-17 Thread Andrei Amatuni via Digitalmars-d-announce
On Sunday, 17 January 2016 at 20:52:20 UTC, Martin Nowak wrote: Second and last beta for the 2.070.0 release. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.070.0.html Please report any bugs at https://issues.dlang.org -Martin Changelog doesn't include ndslice.

Re: extern(C++, ns)

2016-01-17 Thread Chris Wright via Digitalmars-d
On Sun, 17 Jan 2016 22:55:23 +1100, Daniel Murphy wrote: > So now we have two public symbols called 'mylib', and because they > conflict they can't be used to disambiguate eg 'someotherlib.funca' with > 'library.a.funca'. Users want to disambiguate between a use of C++ namespace members and

Re: topN using a heap

2016-01-17 Thread Andrei Alexandrescu via Digitalmars-d
On 1/17/16 8:07 PM, deadalnix wrote: A common way to do it is to go quicksort, but only recurse on one side of the set. That should give log(n)^2 complexity on average. Yah, that's quickselect (which this work started from). It's linear, and you can't get top n in sublinear time because you

Re: DUB - link error on Windows 10 64-bit

2016-01-17 Thread bachmeier via Digitalmars-d-learn
On Sunday, 17 January 2016 at 02:48:47 UTC, Mike Parker wrote: On Saturday, 16 January 2016 at 20:28:02 UTC, Dibyendu Majumdar wrote: I have installed DMD by unzipping the DMD archive (The installer does not work correctly on Windows 10). DUB installed as normal. What problem did you

Re: DStep 0.2.1

2016-01-17 Thread anon via Digitalmars-d-announce
On Sunday, 17 January 2016 at 11:16:50 UTC, Jacob Carlborg wrote: On Sunday, 17 January 2016 at 04:05:31 UTC, anon wrote: [Snip] libclang.dylib needs to either be in the same directory as DStep or in any of standard library search paths. $PATH is not searched in for libraries. I think the

Using D with IntelliJ

2016-01-17 Thread Minas Mina via Digitalmars-d-announce
I have written a tutorial on how to set up D with IntelliJ. https://www.reddit.com/r/programming/comments/41cuud/using_d_with_intellij/ Comments appreciated :)

std.zip for Binary example

2016-01-17 Thread locco via Digitalmars-d-learn
Hi :) I found this example: == import std.file: write; import std.string: representation; void main() { char[] data = "Test data.\n".dup; // Create an ArchiveMember for the test file. ArchiveMember am = new

Re: std.zip for Binary example

2016-01-17 Thread Sean Campbell via Digitalmars-d-learn
On Sunday, 17 January 2016 at 10:34:19 UTC, locco wrote: Hi :) I found this example: == import std.file: write; import std.string: representation; void main() { char[] data = "Test data.\n".dup; // Create an ArchiveMember

Re: On Dub

2016-01-17 Thread Guillaume Piolat via Digitalmars-d
On Sunday, 17 January 2016 at 11:21:41 UTC, Russel Winder wrote: Cargo puts compilation products into the using project tree and not the ~/.cargo tree. Sönke said once that DUB used to work like Cargo and not have packages installed globally, and then users asked for a change. While I

Re: On Dub

2016-01-17 Thread Russel Winder via Digitalmars-d
On Sun, 2016-01-17 at 12:04 +, rsw0x via Digitalmars-d wrote: > > dub should be using the $XDG_CACHE_HOME/dub (or $HOME/.cache/dub  > if it's not set) for storing build files to abide by XDG  > standards. True, but this is a Linux thing and, as we know, people will insist on using Windows

Re: On Dub

2016-01-17 Thread Russel Winder via Digitalmars-d
On Sun, 2016-01-17 at 12:17 +, Guillaume Piolat via Digitalmars-d wrote: > On Sunday, 17 January 2016 at 11:21:41 UTC, Russel Winder wrote: > > Cargo puts compilation products into the using project tree and  > > not the ~/.cargo tree. > > > > Sönke said once that DUB used to work like Cargo

Re: On Dub

2016-01-17 Thread Russel Winder via Digitalmars-d
On reflection the Cargo way of working only works if you clean everything and rebuild everything every time. The Go way of working allows to trivially switch the output of the compilation products by a simple change of environment variable. Go's way of vendoring does however suck. -- Russel.

Re: On Dub

2016-01-17 Thread rsw0x via Digitalmars-d
On Sunday, 17 January 2016 at 12:32:47 UTC, Russel Winder wrote: On Sun, 2016-01-17 at 12:17 +, Guillaume Piolat via Digitalmars-d wrote: On Sunday, 17 January 2016 at 11:21:41 UTC, Russel Winder wrote: > Cargo puts compilation products into the using project tree > and not the ~/.cargo

Re: On Dub

2016-01-17 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-17 12:21, Russel Winder via Digitalmars-d wrote: Dub has a "run" capability, but apparently no "install" one. I think the reason for the missing "install" command is that most packagers will claim that software should only be installed through the system package manager. --

Re: Extending Objective-C from D.

2016-01-17 Thread Jeremie Pelletier via Digitalmars-d
On Sunday, 10 January 2016 at 21:51:53 UTC, Guillaume Piolat wrote: On Saturday, 9 January 2016 at 10:09:12 UTC, Jeremie Pelletier wrote: Hello, I'm trying to see if I can write a full Cocoa app in D, and I'm having trouble creating D classes when the underlying Objective-C interfaces have

On Dub

2016-01-17 Thread Russel Winder via Digitalmars-d
Dub has a "run" capability, but apparently no "install" one. Also it appears to leave compilation products inside the ~/.dub directory. Go puts compiled executables into $GOPATH/bin or $GOBIN and packages in $GOPATH/pkg which separates nicely downloaded repository clones from compilation

Re: topN using a heap

2016-01-17 Thread Ivan Kazmenko via Digitalmars-d
On Sunday, 17 January 2016 at 03:26:54 UTC, Andrei Alexandrescu wrote: On 1/16/16 9:37 PM, Timon Gehr wrote: Ivan's analysis suggests that even something significantly larger, like n/log(n)² might work as an upper bound for k. I'm not clear on how you got to that boundary. There are a few

Re: extern(C++, ns)

2016-01-17 Thread Daniel Murphy via Digitalmars-d
On 17/01/2016 6:09 AM, Walter Bright wrote: On 1/16/2016 6:26 AM, Daniel Murphy wrote: Nobody wants conflicting symbols in a module, and nobody wants to cram all of their C++ namespace bindings inside a single D source file to avoid getting namespace symbol conflicts. D's namespace system

Re: topN using a heap

2016-01-17 Thread Ivan Kazmenko via Digitalmars-d
On Sunday, 17 January 2016 at 02:37:48 UTC, Timon Gehr wrote: On 01/17/2016 03:09 AM, Andrei Alexandrescu wrote: On 1/16/16 8:00 PM, Timon Gehr wrote: The implementation falls back to topNHeap whenever k is within the first or last ~n/8 elements and therefore is Ω(n log n) on average.

Re: On Dub

2016-01-17 Thread rsw0x via Digitalmars-d
On Sunday, 17 January 2016 at 11:21:41 UTC, Russel Winder wrote: Dub has a "run" capability, but apparently no "install" one. Also it appears to leave compilation products inside the ~/.dub directory. Go puts compiled executables into $GOPATH/bin or $GOBIN and packages in $GOPATH/pkg which

core.time Duration how to get units in double/float format?

2016-01-17 Thread Borislav Kosharov via Digitalmars-d-learn
Seeing that TickDuration is being deprecated and that I should use Duration instead, I faced a problem. I need to get total seconds like a float. Using .total!"seconds" returns a long and if the duration is less than 1 second I get 0. My question is whats the right way to do it. Because I saw

Re: Extending Objective-C from D.

2016-01-17 Thread Jeremie Pelletier via Digitalmars-d
On Sunday, 17 January 2016 at 13:21:39 UTC, Jeremie Pelletier wrote: On Sunday, 10 January 2016 at 21:51:53 UTC, Guillaume Piolat wrote: On Saturday, 9 January 2016 at 10:09:12 UTC, Jeremie Pelletier wrote: Hello, I'm trying to see if I can write a full Cocoa app in D, and I'm having trouble

Re: dmd installation question

2016-01-17 Thread Dibyendu Majumdar via Digitalmars-d
On Sunday, 17 January 2016 at 03:27:29 UTC, Mike Parker wrote: On Saturday, 16 January 2016 at 22:04:58 UTC, Dibyendu Majumdar wrote: It seems that the sc.ini is modified by the installer - and in doing so it loses the group "Users" assignment so that no one other than the administrator

Re: topN using a heap

2016-01-17 Thread Andrei Alexandrescu via Digitalmars-d
On 01/17/2016 06:41 AM, Ivan Kazmenko wrote: The average case is O(n + (k log n log k)) for small enough k. So, any k below roughly n / log^2 (n) makes the second summand less than the first. I don't understand how you derived the average case complexity, and I don't understand how you

DMD - issue building shared library

2016-01-17 Thread Dibyendu Majumdar via Digitalmars-d
Hi I have an existing C shared library that I am trying to link to a D shared library. The D shared library at present only has a binding (extern (C)) definition, nothing else. When I try to create the shared library using the DMD command line I get link errors. Platform is Windows 10

Re: On Dub

2016-01-17 Thread rsw0x via Digitalmars-d
On Sunday, 17 January 2016 at 15:34:13 UTC, Russel Winder wrote: On Sun, 2016-01-17 at 12:39 +, rsw0x via Digitalmars-d wrote: […] It wouldn't be a very big change to just adhere to $DUBPPATH if it exists, which seems to be your major gripe about Go vs Dub. My gripe is that Dub is

Re: On Dub

2016-01-17 Thread Russel Winder via Digitalmars-d
On Sun, 2016-01-17 at 13:47 +0100, Jacob Carlborg via Digitalmars-d wrote: > On 2016-01-17 12:21, Russel Winder via Digitalmars-d wrote: > > > Dub has a "run" capability, but apparently no "install" one. > > I think the reason for the missing "install" command is that most  > packagers will

Re: On Dub

2016-01-17 Thread Russel Winder via Digitalmars-d
On Sun, 2016-01-17 at 12:39 +, rsw0x via Digitalmars-d wrote: > […] > It wouldn't be a very big change to just adhere to $DUBPPATH if  > it exists, which seems to be your major gripe about Go vs Dub. My gripe is that Dub is neither Cargo (doesn't have install, compiles in the project) nor Go

Re: topN using a heap

2016-01-17 Thread Andrei Alexandrescu via Digitalmars-d
On 01/17/2016 06:55 AM, Ivan Kazmenko wrote: So, what can be done is to introduce TopNStrategy.auto which is the default and uses the (current or better) heuristic to switch between strategies, but also leave a way to explicitly select one of the two strategies, just like one can do now with

[Issue 15574] New: wrong order of linker arguments breaks with as-needed

2016-01-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15574 Issue ID: 15574 Summary: wrong order of linker arguments breaks with as-needed Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: blocker