On 2017-01-16 21:04, Ali Çehreli wrote:
It is plausible to compile and link the sources of multiple packages on
the same command line at the same. (I'm not sure whether this is
required for e.g. LLVM's link-time optimization (LTO) but I think it
helps the compiler as well.)
The trouble is, the
On Tuesday, 17 January 2017 at 03:21:39 UTC, Yuxuan Shui wrote:
The built in chain seems to only be able to chain a fixed
number of ranges, is there a way to chain a range/array of
ranges?
See std.algorithm.iteration.joiner
The built in chain seems to only be able to chain a fixed number
of ranges, is there a way to chain a range/array of ranges?
On Tuesday, 17 January 2017 at 00:08:24 UTC, Nordlöw wrote:
How do I best initialize a D double to an exact mantissa and
exponent representation?
I'm specifically interested in
2^^i for all i in [min_exp, max_exp]
See
std.bitmanip : FloatRep , DoubleRep;
On Tuesday, 17 January 2017 at 00:08:24 UTC, Nordlöw wrote:
How do I best initialize a D double to an exact mantissa and
exponent representation?
I'm specifically interested in
2^^i for all i in [min_exp, max_exp]
This mach module can do the job:
How do I best initialize a D double to an exact mantissa and
exponent representation?
I'm specifically interested in
2^^i for all i in [min_exp, max_exp]
On Monday, 16 January 2017 at 22:08:56 UTC, JN wrote:
Am I correctly understanding, that after going out of scope,
it's possible for GC to destroy my thread before the file
finishes loading? How to prevent GC from destroying my thread
before it finishes and make sure the file is loaded
I'm looking at the example code for core.thread Thread class:
new Thread({
// Codes to run in the newly created thread.
}).start();
let's imagine I put the code in a function:
void loadFileAsync(string path)
{
new Thread({
writeln(readText(path));// imagine the file is
It is plausible to compile and link the sources of multiple packages on
the same command line at the same. (I'm not sure whether this is
required for e.g. LLVM's link-time optimization (LTO) but I think it
helps the compiler as well.)
The trouble is, the version identifiers used by one
On Mon, 2017-01-16 at 16:47 +, cym13 via Digitalmars-d-learn wrote:
> […]
>
> What do you mean it failed? I did that on another computer to
> test and it works flawlessly for me.
>
> […]
trying a settings.sdl file failed setting.json works.
--
Russel.
On Mon, 2017-01-16 at 16:51 +, cym13 via Digitalmars-d-learn wrote:
>
[…]
> Oh, maybe you're on windows, in which case the settings.json file
> must be placed in either $ProgramData\dub or in $APPDATA\dub.
> Relevant lines of dub.d:
>
On Monday, 16 January 2017 at 19:17:57 UTC, Mike Parker wrote:
D namespaces generally follow the format [package
names].moduleName.Type. So to have ui.Manager, then either the
module, not the package, needs to be named 'ui', or you need to
do the following:
// file ui/package.d
module ui;
On Monday, 16 January 2017 at 18:02:09 UTC, Andrey wrote:
Hello, can I using namespaces like in C++, for example:
ui::Widget or ui::Manager? I created ui/widget.d and
ui/manager.d for implementation classes Widget and Manager, bun
I can't import their correctly for using ui.Manager uiManager;
Thank you for all your answers. I was concerned because I'm
dealing with a small function that is called many times and where
the bulk of the calculations in the simulation takes place. So
even 5% performance difference would be significant for me. But
it is good to know that compilers are
On Mon, 16 Jan 2017 18:02:09 +, Andrey wrote:
> Hello, can I using namespaces like in C++, for example: ui::Widget or
> ui::Manager? I created ui/widget.d and ui/manager.d for implementation
> classes Widget and Manager, bun I can't import their correctly for using
> ui.Manager uiManager;
>
Hello, can I using namespaces like in C++, for example:
ui::Widget or ui::Manager? I created ui/widget.d and ui/manager.d
for implementation classes Widget and Manager, bun I can't import
their correctly for using ui.Manager uiManager;
If it is impossible, then what is the best way to using
On Sunday, 15 January 2017 at 23:25:25 UTC, Ryan wrote:
How would overloading work?
Overload resolution works based on function/method parameters,
not return types. In the example you gave the 3 get functions
are indistinguishable. If the template parameter was used for a
method parameter
On Monday, 16 January 2017 at 12:29:46 UTC, Russel Winder wrote:
On Mon, 2017-01-16 at 11:40 +, King_DuckZ via
Digitalmars-d-learn wrote:
On Sunday, 3 January 2016 at 17:30:15 UTC, Dibyendu Majumdar
wrote:
> Does CMake recognise D in the enable_language command?
>
> If not is there a
On Monday, 16 January 2017 at 16:08:07 UTC, Rene Zwanenburg wrote:
On Monday, 16 January 2017 at 15:56:16 UTC, Jack Stouffer wrote:
Same way you use any template parameters,
auto i = uniform!("(]")(0, 1000);
Also, if the template parameter consists of a single token you
can omit the
On Monday, 16 January 2017 at 16:47:29 UTC, cym13 wrote:
On Monday, 16 January 2017 at 10:59:33 UTC, Russel Winder wrote:
On Mon, 2017-01-16 at 10:47 +, cym13 via
Digitalmars-d-learn wrote:
On Monday, 16 January 2017 at 09:42:03 UTC, Russel Winder
wrote:
> On Sun, 2017-01-15 at 17:44
On Monday, 16 January 2017 at 10:59:33 UTC, Russel Winder wrote:
On Mon, 2017-01-16 at 10:47 +, cym13 via
Digitalmars-d-learn wrote:
On Monday, 16 January 2017 at 09:42:03 UTC, Russel Winder
wrote:
> On Sun, 2017-01-15 at 17:44 +, cym13 via
> Digitalmars-d-learn wrote:
> > On Sunday,
On Monday, 16 January 2017 at 15:56:16 UTC, Jack Stouffer wrote:
Same way you use any template parameters,
auto i = uniform!("(]")(0, 1000);
Also, if the template parameter consists of a single token you
can omit the parens:
auto i = uniform!"(]"(0, 1000);
On Monday, 16 January 2017 at 09:40:55 UTC, Russel Winder wrote:
On the one hand Cargo works wonderfully with Rust so I had
hoped Dub would work wonderfully with D. Sadly I am finding it
doesn't. Possibly my fault, but still annoying.
Cargo does not have multiple Rust compilers as an option.
On Monday, 16 January 2017 at 15:32:33 UTC, Dlearner wrote:
Hey, quick question!
I'm messing around with std.random and noticed that you can
change the boundaries parameter to be either open or closed
intervals on either side. By default it is "[)". How do I
change these template
Hey, quick question!
I'm messing around with std.random and noticed that you can
change the boundaries parameter to be either open or closed
intervals on either side. By default it is "[)". How do I
change these template parameters?
On Sunday, 15 January 2017 at 19:48:04 UTC, Nestor wrote:
I see. So correcting my original doubt:
How could I parse an UTF16LE file line by line (producing a
proper string in each iteration) without loading the entire
file into memory?
Could... roll your own? Although if you wanted it to be
On Monday, 16 January 2017 at 09:33:23 UTC, Nestor wrote:
PS. Isn't this approach considered "cheating" in quines? ;)
I'm afraid so - while the empty program has been technically
accepted as being a quine (e.g.
http://www.ioccc.org/1994/smr.hint) programs which use file io to
read their own
On Mon, 2017-01-16 at 11:40 +, King_DuckZ via Digitalmars-d-learn
wrote:
> On Sunday, 3 January 2016 at 17:30:15 UTC, Dibyendu Majumdar
> wrote:
> > Does CMake recognise D in the enable_language command?
> >
> > If not is there a workaround?
> >
> > Thanks and Regards
> > Dibyendu
>
> One
On Mon, 2017-01-16 at 10:47 +, cym13 via Digitalmars-d-learn wrote:
> On Monday, 16 January 2017 at 09:42:03 UTC, Russel Winder wrote:
> > On Sun, 2017-01-15 at 17:44 +, cym13 via
> > Digitalmars-d-learn wrote:
> > > On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder
> > > wrote:
On Monday, 16 January 2017 at 09:42:03 UTC, Russel Winder wrote:
On Sun, 2017-01-15 at 17:44 +, cym13 via
Digitalmars-d-learn wrote:
On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder
wrote:
> Is there any way of setting dub to default to ldc2 rather
> than dmd as the compiler of
I'm interfacing to C++ I using emplacing extern(C++) to malloc'ed memory
like http://wiki.dlang.org/Memory_Management (see Explicit Class
Instance Allocation)
This code segfaulted with extern(C++) TestClass.
I guess it's because extern(C++) class aren't rooted from Object so
instead of
On Mon, 2017-01-16 at 23:16 +1300, rikki cattermole via Digitalmars-d-
learn wrote:
> […]
> Change targetType to "library" and it should work.
> It doesn't auto infer that it should be library since you have
> overriden
> that ability of it.
That isn't going to work because it then tries to
Is it really the case that Dub does not have a way of cleaning up all
the stuff it creates? I tried "dub clean" and it doesn't clean.
--
Russel.
=
Dr Russel Winder t: +44 20 7585 2200 voip:
On 16/01/2017 11:14 PM, Russel Winder via Digitalmars-d-learn wrote:
The Dub manual says that:
name "mylib"
targetType "none"
dependency "mylib:component1" version="*"
subPackage {
name "component1"
targetType "library"
sourcePaths "component1/source"
The Dub manual says that:
name "mylib"
targetType "none"
dependency "mylib:component1" version="*"
subPackage {
name "component1"
targetType "library"
sourcePaths "component1/source"
importPaths "component1/source"
}
is reasonable. However whenever I try
On Sun, 2017-01-15 at 17:44 +, cym13 via Digitalmars-d-learn wrote:
> On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder wrote:
> > Is there any way of setting dub to default to ldc2 rather than
> > dmd as the compiler of use? (I do not want to have to put
> > --compiler ldc2 on every
On Monday, 16 January 2017 at 06:41:50 UTC, Basile B. wrote:
I remember on Rosetta to have seen this:
module quine;
import std.stdio;
void main(string[] args)
{
write(import("quine.d"));
}
compiles with: dmd path/quine.d -Jpath
Very good! By the way, module name and arguments aren't
37 matches
Mail list logo