I got the compilation error in the subject line when trying to
create a range via std.range.generate. Turns out this was caused
by trying to create a closure for 'generate' where the closure
was accessing a struct containing a destructor.
The fix was easy enough: write out the loop by hand
On Wednesday, 3 October 2018 at 20:58:01 UTC, Stanislav Blinov
wrote:
On Wednesday, 3 October 2018 at 20:41:15 UTC, welkam wrote:
I was playing around with dmd`s make file trying to see if I
can compile dmd with different compilers and different
compilation flags. By playing around I found
On Thursday, 4 October 2018 at 13:48:24 UTC, welkam wrote:
Oh so its like thread local globals sort of. My reasoning was
that stack is a form of storage and is thread local so...
Thread local storage IS "global" per thread though, instead of
per process which "global" is in other languages.
On Wednesday, 3 October 2018 at 21:50:49 UTC, Stanislav Blinov
wrote:
Thread-local storage is memory allocated for each thread.
Only static non-immutable variables go there. Regular variables
on the stack aren't explicitly placed in any TLS, they're,
well, on the stack as it is.
Oh so its
On Thursday, 4 October 2018 at 13:09:17 UTC, bauss wrote:
On Thursday, 4 October 2018 at 13:07:30 UTC, bauss wrote:
buffer = buffer[0 .. $]; // Slice the buffer to the actual
size of the received data.
```
Typo...
Was supposed to be "received" and not "$"...
buffer = buffer[0 ..
On Thursday, 4 October 2018 at 09:54:40 UTC, Chris Katko wrote:
On Thursday, 4 October 2018 at 08:52:28 UTC, Andrea Fontana
wrote:
On Thursday, 4 October 2018 at 08:32:13 UTC, Chris Katko wrote:
I've been Google'ing and there's like... nothing out there.
One of the top results for "std.socket
On Thursday, 4 October 2018 at 13:07:30 UTC, bauss wrote:
buffer = buffer[0 .. $]; // Slice the buffer to the actual size
of the received data.
```
Typo...
Was supposed to be "received" and not "$"...
buffer = buffer[0 .. received]; // Slice the buffer to the
actual size
On Thursday, 4 October 2018 at 08:32:13 UTC, Chris Katko wrote:
I've been Google'ing and there's like... nothing out there.
My book has a few examples
https://www.packtpub.com/application-development/d-cookbook
of course, buying it for just std.socket (which is just like one
page out of the
On Thursday, October 4, 2018 5:44:55 AM MDT drug via Digitalmars-d-learn
wrote:
> I was incorrect with description of the problem. The problem is that
> there is no simple way to distinct types and symbols if symbols are
> private. Because private symbol is not accessible you can not get any
>
04.10.2018 14:44, drug пишет:
I was incorrect with description of the problem. The problem is that
there is no simple way to distinct types and symbols if symbols are
private. Because private symbol is not accessible you can not get any
info on it, including is it type or symbol or value. And
I was incorrect with description of the problem. The problem is that
there is no simple way to distinct types and symbols if symbols are
private. Because private symbol is not accessible you can not get any
info on it, including is it type or symbol or value. And you can not get
protection for
On Thursday, 4 October 2018 at 08:52:28 UTC, Andrea Fontana wrote:
On Thursday, 4 October 2018 at 08:32:13 UTC, Chris Katko wrote:
I've been Google'ing and there's like... nothing out there.
One of the top results for "std.socket dlang examples"... is
for TANGO. That's how old it is.
Socket
On Thursday, 4 October 2018 at 09:21:39 UTC, Simen Kjærås wrote:
This is apparently a known issue:
https://issues.dlang.org/show_bug.cgi?id=18979
which is basically just a special case of this issue:
https://issues.dlang.org/show_bug.cgi?id=2775
--
Simen
I see. Looks like the chances of
On Thursday, 4 October 2018 at 08:52:50 UTC, Ritchie wrote:
I apologize for not making it clear. I was talking about the
private constructor only. The @disable this() is there to
prevent struct literal syntax and the other disables really
have no reason to be there for the purpose of this
On Thursday, 4 October 2018 at 08:32:13 UTC, Chris Katko wrote:
I've been Google'ing and there's like... nothing out there.
One of the top results for "std.socket dlang examples"... is
for TANGO. That's how old it is.
Socket paradigm is quite standard across languages.
Anyway you can find a
On Thursday, 4 October 2018 at 08:14:44 UTC, Simen Kjærås wrote:
On Thursday, 4 October 2018 at 07:31:21 UTC, Ritchie wrote:
Any reason why this works?
https://run.dlang.io/is/TALlyw
Yup.
Alright, so there's a few features in use here - which one are
you asking about?
1. Private
I've been Google'ing and there's like... nothing out there.
One of the top results for "std.socket dlang examples"... is for
TANGO. That's how old it is.
On Thursday, 4 October 2018 at 07:31:21 UTC, Ritchie wrote:
Any reason why this works?
https://run.dlang.io/is/TALlyw
Yup.
Alright, so there's a few features in use here - which one are
you asking about?
1. Private constructor.
You can call the private constructor because the unit of
On Thursday, 4 October 2018 at 07:55:48 UTC, Andrea Fontana wrote:
On Thursday, 4 October 2018 at 07:31:21 UTC, Ritchie wrote:
Any reason why this works?
https://run.dlang.io/is/TALlyw
Why not?
The constructor is private.
On Thursday, 4 October 2018 at 07:31:21 UTC, Ritchie wrote:
Any reason why this works?
https://run.dlang.io/is/TALlyw
"private" applies to the module, not the type.
https://dlang.org/spec/attribute.html#visibility_attributes
On Thursday, 4 October 2018 at 07:31:21 UTC, Ritchie wrote:
Any reason why this works?
https://run.dlang.io/is/TALlyw
Why not?
Any reason why this works?
https://run.dlang.io/is/TALlyw
22 matches
Mail list logo