On Tuesday, 26 December 2017 at 07:01:16 UTC, codephantom wrote:
On Tuesday, 26 December 2017 at 04:47:35 UTC, Walter Bright
wrote:
Only if someone considers this as fixed:
int foo(int* p) { return p[1]; }
int bar(int i) { return foo(); }
clang++ -c test.cpp -Wall
good
On Tuesday, 26 December 2017 at 04:47:35 UTC, Walter Bright wrote:
Only if someone considers this as fixed:
int foo(int* p) { return p[1]; }
int bar(int i) { return foo(); }
clang++ -c test.cpp -Wall
good example..and it makes a good point.
however, let that point be not that
On Monday, 25 December 2017 at 19:41:49 UTC, yawniek wrote:
interesting idea:
http://www.red-lang.org/2017/12/leaping-into-future-red-goes-blockchain.html
Yes, interesting approach. Decentralized development has taken
over, as the most-deployed OS on the planet, Android, is
developed by a
On 12/24/2017 9:13 AM, Laeeth Isharc wrote:
New things grow at the fringes. See the work of Clayton Christensen and his
book the Innovator's Dilemma. A head-on assault is ill-advised. People looking
for salvation are easier to talk to than those who don't see anything wrong with
what
On 12/24/2017 8:51 AM, Patrick Schluter wrote:
I ported 1 app from Java to D. It was so unspectacular (or better said it was
spectacularly easy) that you're probably right. Reaching to Java devs is a good
idea. The advantage of Java though, is not the language but the huge, huge, huge
existing
On 12/24/2017 7:00 AM, Dylan Graham wrote:
I also recall someone saying that C++'s memory problem is fixed. D's MMM seems
infantile in comparison.
Only if someone considers this as fixed:
int foo(int* p) { return p[1]; }
int bar(int i) { return foo(); }
clang++ -c test.cpp -Wall
https://issues.dlang.org/show_bug.cgi?id=18115
--- Comment #1 from Basile B. ---
The '&&' RHS shouldn't be evaluated even in this simplified test case:
```
int test()
{
if (test.stringof.length >= 6 &&
test.stringof[$-7..$] == "1234567") {}
return 0;
}
enum a
https://issues.dlang.org/show_bug.cgi?id=18128
Mike Franklin changed:
What|Removed |Added
CC||slavo5...@yahoo.com
--
On 12/25/2017 3:17 PM, Johan Engelen wrote:
On Monday, 25 December 2017 at 20:31:18 UTC, Walter Bright wrote:
Thanks for the great article! Some suggestions:
Thanks for your comments, I've incorporated them (to my liking).
1. The gray-on-white text is not very legible.
Looks great here,
On Monday, 25 December 2017 at 22:48:39 UTC, H. S. Teoh wrote:
The exact type does not and should not need to be known by user
code.
It's a public type reported by some of the documentation but not
other parts. Its capabilities are given vaguely in the docs for
the functions that return it.
On 12/25/2017 09:03 AM, Johan Engelen wrote:
Thanks for your proof-reading.
- (or ASan for short)
That came a little late in the article because ASan already appeared in
the introduction.
-
peak your interest ->
pique your interest
-
Cppcon ->
CppCon
-
an ulong ->
a ulong
(That's
something like this:
struct S {
// variables...
string doGen(int n) { return ""; }
alias gen = memoize!doGen;
}
The error I got is:
Error: need 'this' for 'doGen' of type 'string(int n)'
I can't make doGen static because it access non-static struct
members... can I workaround this?
https://issues.dlang.org/show_bug.cgi?id=18124
--- Comment #3 from Seb ---
> I wasn't aware that a decision to use the type system was bikeshedding.
Okay let me go one step back here: I do see your point of explicitly stating
the return type, s.t. it's one click away
On 12/25/2017 03:17 PM, Johan Engelen wrote:
>> 1. The gray-on-white text is not very legible.
>
> Looks great here, I like it, sorry. (made it completely black now, can't
> see the difference here though)
Yes, browsers report it to be black but it looks very gray :) on Linux
Mint with both
On Monday, 25 December 2017 at 10:42:55 UTC, Sobaya wrote:
```
import std.stdio;
int[] x;
void func(scope int[] a) {
x = a;
}
void main() {
func([0,1,2]);
writeln(x);
}
```
This code was successfully compiled and printed '[0, 1, 2]'.
But according to
On Monday, 25 December 2017 at 20:31:18 UTC, Walter Bright wrote:
Thanks for the great article! Some suggestions:
Thanks for your comments, I've incorporated them (to my liking).
1. The gray-on-white text is not very legible.
Looks great here, I like it, sorry. (made it completely black
On Monday, 25 December 2017 at 15:16:55 UTC, ag0aep6g wrote:
https://dlang.org/phobos/std_typecons.html#Rebindable
Thanks.
On Monday, 25 December 2017 at 20:39:52 UTC, Mengu wrote:
is partially applying templates possible?
Check out std.meta.Apply{Left, Right}.
— David
On Mon, Dec 25, 2017 at 04:26:52PM +, Piotr Klos via Digitalmars-d wrote:
> On Monday, 25 December 2017 at 03:23:33 UTC, Neia Neutuladh wrote:
> > If you have a function with a return type listed as `auto`, please
> > thoroughly describe what interface the return value provides.
> >
>
> I
On Monday, 25 December 2017 at 21:35:18 UTC, visitor wrote:
On Monday, 25 December 2017 at 21:11:08 UTC, aliak wrote:
On Monday, 25 December 2017 at 17:59:54 UTC, visitor wrote:
On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote:
On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote:
On Monday, 25 December 2017 at 21:11:08 UTC, aliak wrote:
On Monday, 25 December 2017 at 17:59:54 UTC, visitor wrote:
On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote:
On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote:
I was kind of hoping for some magical D variadic alias
On Monday, 25 December 2017 at 17:59:54 UTC, visitor wrote:
On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote:
On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote:
I was kind of hoping for some magical D variadic alias
template on Tuple or something that will just deconstruct the
On Monday, 25 December 2017 at 17:59:54 UTC, visitor wrote:
On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote:
On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote:
I was kind of hoping for some magical D variadic alias
template on Tuple or something that will just deconstruct the
On Monday, 25 December 2017 at 20:39:52 UTC, Mengu wrote:
is partially applying templates possible?
template A(X, Y, Z) {}
alias B(X, Y) = A!(X, Y, int);
On 12/25/2017 1:25 AM, Dan Partelly wrote:
1. Exceptions can be done "you do not use it, you do not pay for them". Also,
compiler switches to diable exceptions totally exist in most compilers.
Those switches exist because it is not free.
3. In several extensive C programs I seen, expception
is partially applying templates possible?
On 12/25/2017 9:03 AM, Johan Engelen wrote:
I've been writing this article since August, and finally found some time to
finish it:
http://johanengelen.github.io/ldc/2017/12/25/LDC-and-AddressSanitizer.html
"LDC comes with improved support for Address Sanitizer since the 1.4.0 release.
Hi, Is there any blogs that discuss CRTP, or even Policy
based/introspection based design in idiomatic D?
I would love to see the strategies used to tackle the overhead
involving dynamic dispatch by emulating static polymorphism.
Thanks.
https://issues.dlang.org/show_bug.cgi?id=18128
Issue ID: 18128
Summary: [scope] escaping reference to class allocated on the
stack
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
https://issues.dlang.org/show_bug.cgi?id=18128
Walter Bright changed:
What|Removed |Added
Keywords||safe
--
On Monday, 25 December 2017 at 10:57:46 UTC, realhet wrote:
Hello,
I'm very well satisfied with the DMD 32bit compiler and the
OptLink linker on Windows. I even made an incremental builder
to it, and I can see the running program in 1 second.
Lately I sadly noticed, that the OptLink works
interesting idea:
http://www.red-lang.org/2017/12/leaping-into-future-red-goes-blockchain.html
On Monday, 25 December 2017 at 16:35:26 UTC, realhet wrote:
Now I have my first DMD 64bit windows console app running. (And
I'm already afraid of the upcoming windowed application haha)
My recommendation for getting setup on Windows with D is as
follows:
1) Install the latest visual studio
On Monday, 25 December 2017 at 17:46:05 UTC, aliak wrote:
On Monday, 25 December 2017 at 16:38:32 UTC, Thomas Mader wrote:
On Monday, 25 December 2017 at 16:22:11 UTC, Mengu wrote:
is it a relative path? if so:
pragma(msg,
__FILE_FULL_PATH__.split("/")[0..$-1].join("/"));
On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote:
On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote:
I was kind of hoping for some magical D variadic alias template
on Tuple or something that will just deconstruct the arguments
in to tuple components.
i don't think it's
https://issues.dlang.org/show_bug.cgi?id=15592
Bastiaan Veelo changed:
What|Removed |Added
CC||basti...@veelo.net
--
On Monday, 25 December 2017 at 16:38:32 UTC, Thomas Mader wrote:
On Monday, 25 December 2017 at 16:22:11 UTC, Mengu wrote:
is it a relative path? if so:
pragma(msg,
__FILE_FULL_PATH__.split("/")[0..$-1].join("/"));
https://run.dlang.io/is/gRUAD6
Nice idea but it is an absolute path.
https://issues.dlang.org/show_bug.cgi?id=18124
--- Comment #2 from Neia Neutuladh ---
I wasn't aware that a decision to use the type system was bikeshedding.
Just a tip: emoticons can make an otherwise professional comment seem smarmy or
condescending. If you do not intend
https://issues.dlang.org/show_bug.cgi?id=18127
greenify changed:
What|Removed |Added
CC||greeen...@gmail.com
---
I've been writing this article since August, and finally found
some time to finish it:
http://johanengelen.github.io/ldc/2017/12/25/LDC-and-AddressSanitizer.html
"LDC comes with improved support for Address Sanitizer since the
1.4.0 release. Address Sanitizer (ASan) is a runtime memory
https://issues.dlang.org/show_bug.cgi?id=18124
Seb changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
Now I have my first DMD 64bit windows console app running. (And
I'm already afraid of the upcoming windowed application haha)
After further fiddling I installed the >>>Visual Cpp tools
2015<<< package that contains a linker with x64 stuff in it
(along with several GB of bloatware).
contents
On Monday, 25 December 2017 at 16:22:11 UTC, Mengu wrote:
is it a relative path? if so:
pragma(msg,
__FILE_FULL_PATH__.split("/")[0..$-1].join("/"));
https://run.dlang.io/is/gRUAD6
Nice idea but it is an absolute path. :-/
https://issues.dlang.org/show_bug.cgi?id=18127
Issue ID: 18127
Summary: homepage: Fast code, fast.
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/
OS: All
Status: NEW
Severity:
On Monday, 25 December 2017 at 03:23:33 UTC, Neia Neutuladh wrote:
If you have a function with a return type listed as `auto`,
please thoroughly describe what interface the return value
provides.
I would just like to say that I strongly agree. Lack of
documentation of template parameters
On Monday, 25 December 2017 at 16:13:48 UTC, Thomas Mader wrote:
Hello,
I would like to set the path to a directory at compile time but
it doesn't seem to be possible yet.
I tried it with a -version=CustomPath argument and inside the
version statement in the code I tried to read the value
Hello,
I would like to set the path to a directory at compile time but
it doesn't seem to be possible yet.
I tried it with a -version=CustomPath argument and inside the
version statement in the code I tried to read the value from the
environment. Sadly this doesn't work because getenv can
On Monday, 25 December 2017 at 14:49:11 UTC, Nordlöw wrote:
1. Is there a way to express tail-constness on the parameters
https://dlang.org/phobos/std_typecons.html#Rebindable
On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote:
since Point is a Tuple and does not have a constructor that
takes a list of integers (int[]), you should have a helper
function.
Aukay :(
I was kind of hoping for some magical D variadic alias template
on Tuple or something that
On Monday, 25 December 2017 at 14:12:32 UTC, Marc wrote:
Does to!(string)(char[]) do any memory allocation on conversion
or is this similar to a cast or what else?
As said it calls idup, which calls _trustedDup which seems to
call _dup which does memory allocation ->
In a graph library I'm working on I have the following algorithm
bool hasContext(Node sub,// TODO in
Node sup) nothrow // TODO in
{
Node curr = sub;
while (true)
{
Node ctx = curr.context;
if (!ctx) { break;}
if (ctx is sup)
On Monday, 25 December 2017 at 14:37:01 UTC, Mengu wrote:
On Monday, 25 December 2017 at 14:12:32 UTC, Marc wrote:
Does to!(string)(char[]) do any memory allocation on
conversion or is this similar to a cast or what else?
yes, it is allocating memory. you can test such cases with
@nogc [0].
On Monday, 25 December 2017 at 14:12:32 UTC, Marc wrote:
Does to!(string)(char[]) do any memory allocation on conversion
or is this similar to a cast or what else?
yes, it is allocating memory. you can test such cases with @nogc
[0].
you can get a char[] via .dup of a string and then you
On Monday, 25 December 2017 at 14:37:01 UTC, Mengu wrote:
yes, it is allocating memory. you can test such cases with
@nogc [0].
nogc is really conservative and thus gives a lot of false
positives. I'd just compare instr.ptr is outstr.ptr here and see
if it changes (it will tho)
On Monday, 25 December 2017 at 14:12:32 UTC, Marc wrote:
Does to!(string)(char[]) do any memory allocation on conversion
or is this similar to a cast or what else?
It is translated to idup.
So yes, it allocates memory.
Does to!(string)(char[]) do any memory allocation on conversion
or is this similar to a cast or what else?
On Monday, 25 December 2017 at 12:03:32 UTC, aliak wrote:
Hi, been looking for a way to convert an array to a tuple, but
can't seem to find one. Is there one?
Looking for something like:
alias Point = Tuple!(int, "x", int, "y");
enum data = "1,2:8,9";
auto points = data
.split(':')
On Monday, 25 December 2017 at 09:25:46 UTC, Dan Partelly wrote:
On Sunday, 24 December 2017 at 22:33:38 UTC, Walter Bright
wrote:
Most of Phobos is actually workable with betterC, it's just
that nobody had gone through >>and figured out what is.
Could you "fix" Phobos so it works out of
On Monday, 25 December 2017 at 11:09:25 UTC, Jonathan M Davis
wrote:
```
import std.stdio;
int[] x;
void func(scope int[] a) {
x = a;
}
void main() {
func([0,1,2]);
writeln(x);
}
```
This code was successfully compiled and printed '[0, 1, 2]'.
But according to
On Monday, December 25, 2017 11:18:58 Joakim via Digitalmars-d wrote:
> To clarify Mike's point, the dmd backend was taken from the
> existing dmc C/C++ compiler, which started in the '80s. It
> wasn't written in D because D didn't exist back then! The
> backend could be turned into normal GC'ed
Hi, been looking for a way to convert an array to a tuple, but
can't seem to find one. Is there one?
Looking for something like:
alias Point = Tuple!(int, "x", int, "y");
enum data = "1,2:8,9";
auto points = data
.split(':')
.map!(a => a
.split(',')
.map!(to!int)
)
.map!Point;
https://issues.dlang.org/show_bug.cgi?id=18126
Iain Buclaw changed:
What|Removed |Added
Keywords||C++
https://issues.dlang.org/show_bug.cgi?id=18126
Issue ID: 18126
Summary: [internal] Reduce number of turned off warnings.
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
On Monday, 25 December 2017 at 10:40:09 UTC, Mike Parker wrote:
On Monday, 25 December 2017 at 10:06:31 UTC, Mike Franklin
wrote:
On Sunday, 24 December 2017 at 10:11:37 UTC, Dan Partelly
wrote:
D as betterC really is a game changer, for anyone who cares
to give it a try.
Yes, it really
On Monday, December 25, 2017 10:42:55 Sobaya via Digitalmars-d-learn wrote:
> What means 'scope' in function parameter?
>
> I made a test code.
>
> ```
> import std.stdio;
>
> int[] x;
>
> void func(scope int[] a) {
> x = a;
> }
>
> void main() {
> func([0,1,2]);
> writeln(x);
> }
>
On Sunday, 24 December 2017 at 22:17:23 UTC, Luís Marques wrote:
On Saturday, 2 September 2017 at 20:03:48 UTC, Jean-Louis Leroy
wrote:
jll@ORAC:~/dev/d/tests/modules$ tree
.
├── foo
│ └── bar.d
└── foo.d
I think that shouldn't be allowed. You have a package foo, but
use a normal module
Hello,
I'm very well satisfied with the DMD 32bit compiler and the
OptLink linker on Windows. I even made an incremental builder to
it, and I can see the running program in 1 second.
Lately I sadly noticed, that the OptLink works only for 32bit
target, and I need to go to 64bit if I want to
On Thursday, 21 December 2017 at 04:15:14 UTC, user1234 wrote:
Do you refer to static inheritance using multiple alias this ?
If so, maybe you don't know yet that this feature is not
implemented for now.
Yes. I didn't realize it was still science fiction ;-) Ah, good
think I passed the baton
https://issues.dlang.org/show_bug.cgi?id=18120
Rainer Schuetze changed:
What|Removed |Added
CC||r.sagita...@gmx.de
What means 'scope' in function parameter?
I made a test code.
```
import std.stdio;
int[] x;
void func(scope int[] a) {
x = a;
}
void main() {
func([0,1,2]);
writeln(x);
}
```
This code was successfully compiled and printed '[0, 1, 2]'.
But according to
On Monday, 25 December 2017 at 10:06:31 UTC, Mike Franklin wrote:
On Sunday, 24 December 2017 at 10:11:37 UTC, Dan Partelly wrote:
D as betterC really is a game changer, for anyone who cares
to give it a try.
Yes, it really is.
The fact that -betterC exists is a glaring admission that D
On Monday, 25 December 2017 at 09:25:46 UTC, Dan Partelly wrote:
2. Expceptions can be implemented in such a way that the
run-time cost, when used ,is minimal.
I did some testing a few years ago with g++ and the ARM Cortex-M
platform. I found that, compared with checking return values,
On Mon, 2017-12-25 at 08:12 +, Dan Partelly via Digitalmars-d
wrote:
>
[…]
> It starts with "everything must be a class". An die hard OOP
> language with little support for anything else. And to put it in
> the words of the great Alex Stepanov:
>
>
> Yes. STL is not object oriented. I
On Sun, 2017-12-24 at 22:04 +, Dan Partelly via Digitalmars-d
wrote:
> […]
>
> 1995. A dark year. Two of the crappiest language ever devised by
> man arrived. Both gained traction. Java, through marketing. PhP
> though tribalism.
I thought 1995 was a good year (*). I have no idea about
On Sunday, 24 December 2017 at 10:11:37 UTC, Dan Partelly wrote:
D as betterC really is a game changer, for anyone who cares
to give it a try.
Yes, it really is.
The fact that -betterC exists is a glaring admission that D "got
it wrong".
-betterC was an idea that I heard Walter propose a
On Sunday, 24 December 2017 at 22:33:38 UTC, Walter Bright wrote:
Most of Phobos is actually workable with betterC, it's just
that nobody had gone through >>and figured out what is.
Could you "fix" Phobos so it works out of the box regardless with
no GC runtime ? Or at least properly label
https://issues.dlang.org/show_bug.cgi?id=17985
--- Comment #4 from Andre ---
It's great dmd -run supports now -stdin. Thanks a lot. That is viable
workaround.
I would like to keep this issue open to get the same functionality for rdmd,
because:
- rdmd is the advertised tool
On 2017-12-23 21:59, Walter Bright wrote:
It'd be nice to collect information on what needs to be done and file a
bugzilla issue on it. Otherwise it's just generic "doesn't work on
macOS" which contains no useful information.
If I knew exactly what would need to be done I would most likely
On Monday, 25 December 2017 at 00:05:07 UTC, 12345swordy wrote:
On Sunday, 24 December 2017 at 22:33:38 UTC, Walter Bright
wrote:
On 12/24/2017 2:11 AM, Dan Partelly wrote:
D is not billed as betterC++ (yet), though Andrei is working
on it (essentially building an interface to C++ STL).
On Sunday, 24 December 2017 at 22:21:28 UTC, Tony wrote:
On Sunday, 24 December 2017 at 22:04:00 UTC, Dan Partelly wrote:
1995. A dark year. Two of the crappiest language ever devised
by man arrived. Both gained traction. Java, through marketing.
PhP though tribalism.
What makes Java a
On Sunday, 24 December 2017 at 22:21:28 UTC, Tony wrote:
On Sunday, 24 December 2017 at 22:04:00 UTC, Dan Partelly wrote:
1995. A dark year. Two of the crappiest language ever devised
by man arrived. Both gained traction. Java, through marketing.
PhP though tribalism.
What makes Java a
81 matches
Mail list logo