On Saturday, 22 October 2016 at 01:20:52 UTC, Andrei Alexandrescu
wrote:
Guess we need to get ready!
https://curl.haxx.se/mail/lib-2016-10/0076.html -- Andrei
I think that it much better to force
https://github.com/ikod/dlang-requests developing its much easier
than curl and its native
Guess we need to get ready!
https://curl.haxx.se/mail/lib-2016-10/0076.html -- Andrei
On 10/21/16 5:39 PM, Timon Gehr wrote:
On 21.10.2016 09:56, Ethan Watson wrote:
On Thursday, 20 October 2016 at 19:49:42 UTC, Andrei Alexandrescu wrote:
I think a solid DIP addressing the problem would have a good chance to
get traction.
I think all the information in this thread and the "Bin
On Friday, 21 October 2016 at 19:40:52 UTC, Rainer Schuetze wrote:
The wrapper around main in the executable should work just as
any DLLs' DllMain, i.e. it should register/unregister its own
data segments with the GC and run its shared and TLS module
constructors/decoontructors. Everything el
On Thursday, 20 October 2016 at 09:10:10 UTC, Chris wrote:
I.e. "He agrees with me, therefore I like him!" One year of
meetings to design a website does not necessarily mean the
site's good or that it has to take at least a year until you
have a presentable website.
Sorry, was too busy with s
Dne 21.10.2016 v 23:21 Patric Dexheimer via Digitalmars-d napsal(a):
On Friday, 21 October 2016 at 19:20:25 UTC, Daniel Kozak wrote:
Dne 21.10.2016 v 20:49 Patric Dexheimer via Digitalmars-d napsal(a):
Quite sure that this was already discussed, but.. any chance of this
on D?
No (I hope so)
On 21.10.2016 09:56, Ethan Watson wrote:
On Thursday, 20 October 2016 at 19:49:42 UTC, Andrei Alexandrescu wrote:
I think a solid DIP addressing the problem would have a good chance to
get traction.
I think all the information in this thread and the "Binding rvalues to
const ref in D" thread t
On Friday, 21 October 2016 at 19:20:25 UTC, Daniel Kozak wrote:
Dne 21.10.2016 v 20:49 Patric Dexheimer via Digitalmars-d
napsal(a):
Quite sure that this was already discussed, but.. any chance
of this on D?
No (I hope so)
There are a lot of places where it should make the code clear.
Can
On Friday, 21 October 2016 at 19:53:14 UTC, Johannes Pfau wrote:
GDC git is completely 2.068.2. There are no updated binary
releases as there's still one remaining blocker regression
(32bit only).
sorry for spreading false info then.
Am Thu, 20 Oct 2016 12:21:34 +
schrieb ketmar :
> On Thursday, 20 October 2016 at 05:43:47 UTC, Nick Sabalausky
> wrote:
> >> And GDC is using the 2.068 feature set, plus a lot of bug
> >> fixes from
> >> later versions. I guess you could call it 2.068.5. :-)
> >>
> >
> > Maybe there's a
On 20.10.2016 09:17, Benjamin Thaut wrote:
This is a topic really specific to druntime, I don't know a better place
to put it though.
rt_init increases the _initCount and rt_term decreases it and only
terminates the runtime in case the _initCount reaches zero (see dmain2.d)
[...]
The probl
Dne 21.10.2016 v 20:49 Patric Dexheimer via Digitalmars-d napsal(a):
Quite sure that this was already discussed, but.. any chance of this
on D?
No (I hope so)
There are a lot of places where it should make the code clear.
Can you elaborate on this?
I always have to create shorter aliases for
On 10/20/2016 10:16 PM, Chris M. wrote:
So I know you can do some pattern matching with templates in D, but has
there been any discussion about implementing it as a language feature,
maybe something similar to Rust's match keyword
(https://doc.rust-lang.org/stable/book/patterns.html)? What would
Quite sure that this was already discussed, but.. any chance of
this on D?
(one of the few things that i miss from c++)
There are a lot of places where it should make the code clear.
I always have to create shorter aliases for the most used
structs. (which i think is awkward sometimes)
I know
On Friday, October 21, 2016 12:18:28 Nordlöw via Digitalmars-d wrote:
> It seems AA's doesn't respect disabling of postblit for its
> Key-type even when it's sent as an r-value.
>
> This is a serious bug.
Well, I wouldn't expect it to work to use a non-copyable type as a key, but
that should just
On Friday, 21 October 2016 at 16:46:08 UTC, Andrei Alexandrescu
wrote:
Read the example again, the lambda is not evaluated as a bool.
-- Andrei
My bad.
In that case, what Steven said.
On 10/21/2016 12:39 PM, Vladimir Panteleev wrote:
On Friday, 21 October 2016 at 12:34:58 UTC, Andrei Alexandrescu wrote:
What would be a good solution to forbid certain constructs in the
increment part of a for statement?
For this specific case, a clear solution would be to forbid evaluating
l
On Friday, 21 October 2016 at 12:34:58 UTC, Andrei Alexandrescu
wrote:
What would be a good solution to forbid certain constructs in
the increment part of a for statement?
For this specific case, a clear solution would be to forbid
evaluating lambdas as a boolean expression, because they will
Allow new syntax makes codes simpler in some cases:
writeln({
int a = 5;
return a + 5;
}());
=>
writeln{
int a = 5;
return a + 5;
}();
[1,2,3].fold!((a, b) => a + b).writeln;
=>
[1,2,3].fold!{a, b => a + b}.writeln;
On 10/21/16 10:38 AM, mogu wrote:
On Friday, 21 October 2016 at 14:22:27 UTC, Steven Schveighoffer wrote:
On 10/21/16 10:12 AM, Temtaime wrote:
On Friday, 21 October 2016 at 13:42:49 UTC, Adam D. Ruppe wrote:
On Friday, 21 October 2016 at 13:33:26 UTC, Stefan Koch wrote:
[...]
Eh, that's ex
On 10/21/16 10:28 AM, Kagamin wrote:
On Friday, 21 October 2016 at 14:16:26 UTC, Steven Schveighoffer wrote:
How about in general forbidding lambda statements that aren't called
or used anywhere?
How?
int main()
{
int a;
auto b = ()=>{a++;};
b();
assert(a==1);
return 0;
}
On 10/21/2016 09:42 AM, Adam D. Ruppe wrote:
I think deprecating `{ lambda }` is really the way to go.
Another possibility is to disallow an ExpressionStatement that consists
solely of a lambda. There is precedent for that, e.g. the statement "1 +
1;" is disallowed. -- Andrei
On Thursday, 20 October 2016 at 20:25:40 UTC, Karabuta wrote:
Dependencies upon dependencies. Each package comes along with
its own dependencies. I give up nodejs, you win. Now I am
investing my time in Vibe.d which I hope ...
Maybe it will be enough to declare some "batteries 2.0" package
an
On 10/21/16 10:28 AM, Kagamin wrote:
On Friday, 21 October 2016 at 14:16:26 UTC, Steven Schveighoffer wrote:
How about in general forbidding lambda statements that aren't called
or used anywhere?
How?
int main()
{
int a;
auto b = ()=>{a++;};
b();
assert(a==1);
return 0;
}
On Friday, 21 October 2016 at 14:22:27 UTC, Steven Schveighoffer
wrote:
On 10/21/16 10:12 AM, Temtaime wrote:
On Friday, 21 October 2016 at 13:42:49 UTC, Adam D. Ruppe
wrote:
On Friday, 21 October 2016 at 13:33:26 UTC, Stefan Koch wrote:
[...]
Eh, that's exactly what the language rules say s
http://ideone.com/KBf8k9
On Friday, 21 October 2016 at 14:16:26 UTC, Steven Schveighoffer
wrote:
How about in general forbidding lambda statements that aren't
called or used anywhere?
How?
int main()
{
int a;
auto b = ()=>{a++;};
b();
assert(a==1);
return 0;
}
On 10/21/16 10:12 AM, Temtaime wrote:
On Friday, 21 October 2016 at 13:42:49 UTC, Adam D. Ruppe wrote:
On Friday, 21 October 2016 at 13:33:26 UTC, Stefan Koch wrote:
[...]
Eh, that's exactly what the language rules say should happen, and it
actually does make sense to me... you might even wan
On 10/21/16 8:34 AM, Andrei Alexandrescu wrote:
I got a question about what happens with this code:
int j;
for({j=2; int d = 3; } j+d<7; {j++; d++;}) {
}
My first instinct was that that won't compile but it surprisingly does.
And it loops forever.
So the grammar according to
https://dlang.org/
On Friday, 21 October 2016 at 13:42:49 UTC, Adam D. Ruppe wrote:
On Friday, 21 October 2016 at 13:33:26 UTC, Stefan Koch wrote:
[...]
Eh, that's exactly what the language rules say should happen,
and it actually does make sense to me... you might even want to
use an immediately-called lambda
On Friday, 21 October 2016 at 13:42:49 UTC, Adam D. Ruppe wrote:
On Friday, 21 October 2016 at 13:33:26 UTC, Stefan Koch wrote:
It does create a lambda?
Hmm that should not happen.
I think deprecating `{ lambda }` is really the way to go. It'd
fix this as well at that other FAQ at pretty low
On 10/21/2016 04:47 AM, Walter Bright wrote:
On 10/21/2016 12:56 AM, Ethan Watson wrote:
I'll start doing that. Hopefully I'll get a draft up that I'll pass to
Manu for
comment/input this weekend before posting it properly.
Great!
I, too, will look forward to that. If we get it right, we'll
On Friday, 21 October 2016 at 12:17:30 UTC, default0 wrote:
Unless you find a way to convince Walter and Andrei that its
not gonna result in everyone defining their own sub-language
within D, making D code harder to read for others and/or have
good reasons for things they enable that currently
On Friday, 21 October 2016 at 13:33:26 UTC, Stefan Koch wrote:
It does create a lambda?
Hmm that should not happen.
Eh, that's exactly what the language rules say should happen, and
it actually does make sense to me... you might even want to use
an immediately-called lambda to group several s
On Friday, 21 October 2016 at 13:18:19 UTC, RazvanN wrote:
On Friday, 21 October 2016 at 12:34:58 UTC, Andrei Alexandrescu
wrote:
[...]
I am the one who raised the question. I am n00b when it comes
to D language (I just started reading about it a couple of days
ago) and I tried the above men
On Friday, 21 October 2016 at 12:34:58 UTC, Andrei Alexandrescu
wrote:
I got a question about what happens with this code:
int j;
for({j=2; int d = 3; } j+d<7; {j++; d++;}) {
}
My first instinct was that that won't compile but it
surprisingly does. And it loops forever.
So the grammar accord
On Friday, 21 October 2016 at 12:31:00 UTC, Mark wrote:
I second that.
Also, it may be a good idea to simply use classical algorithms
(binary search, quicksort, etc.), written in "D style", as
examples. The typical visitor is probably familiar with these
algorithms and thus the foreign synta
On Friday, 21 October 2016 at 12:34:58 UTC, Andrei Alexandrescu
wrote:
I got a question about what happens with this code:
int j;
for({j=2; int d = 3; } j+d<7; {j++; d++;}) {
}
[...]
We could restrict the initialze part to assignments only. But I
am unsure of the implications.
How did you fin
I got a question about what happens with this code:
int j;
for({j=2; int d = 3; } j+d<7; {j++; d++;}) {
}
My first instinct was that that won't compile but it surprisingly does.
And it loops forever.
So the grammar according to
https://dlang.org/spec/grammar.html#ForStatement is:
ForStatem
On Friday, 21 October 2016 at 10:24:40 UTC, Chris wrote:
On Thursday, 20 October 2016 at 21:52:09 UTC, Andrei
Alexandrescu wrote:
On 10/20/2016 04:16 PM, Karabuta wrote:
We can't assume all beginners come from imperative languages.
D beginners may come from languages where the idiomatic way
On Friday, 21 October 2016 at 12:18:28 UTC, Nordlöw wrote:
this(this) { assert(false); }
If this is changed to
@disable this(this);
I instead get a segfault because of a double free:
before
freeing:591490
after
freeing:591490
*** Error in ...
Pretty serious bug.
The following code
import std.stdio;
struct S(E)
{
static typeof(this) withElement(E x)
{
typeof(return) that;
that._ptr = cast(E*)malloc(1*E.sizeof);
*(that._ptr) = x;
return that;
}
// @disable this(this);
this(this) { assert(false); }
On Friday, 21 October 2016 at 11:49:42 UTC, Mark wrote:
On Friday, 21 October 2016 at 06:50:26 UTC, Dennis Ritchie
wrote:
Previously, there were ideas on the implementation of macros
in D, but now they are no longer relevant:
http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf
AST macros are p
On Friday, 21 October 2016 at 06:50:26 UTC, Dennis Ritchie wrote:
Previously, there were ideas on the implementation of macros in
D, but now they are no longer relevant:
http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf
AST macros are permanently off the table?
On Thursday, 20 October 2016 at 12:24:14 UTC, ketmar wrote:
On Thursday, 20 October 2016 at 07:40:05 UTC, Jonathan M Davis
wrote:
In general, in D, if you don't need inheritance and
polymorphism, you probably shouldn't be using a class.
and even if you need, most of the time it is better to wr
Am 20.10.2016 um 22:25 schrieb Karabuta:
This is actually a nodejs project's dependencies for a small code-base.
(...)
Dependencies upon dependencies. Each package comes along with its own
dependencies. I give up nodejs, you win. Now I am investing my time in
Vibe.d which I hope ...
I persona
Dne 21.10.2016 v 12:59 Daniel Kozak napsal(a):
Dne 21.10.2016 v 12:53 mogu via Digitalmars-d napsal(a):
On Friday, 21 October 2016 at 10:05:40 UTC, Daniel Kozak wrote:
Or you can build your own version of dmd with PIC enabled and add
-fPIC to /etc/dmd.conf
I rebuilded phobos and druntime w
Dne 21.10.2016 v 12:53 mogu via Digitalmars-d napsal(a):
On Friday, 21 October 2016 at 10:05:40 UTC, Daniel Kozak wrote:
Or you can build your own version of dmd with PIC enabled and add
-fPIC to /etc/dmd.conf
I rebuilded phobos and druntime with -fPIC and replaced the static
libphobos2.a.
On Friday, 21 October 2016 at 10:05:40 UTC, Daniel Kozak wrote:
Or you can build your own version of dmd with PIC enabled and
add -fPIC to /etc/dmd.conf
I rebuilded phobos and druntime with -fPIC and replaced the
static libphobos2.a. Now it works well. But I have to specified
-fPIC to dmd eac
On Thursday, 20 October 2016 at 21:52:09 UTC, Andrei Alexandrescu
wrote:
On 10/20/2016 04:16 PM, Karabuta wrote:
We can't assume all beginners come from imperative languages. D
beginners may come from languages where the idiomatic way of
doing things is by means of pipelines. Generally it's
On Thursday, October 20, 2016 23:18:14 Nicholas Wilson via Digitalmars-d
wrote:
> On Thursday, 20 October 2016 at 01:04:35 UTC, Jonathan M Davis
>
> wrote:
> > The transitivity of const shoot stuff in the foot pretty
> > thoroughly in a number of cases. A prime example would be
> > ranges, because
Dne 21.10.2016 v 10:02 tcak via Digitalmars-d napsal(a):
On Friday, 21 October 2016 at 04:16:38 UTC, mogu wrote:
[...]
Yes, we (I and one another person on this forum) have the same problem.
As a temporary solution, while compiling your program, add
-defaultlib=libphobos2.so -fPIC
This sol
On Friday, 21 October 2016 at 02:40:45 UTC, Stefan Koch wrote:
On Friday, 21 October 2016 at 02:16:44 UTC, Chris M. wrote:
So I know you can do some pattern matching with templates in
D, but has there been any discussion about implementing it as
a language feature, maybe something similar to Ru
On 21 October 2016 at 06:57, Walter Bright via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:
> On 10/20/2016 12:49 PM, Andrei Alexandrescu wrote:
>
>> On 10/20/2016 06:23 AM, Ethan Watson wrote:
>>
>>> Suitable enough for simple functions. But beyond that becomes
>>> maintenance hell.
>>>
>>
On 10/21/2016 12:56 AM, Ethan Watson wrote:
I'll start doing that. Hopefully I'll get a draft up that I'll pass to Manu for
comment/input this weekend before posting it properly.
Great!
On Friday, 21 October 2016 at 04:16:38 UTC, mogu wrote:
[...]
Yes, we (I and one another person on this forum) have the same
problem.
As a temporary solution, while compiling your program, add
-defaultlib=libphobos2.so -fPIC
This solved my problem on Ubuntu 16.10. But with one problem.
No
On Thursday, 20 October 2016 at 19:49:42 UTC, Andrei Alexandrescu
wrote:
I think a solid DIP addressing the problem would have a good
chance to get traction.
I think all the information in this thread and the "Binding
rvalues to const ref in D" thread that Atilla started is enough
for me to w
On Friday, 21 October 2016 at 06:50:26 UTC, Dennis Ritchie wrote:
The problem is that D is not macros, and the implementation of
pattern matching without macros will not be very good. In turn,
the implementation of macros in D - this is also not a good
idea.
Agreed. D has not macro, this ma
On Friday, 21 October 2016 at 02:16:44 UTC, Chris M. wrote:
So I know you can do some pattern matching with templates in D,
but has there been any discussion about implementing it as a
language feature, maybe something similar to Rust's match
keyword (https://doc.rust-lang.org/stable/book/patte
So I know you can do some pattern matching with templates in D,
but has there been any discussion about implementing it as a
language feature, maybe something similar to Rust's match keyword
(https://doc.rust-lang.org/stable/book/patterns.html)? What would
your guys' thoughts be?
On Thu, 20 Oct 2016 20:25:40 +, Karabuta wrote:
> Dependencies upon dependencies. Each package comes along with its own
> dependencies. I give up nodejs, you win. Now I am investing my time in
> Vibe.d which I hope ...
Nothing prevents you from doing the same types of things with D. However,
On Friday, 21 October 2016 at 02:16:44 UTC, Chris M. wrote:
So I know you can do some pattern matching with templates in D,
but has there been any discussion about implementing it as a
language feature, maybe something similar to Rust's match
keyword (https://doc.rust-lang.org/stable/book/patte
On Friday, 21 October 2016 at 02:40:45 UTC, Stefan Koch wrote:
On Friday, 21 October 2016 at 02:16:44 UTC, Chris M. wrote:
So I know you can do some pattern matching with templates in
D, but has there been any discussion about implementing it as
a language feature, maybe something similar to Ru
On 10/21/2016 01:18 AM, Nicholas Wilson wrote:
Is it legal to `.save` a const range, and then use it (provided it does
not mutate any object reachable from bar)?
Sure, if it doesn't involve a cast, i.e. if save is const.
$ dmd hello.d
/usr/bin/ld: hello.o: relocation R_X86_64_32 against symbol
`__dmd_personality_v0' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld:
/usr/lib/x86_64-linux-gnu/libphobos2.a(exception_224_3b4.o):
relocation R_X86_64_32 against symbol `__dmd_personality_
On Friday, 21 October 2016 at 02:40:45 UTC, Stefan Koch wrote:
How is this diffrent from "switch-case" ?
A more laconic and convenient form of the recording conditions:
* No need to constantly write "case", "break", "case", "break",
...
* You can use the "|", it facilitates the matching also i
66 matches
Mail list logo