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
On Saturday, 7 April 2018 at 14:05:15 UTC, Seb wrote:
Hmm how hard would it be to use the MinGW libraries like DMD is
doing as a fallback since 2.079?
The MinGW ones for the Windows API may do, but the VS 2010
libraries are not an option for LDC, we require at least 2015
(which introduced
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 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
On Friday, 6 April 2018 at 14:03:18 UTC, Abdulhaq wrote:
On Friday, 6 April 2018 at 13:10:07 UTC, jason wrote:
what is this?
It's a perl program that converts D code into APL
Here is a more readable version:
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\]
\000-\031]+(?:(?:(?:\r\n)?[ \t]
On Saturday, 7 April 2018 at 20:06:19 UTC, Jordan Wilson wrote:
Although https://dlang.org/spec/contracts.html will surely be
updated with this new syntax, I think a blog post would also
help in this regard, I think.
Jordan
That's a good idea. I'll start on one.
Am 07.04.2018 um 23:57 schrieb Sönke Ludwig:
Am 07.04.2018 um 21:49 schrieb 0xEAB:
Hello :)
Tried to add a new package, but after clicking on [Register package] I
only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
Bug report:
https://issues.dlang.org/show_bug.cgi?id=18744
Stefan changed:
What|Removed |Added
CC||kde...@vogtner.de
--
On Wednesday, 4 April 2018 at 20:57:13 UTC, Stefan wrote:
On Monday, 5 March 2018 at 19:40:12 UTC, Stephan wrote:
Hello fellow Dlers,
thanks to last years DConf some German D developers agreed to
meet for drinks in Hamburg.
congratz!
how was it?
hope a next meetup is already planned.
It
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
writeln(stt);
As I just pointed out in Ali's bug report [1], this is correct, as
true ? stt = "AA" : stt = "BB"
means
(true ? (stt = "AA") : stt) = "BB",
in
On Saturday, 7 April 2018 at 21:22:07 UTC, kdevel wrote:
Can the ternary conditional even be used to assign objects of
the wrong type?
[…]
Congratulations, I'm pretty sure you found an actual bug, even
though it doesn't have anything to do with the conditional
operator per se:
https://issues.dlang.org/show_bug.cgi?id=18744
Issue ID: 18744
Summary: Class l-values can be implicitly converted to `Object`
l-values, even in safe code
Product: D
Version: D2
Hardware: All
OS: All
Am 07.04.2018 um 21:49 schrieb 0xEAB:
Hello :)
Tried to add a new package, but after clicking on [Register package] I
only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
Bug report: https://github.com/dlang/dub/issues/1441
PR:
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
https://issues.dlang.org/show_bug.cgi?id=18743
--- Comment #2 from David Nadlinger ---
(Note that this _is_ part of the specification in form of the grammar.
Assignment is defined as
AssignExpression:
ConditionalExpression
ConditionalExpression = AssignExpression
https://issues.dlang.org/show_bug.cgi?id=18743
David Nadlinger changed:
What|Removed |Added
CC||c...@klickverbot.at
On Saturday, 7 April 2018 at 19:44:35 UTC, Ali wrote:
so it seems
that since
b = (true ? stt="AA": stt )="BB";
and
b = true ? stt="AA": stt ="BB";
are equivalent
that
that the ternary operator return stt (after assigning it "AA")
then assign "BB" to it
Can the ternary conditional
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 16:52:00 UTC, Patrick Schluter wrote:
[...]
The odd man out is C++ [1], assignment has higher precedence
because of right to left evaluation.
Your reference [1] is not even a witness to your claim. The
precedence table says that the "Ternary conditional" has the
https://issues.dlang.org/show_bug.cgi?id=18743
Ketmar Dark changed:
What|Removed |Added
CC|
On Saturday, 7 April 2018 at 20:34:57 UTC, user1234 wrote:
On Saturday, 7 April 2018 at 20:14:49 UTC, bauss wrote:
jesus that became a long title.
Anyway as the title says, is it a bug that a parent class that
access its own private members from derived classes gets
deprecation warning?
If
On Saturday, 7 April 2018 at 20:44:12 UTC, 0xEAB wrote:
On Saturday, 7 April 2018 at 20:17:41 UTC, bauss wrote:
On Saturday, 7 April 2018 at 19:49:31 UTC, 0xEAB wrote:
Hello :)
Tried to add a new package, but after clicking on [Register
package] I only get the following error:
502 Bad
On Saturday, 7 April 2018 at 20:46:39 UTC, bauss wrote:
The problem is that "Foo" cannot access "_baz" without
deperecation warning, but "_baz" is a part of "Foo".
I'm not trying to access "_baz" directly from "Bar" except for
that I call the templated function that access "_baz", but that
On Saturday, 7 April 2018 at 20:17:41 UTC, bauss wrote:
On Saturday, 7 April 2018 at 19:49:31 UTC, 0xEAB wrote:
Hello :)
Tried to add a new package, but after clicking on [Register
package] I only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
I don't think that
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:14:49 UTC, bauss wrote:
jesus that became a long title.
Anyway as the title says, is it a bug that a parent class that
access its own private members from derived classes gets
deprecation warning?
If the import is selective no. (`import foo : Foo;`)
If the
On Saturday, 7 April 2018 at 19:49:31 UTC, 0xEAB wrote:
Hello :)
Tried to add a new package, but after clicking on [Register
package] I only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
I don't think that was the case.
code.dlang.org has been having a lot of
On Saturday, 7 April 2018 at 20:14:49 UTC, bauss wrote:
foreach (child; values)
{
child._isChild = true;
}
I forgot: _isChild should be _baz in the narrowed down version.
jesus that became a long title.
Anyway as the title says, is it a bug that a parent class that
access its own private members from derived classes gets
deprecation warning?
Scenario narrowed down:
// module foo;
class Foo
{
private:
bool _baz;
public:
final void foos(T :
was playing around with d, i write a pure implementation of
bitcoin genesis block creation in dlang
https://github.com/cvsae/genesisd
Hello :)
Tried to add a new package, but after clicking on [Register
package] I only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
On Saturday, 7 April 2018 at 18:52:56 UTC, Ali Çehreli wrote:
On 04/07/2018 10:53 AM, Ali wrote:
> On Saturday, 7 April 2018 at 15:26:56 UTC, Ali Çehreli wrote:
>> On 04/07/2018 02:07 AM, sdvcn wrote:
>>> string stt = "none";
>>> true?writeln("AA"):writeln("BB"); ///Out:AA
>>>
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 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
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
>
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
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 04/07/2018 10:53 AM, Ali wrote:
> On Saturday, 7 April 2018 at 15:26:56 UTC, Ali Çehreli wrote:
>> On 04/07/2018 02:07 AM, sdvcn wrote:
>>> string stt = "none";
>>> true?writeln("AA"):writeln("BB"); ///Out:AA
>>> true?stt="AA":stt="BB";-///Out:BB
>>>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
First beta for the 2.079.1 patch release.
Comes with a handful of fixes.
http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.079.1.html
Please report any bugs at https://issues.dlang.org
- -Martin
-BEGIN PGP SIGNATURE-
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:
On Saturday, 7 April 2018 at 15:26:56 UTC, Ali Çehreli wrote:
On 04/07/2018 02:07 AM, sdvcn wrote:
string stt = "none";
true?writeln("AA"):writeln("BB"); ///Out:AA
true?stt="AA":stt="BB"; -///Out:BB
writeln(stt);
It is a bug because the behavior does not
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
On Saturday, 7 April 2018 at 14:28:05 UTC, kdevel wrote:
On Saturday, 7 April 2018 at 09:56:43 UTC, Jonathan M Davis
wrote:
true?stt="AA":stt="BB";-///Out:BB
[...]
Assignment takes precendence over the ternary operator.
That's not true. Not in D and not in C/C++
The
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 04/07/2018 02:07 AM, sdvcn wrote:
string stt = "none";
true?writeln("AA"):writeln("BB"); ///Out:AA
true?stt="AA":stt="BB"; -///Out:BB
writeln(stt);
It is a bug because the behavior does not match the spec:
https://issues.dlang.org/show_bug.cgi?id=18743
Issue ID: 18743
Summary: Conditional expression (ternary operator) can evaluate
the third expression even "If it is true"
Product: D
Version: D2
Hardware: x86_64
https://issues.dlang.org/show_bug.cgi?id=18742
Issue ID: 18742
Summary: std.regex: Using CodePointSet in AAs breaks if
reference count changes
Product: D
Version: D2
Hardware: All
OS: All
Status:
On Saturday, 7 April 2018 at 14:43:53 UTC, Jonathan M Davis wrote:
On Saturday, April 07, 2018 14:29:15 kdevel via Digitalmars-d
wrote:
On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
> On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
>> true?stt="AA":stt="BB";
https://issues.dlang.org/show_bug.cgi?id=18026
--- Comment #5 from JR ---
(In reply to Seb from comment #4)
> JR: Cool! I can reproduce it on my machine too :)
[...]
> I will look at reducing this even further tomorrow.
Awesome, thanks!
--
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
On Saturday, April 07, 2018 14:28:05 kdevel via Digitalmars-d wrote:
> On Saturday, 7 April 2018 at 09:56:43 UTC, Jonathan M Davis wrote:
> >> true?stt="AA":stt="BB";-///Out:BB
>
> [...]
>
> > Assignment takes precendence over the ternary operator.
>
> That's not true. Not in
On Saturday, April 07, 2018 14:29:15 kdevel via Digitalmars-d wrote:
> On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
> > On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
> >> true?stt="AA":stt="BB";-///Out:BB
> >
> > It's an UB.
> >
> > Not a bug.
>
> Why UB?
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 Friday, 6 April 2018 at 14:03:18 UTC, Abdulhaq wrote:
On Friday, 6 April 2018 at 13:10:07 UTC, jason wrote:
what is this?
It's a perl program that converts D code into APL
+1
On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
It's an UB.
Not a bug.
Why UB? stt is only modified once.
On Saturday, 7 April 2018 at 09:56:43 UTC, Jonathan M Davis wrote:
true?stt="AA":stt="BB";-///Out:BB
[...]
Assignment takes precendence over the ternary operator.
That's not true. Not in D and not in C/C++
https://wiki.dlang.org/Operator_precedence
https://issues.dlang.org/show_bug.cgi?id=18026
--- Comment #4 from Seb ---
JR: Cool! I can reproduce it on my machine too :)
For reference, here's what's necessary for reproducing this without dub:
/home/seb/dlang/dmd/generated/linux/release/64/dmd -c -offoo.o -w
On Saturday, 7 April 2018 at 12:24:54 UTC, kinke wrote:
Any MS libs that can be bundled "legally"?
That's the problem. If there were, they'd be bundled with the
LDC Windows packages, so that LDC on Windows wouldn't require a
Visual C++ installation anymore and just work out of the box.
To
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.
https://issues.dlang.org/show_bug.cgi?id=18026
--- Comment #3 from JR ---
I reduced it to 58 lines using dustmite, which is incidentally amazing.
Under 2.079.0, it compiles in -debug mode but doesn't outside of it. 2.078.3
can however compile it in both. The code is nonsense,
If you've been considering helping out the D Language Foundation
with a donation, right now is a beneficial time to do it. With
DConf just around the corner, every dime counts!
Blog
https://dlang.org/blog/2018/04/07/communal-benevolence-required/
Reddit
(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 Friday, 6 April 2018 at 19:12:32 UTC, Wulfklaue wrote:
Nice job WebFreak001 on the new changes. For the first time in
years the code-d plugin works out of the box on Windows without
any issues.
A small tip: associate the .d file extension in the Visual
Studio Code marketplace with Code-d.
On Friday, 6 April 2018 at 04:08:41 UTC, Seb wrote:
On Thursday, 5 April 2018 at 11:46:42 UTC, Jacob Carlborg
wrote:
I've created a Dockerfile [1] containing LDC, configured for
cross-compiling targeting Windows x64.
Thanks for doing this.
BTW I just tested this and it works really nicely (I
On Saturday, 7 April 2018 at 11:19:44 UTC, meppl wrote:
On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
It's an UB.
Not a bug.
I want `condition ? expr1 : expr2` to
On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
It's an UB.
Not a bug.
I want `condition ? expr1 : expr2` to behave like:
-
auto qc( alias condition, string expr1,
Am 07.04.2018 um 04:23 schrieb Andrei Alexandrescu:
Why is there a space before "(" in our /library/ docs?
https://dlang.org/library/std/stdio/file.tmpfile.html
The paren here has role similar to that in mathematics, not literary.
Thanks,
Andrei
Has been a regression during the diet-ng
https://issues.dlang.org/show_bug.cgi?id=18471
petrug changed:
What|Removed |Added
CC||petru.guri...@gmail.com
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
It's an UB.
Not a bug.
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
On Saturday, April 07, 2018 09:07:48 sdvcn via Digitalmars-d wrote:
> string stt = "none";
> true?writeln("AA"):writeln("BB"); ///Out:AA
> true?stt="AA":stt="BB";-///Out:BB
> writeln(stt);
Assignment takes precendence over the ternary operator. So, no, I don't
think
string stt = "none";
true?writeln("AA"):writeln("BB"); ///Out:AA
true?stt="AA":stt="BB";-///Out:BB
writeln(stt);
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 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 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.
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.
78 matches
Mail list logo