On 03/07/2018 10:57 AM, Matt Gamble wrote:
This is a record for me with two 32bit vs 64bit issues in one day. Seems
to be a problem with using "each" under 32bit which can be fixed by
using foreach or switching to x64. Am I doing something wrong or is this
the second bug I've found today?
On Wednesday, 7 March 2018 at 15:03:28 UTC, Marc wrote:
I do need to start (up to 4 a time) processes in parallel but
I'd like to get notified (similar to C#'s Process.Exited Event)
when the process exits. How can I do that in D?
You can use pipeShell and a control loop to check when the
Steven Schveighoffer wrote:
it seems that the only difference between `void` and `double` lambda is one
asm instruction: `fldl (%edi)`. it is presend in `double` labmda, and
absent in `void` lambda.
it looks like ignoring `double` result causes FPU stack imbalance ('cause
compiler doesn't
On 03/07/2018 09:09 PM, ag0aep6g wrote:
double f() { return 1; }
void main()
{
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
double b = 2;
assert(b == 2); /* fails; should pass
ag0aep6g wrote:
On 03/07/2018 09:09 PM, ag0aep6g wrote:
double f() { return 1; }
void main()
{
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
double b = 2;
assert(b == 2); /*
On 3/7/18 1:57 PM, Matt Gamble wrote:
This is a record for me with two 32bit vs 64bit issues in one day. Seems
to be a problem with using "each" under 32bit which can be fixed by
using foreach or switching to x64. Am I doing something wrong or is this
the second bug I've found today?
Below
On 03/07/2018 08:54 PM, Steven Schveighoffer wrote:
Looking at each, it looks like it does this:
cast(void) unaryFun!pred(r.front);
So I tried this:
auto pred = i => a[i] = a[i-1] + 2;
foreach(i; 1 .. a.length)
cast(void)pred(i);
And I see the -nan value. Remove the cast(void) and I
This is a record for me with two 32bit vs 64bit issues in one
day. Seems to be a problem with using "each" under 32bit which
can be fixed by using foreach or switching to x64. Am I doing
something wrong or is this the second bug I've found today?
Below is a silly case, that replicates an
On 3/7/18 3:09 PM, ag0aep6g wrote:
On 03/07/2018 08:54 PM, Steven Schveighoffer wrote:
Clearly there is some codegen issue here.
It's beautiful:
double f() { return 1; }
void main()
{
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void)
On Wed, Mar 07, 2018 at 10:21:42PM +0200, ketmar via Digitalmars-d-learn wrote:
[...]
> it looks like ignoring `double` result causes FPU stack imbalance
> ('cause compiler doesn't insert "FPU pop" instruction), and that
> affects the computations.
>
> on 64 bit it doesn't matter, 'cause no FPU
H. S. Teoh wrote:
On Wed, Mar 07, 2018 at 10:21:42PM +0200, ketmar via Digitalmars-d-learn
wrote:
[...]
it looks like ignoring `double` result causes FPU stack imbalance
('cause compiler doesn't insert "FPU pop" instruction), and that
affects the computations.
on 64 bit it doesn't matter,
H. S. Teoh wrote:
On Wed, Mar 07, 2018 at 10:21:42PM +0200, ketmar via Digitalmars-d-learn
wrote:
[...]
it looks like ignoring `double` result causes FPU stack imbalance
('cause compiler doesn't insert "FPU pop" instruction), and that
affects the computations.
on 64 bit it doesn't matter,
Are there any tutorials about D in vscode?
Which are the minimal plugins to install to have code completion,
syntax highlighting and code formatting?
Are there any app templates that i can invoke to not start every
project from scratch?
How can I debug my app?
On Wednesday, 7 March 2018 at 21:39:58 UTC, ketmar wrote:
Matt Gamble wrote:
On Wednesday, 7 March 2018 at 21:02:30 UTC, ag0aep6g wrote:
On 03/07/2018 09:09 PM, ag0aep6g wrote:
[...]
With `real` instead of `double` x86_64 is also affected.
Wow. Good to know I'm not crazy. I was afk for a
Matt Gamble wrote:
Ok, this has been submitted as a bug.
https://issues.dlang.org/show_bug.cgi?id=18573
thank you.
On Wednesday, 7 March 2018 at 21:02:30 UTC, ag0aep6g wrote:
On 03/07/2018 09:09 PM, ag0aep6g wrote:
double f() { return 1; }
void main()
{
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
Matt Gamble wrote:
On Wednesday, 7 March 2018 at 21:02:30 UTC, ag0aep6g wrote:
On 03/07/2018 09:09 PM, ag0aep6g wrote:
double f() { return 1; }
void main()
{
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
cast(void) f();
On Thursday, 8 March 2018 at 04:48:08 UTC, Nick Sabalausky
(Abscissa) wrote:
-
import vibe.core.net;
TCPConnection mySocket;
void main() {
auto b = mySocket is null;
}
-
That's giving me:
-
Error: incompatible types for
On Wednesday, 7 March 2018 at 21:39:09 UTC, Apocalypto wrote:
Are there any tutorials about D in vscode?
No that I know of.
Which are the minimal plugins to install to have code
completion, syntax highlighting and code formatting?
I've been getting by with
Nick Sabalausky (Abscissa) wrote:
(Or does return the address of the *reference* to the object
rather than the address of the object?...You can see just how often I do
OO in D ;) )
exactly. if you want to convert object to a pointer safely, do this:
MyObject o;
void* p =
I'm having trouble finding the documentation for what exactly the unary
"not" operator does when applied to a class/interface object. Does this
documentation exist somewhere?
I know at least part of it involves "is null", but I seem to remember
hearing there was more to it than just that.
On 03/08/2018 12:05 AM, ketmar wrote:
Nick Sabalausky (Abscissa) wrote:
I'm having trouble finding the documentation for what exactly the
unary "not" operator does when applied to a class/interface object.
Does this documentation exist somewhere?
I know at least part of it involves "is
-
import vibe.core.net;
TCPConnection mySocket;
void main() {
auto b = mySocket is null;
}
-
That's giving me:
-
Error: incompatible types for (mySocket) is (null): TCPConnection and
typeof(null)
-
WTF?!?!
Nick Sabalausky (Abscissa) wrote:
I'm having trouble finding the documentation for what exactly the unary
"not" operator does when applied to a class/interface object. Does this
documentation exist somewhere?
I know at least part of it involves "is null", but I seem to remember
hearing
On Wednesday, 7 March 2018 at 16:40:04 UTC, Steven Schveighoffer
wrote:
On 3/7/18 11:19 AM, Matt Gamble wrote:
On Wednesday, 7 March 2018 at 16:12:28 UTC, Matt Gamble wrote:
On Wednesday, 7 March 2018 at 16:10:15 UTC, Marc wrote:
On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
[...]
On Wed, Mar 07, 2018 at 10:47:40AM +, J-S Caux via Digitalmars-d-learn
wrote:
> On Wednesday, 7 March 2018 at 10:28:23 UTC, Simen Kjærås wrote:
> > On Wednesday, 7 March 2018 at 10:10:49 UTC, J-S Caux wrote:
> > > On Wednesday, 7 March 2018 at 08:04:36 UTC, Simen Kjærås wrote:
> > > > auto
On Wednesday, 7 March 2018 at 08:04:36 UTC, Simen Kjærås wrote:
On Wednesday, 7 March 2018 at 07:42:37 UTC, J-S Caux wrote:
Simple question: how do I get the log of a complex number?
If I try the simple
logtest = log(complex(1.0, 2.0))
I get the compiler error
Error: function
On Wednesday, 7 March 2018 at 10:10:49 UTC, J-S Caux wrote:
On Wednesday, 7 March 2018 at 08:04:36 UTC, Simen Kjærås wrote:
auto log(T)(Complex!T x) {
import std.math : log;
return Complex!T(log(abs(x)), arg(x));
}
Yes indeed I can do this, but isn't this inefficient as
compared to
On Wednesday, 7 March 2018 at 10:28:23 UTC, Simen Kjærås wrote:
On Wednesday, 7 March 2018 at 10:10:49 UTC, J-S Caux wrote:
On Wednesday, 7 March 2018 at 08:04:36 UTC, Simen Kjærås wrote:
auto log(T)(Complex!T x) {
import std.math : log;
return Complex!T(log(abs(x)), arg(x));
}
Yes
Hi,
I'm trying to decide whether it is better to use DLang for Gtk
development or Vala/Genie.
When I make a simple Vala/Genie Gtk executable the file is tiny
whereas the DLang file is huge. First I used the default Dub
build and the file was in excess of 60mb (assuming this includes
debug
On Wednesday, 7 March 2018 at 07:42:37 UTC, J-S Caux wrote:
Simple question: how do I get the log of a complex number?
If I try the simple
logtest = log(complex(1.0, 2.0))
I get the compiler error
Error: function core.stdc.math.log(double x) is not callable
using argument types
On Tuesday, 6 March 2018 at 10:37:30 UTC, Pierre wrote:
Hi all,
I would like to use bt function (core.bitop) on generic array
but it seems that's not possible. I would like to know if there
is some reasons to have a fixed type (size_t) instead of
something like :
pure @system int bt(T)(in
I do need to start (up to 4 a time) processes in parallel but I'd
like to get notified (similar to C#'s Process.Exited Event) when
the process exits. How can I do that in D?
I don't understand why I'm getting an 'inf' by raising E to a
real number, e^^710.0L. See below.
import std.stdio;
import std.math;
unittest
{
writefln("ln(largest double) = %s", log(double.max)); // 709.783
writefln("e^710 = %s", exp(710.0));// inf, makes sense
On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
I don't understand why I'm getting an 'inf' by raising E to a
real number, e^^710.0L. See below.
import std.stdio;
import std.math;
unittest
{
writefln("ln(largest double)
On Wednesday, 7 March 2018 at 16:06:26 UTC, Matt Gamble wrote:
On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
[...]
works for me as expected.
ln(largest double) = 709.783
e^710 = inf
ln(largest real) = 11356.5
e^710 =
On Wednesday, 7 March 2018 at 16:10:15 UTC, Marc wrote:
On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
[...]
works for me as expected.
ln(largest double) = 709.783
e^710 = inf
ln(largest real) = 11356.5
e^710 =
On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
I don't understand why I'm getting an 'inf' by raising E to a
real number, e^^710.0L. See below.
import std.stdio;
import std.math;
unittest
{
writefln("ln(largest double)
On Wednesday, 7 March 2018 at 16:12:28 UTC, Matt Gamble wrote:
On Wednesday, 7 March 2018 at 16:10:15 UTC, Marc wrote:
On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
[...]
works for me as expected.
ln(largest double) =
On Wednesday, 7 March 2018 at 16:12:28 UTC, Matt Gamble wrote:
On Wednesday, 7 March 2018 at 16:10:15 UTC, Marc wrote:
On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
[...]
works for me as expected.
ln(largest double) =
On 3/7/18 11:19 AM, Matt Gamble wrote:
On Wednesday, 7 March 2018 at 16:12:28 UTC, Matt Gamble wrote:
On Wednesday, 7 March 2018 at 16:10:15 UTC, Marc wrote:
On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
[...]
works
On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
I don't understand why I'm getting an 'inf' by raising E to a
real number, e^^710.0L. See below.
import std.stdio;
import std.math;
unittest
{
writefln("ln(largest double) = %s", log(double.max)); //
709.783
42 matches
Mail list logo