On Saturday, 7 April 2018 at 05:46:07 UTC, Uknown wrote:
I don't see the error you are talking about:
https://run.dlang.io/is/XWPIc1
Are you using the latest compiler?
Compile with -unittest.
And yes; I'm using DMD 2.079.0.
On 04/06/2018 11:26 PM, Uknown wrote:
> On Saturday, 7 April 2018 at 05:58:10 UTC, Paul Backus wrote:
>> On Saturday, 7 April 2018 at 05:46:07 UTC, Uknown wrote:
>>> I don't see the error you are talking about:
>>> https://run.dlang.io/is/XWPIc1
>>>
>>> Are you using the latest compiler?
>>
>>
On Friday, 6 April 2018 at 21:49:37 UTC, Per Nordlöw wrote:
On Tuesday, 3 April 2018 at 09:14:28 UTC, Eduard Staniloiu
wrote:
So, say `reg` is your allocator, your workflow would be
auto obj = reg.make!Type(args);
/* do stuff */
reg.dispose(obj); // If Type has a __dtor, it will call
On Saturday, 7 April 2018 at 05:58:10 UTC, Paul Backus wrote:
On Saturday, 7 April 2018 at 05:46:07 UTC, Uknown wrote:
I don't see the error you are talking about:
https://run.dlang.io/is/XWPIc1
Are you using the latest compiler?
Compile with -unittest.
And yes; I'm using DMD 2.079.0.
gc causes unpredictabilities in performance*. With games it tends to be
worst case performance that matters.
I would reccomend using std.experimental.allocator (even if you still use
the default GC backed allocator). This will allow you to swap out your
allocator for a more specialised one as
Hi All,
Request your help on the below Deprecation message.
import std.datetime.systime: Clock, days, SysTime;
void main (int AgeSize) {
int AgeSize = 1
auto ct2 = Clock.currTime(), st2 = ct2 + days(-AgeSize);
}
test.d(30): Deprecation: Symbol core.time.days is not visible
from module
What am I doing wrong here that makes the D equivalent 2.5 times
slower than it's C equivalent?
Compilers used:
LDC2: LDC - the LLVM D compiler (1.8.0)
GCC: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
11:36:39 ~/code/c/test2$ ldc2 sigmoid.d -O5 && ./sigmoid
Max deviation is 0.001664
On Saturday, 7 April 2018 at 18:53:57 UTC, Arun Chandrasekaran
wrote:
What am I doing wrong here that makes the D equivalent 2.5
times slower than it's C equivalent?
Compilers used:
LDC2: LDC - the LLVM D compiler (1.8.0)
GCC: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
11:36:39
On Friday, 6 April 2018 at 15:42:04 UTC, Vladimir Panteleev wrote:
On Friday, 6 April 2018 at 15:35:59 UTC, Anonymouse wrote:
The dustmite wiki[0] lists the following example script for
use to monitor the reduction progress:
Here's a more complete version that also works with -j:
On Saturday, 7 April 2018 at 06:26:24 UTC, Uknown wrote:
What I did notice though is that when
`string list2string(T)(List!T list)` was changed to
`string list2string(T)(VariantN!(16LU, Nil, Tuple!(T, "head",
This*, "tail")) list)`
The compiler correctly deduce `T` to be `int`
Interesting.
On Saturday, 7 April 2018 at 14:02:55 UTC, Paul Backus wrote:
Interesting. Looks like this is an issue with aliases, because
I get the error with this code too:
--- test.d
import std.typecons: Tuple, tuple;
alias Pair(T) = Tuple!(T, T);
void foo(T)(Pair!T p)
{
return;
}
unittest {
On Saturday, 7 April 2018 at 07:50:37 UTC, Eduard Staniloiu wrote:
On Friday, 6 April 2018 at 21:49:37 UTC, Per Nordlöw wrote:
On Tuesday, 3 April 2018 at 09:14:28 UTC, Eduard Staniloiu
wrote:
So, say `reg` is your allocator, your workflow would be
auto obj = reg.make!Type(args);
/* do stuff
can you try it with c math functions?
instead of std.math, try to use core.stdc.math
On Sat, Apr 7, 2018 at 8:53 PM, Arun Chandrasekaran via Digitalmars-d-learn
wrote:
> What am I doing wrong here that makes the D equivalent 2.5 times slower
> than it's C
On Saturday, 7 April 2018 at 17:25:07 UTC, Vino wrote:
Hi All,
Request your help on the below Deprecation message.
import std.datetime.systime: Clock, days, SysTime;
void main (int AgeSize) {
int AgeSize = 1
auto ct2 = Clock.currTime(), st2 = ct2 + days(-AgeSize);
}
test.d(30): Deprecation:
or for ldc http://docs.algorithm.dlang.io/latest/mir_math_common.html
On Sat, Apr 7, 2018 at 9:10 PM, Daniel Kozak wrote:
> can you try it with c math functions?
>
> instead of std.math, try to use core.stdc.math
>
> On Sat, Apr 7, 2018 at 8:53 PM, Arun Chandrasekaran via
>
On Saturday, 7 April 2018 at 13:31:01 UTC, Timoses wrote:
In the end I would like to accomplish the following:
Provide access to contained bitfields and members of a struct
in the order they
appear in the struct via an index.
The behavior of Type.tupleof in D seems a bit unfinished - they
On Saturday, 7 April 2018 at 23:48:36 UTC, kinke wrote:
On Saturday, 7 April 2018 at 20:33:13 UTC, Arun Chandrasekaran
wrote:
[...]
As this appears to be benchmarking mostly the
std.math.exp(float) performance - some/many basic algos in
std.math, incl. exp(), are currently using the x87 FPU
(Please read at the very bottom what I'd like to achieve)
Is it possible to return the member of a struct by its .tupleof
index?
I know that it would work on a struct value, but I'd like it to
work on the type's tupleof:
```
struct S { int i;}
S s;
// below leads to: Error: need this for
There is an error on some sites when using HTTP-methods
(std.net.curl.get, std.net.curl.post):
std.encoding.EncodingException@std/encoding.d(2505): Unrecognized
Encoding: utf8
Is there a beautiful way around it?
For the GET-method I use the download() and readText(). But for
the POST-method I
On Saturday, 7 April 2018 at 13:02:39 UTC, Vindex wrote:
There is an error on some sites when using HTTP-methods
(std.net.curl.get, std.net.curl.post):
std.encoding.EncodingException@std/encoding.d(2505):
Unrecognized Encoding: utf8
Is there a beautiful way around it?
For the GET-method I use
On Saturday, 7 April 2018 at 19:14:27 UTC, Daniel Kozak wrote:
or for ldc
http://docs.algorithm.dlang.io/latest/mir_math_common.html
On Sat, Apr 7, 2018 at 9:10 PM, Daniel Kozak
wrote:
can you try it with c math functions?
instead of std.math, try to use core.stdc.math
On Saturday, 7 April 2018 at 20:33:13 UTC, Arun Chandrasekaran
wrote:
On Saturday, 7 April 2018 at 19:14:27 UTC, Daniel Kozak wrote:
or for ldc
http://docs.algorithm.dlang.io/latest/mir_math_common.html
On Sat, Apr 7, 2018 at 9:10 PM, Daniel Kozak
wrote:
can you try it
On Saturday, 7 April 2018 at 15:58:14 UTC, Seb wrote:
On Saturday, 7 April 2018 at 13:02:39 UTC, Vindex wrote:
There is an error on some sites when using HTTP-methods
(std.net.curl.get, std.net.curl.post):
std.encoding.EncodingException@std/encoding.d(2505):
Unrecognized Encoding: utf8
Is
On Saturday, 7 April 2018 at 13:31:01 UTC, Timoses wrote:
Simen was faster :)
In my solution I simply ignore such things as functions... But
there is the cool delegate creation approach in Simen's solution
for this. I can handle arrays instead. :)
And I got rid of tupelof acting on an
On Saturday, 7 April 2018 at 20:33:13 UTC, Arun Chandrasekaran
wrote:
Much better with mir.math.common, still a bit slower than C
(even with larger loops):
As this appears to be benchmarking mostly the std.math.exp(float)
performance - some/many basic algos in std.math, incl. exp(), are
25 matches
Mail list logo