Why is there no
- __traits(isArray, T)
alongside
- __traits(isStaticArray, T) and
- __traits(isAssociativeArray, T)
when dmd already has `ENUMTY.Tarray` alongside
- ENUMTY.Tsarray and
- ENUMTY.Taarray
and std.traits already has a wrapper for this at
https://dlang.org/phobos/std_traits.html#
On Sunday, 25 November 2018 at 19:22:36 UTC, sclytrack wrote:
There are 4 rules listed.
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md
What is rule 5?
int* global_ptr;
void abc() {
scope int* a;
int* b;
scope int* c = a; // Error, rule 5
scope int* d = b;
On Monday, 26 November 2018 at 09:04:25 UTC, Per Nordlöw wrote:
Why is there no
- __traits(isArray, T)
alongside
- __traits(isStaticArray, T) and
- __traits(isAssociativeArray, T)
when dmd already has `ENUMTY.Tarray` alongside
- ENUMTY.Tsarray and
- ENUMTY.Taarray
and std.traits already has
On Monday, 26 November 2018 at 09:28:37 UTC, Basile B. wrote:
On Monday, 26 November 2018 at 09:04:25 UTC, Per Nordlöw wrote:
Why is there no
- __traits(isArray, T)
alongside
- __traits(isStaticArray, T) and
- __traits(isAssociativeArray, T)
when dmd already has `ENUMTY.Tarray` alongside
-
On Monday, 26 November 2018 at 10:53:25 UTC, Eduard Staniloiu
wrote:
I would like to see this in the compiler traits :D
https://github.com/dlang/dmd/pull/9014
Hello,
I try to build my project using command "dub build" but I can\t
because there is an error:
Fetching derelict-util 3.0.0-beta.2 (getting selected
version)...
SSL connect error on handle 1F19AC0
And this happens every time... As I understand dub can't find
package.
In dub.json I have th
On Monday, 26 November 2018 at 11:57:40 UTC, Andrey wrote:
Hello,
I try to build my project using command "dub build" but I can\t
because there is an error:
Fetching derelict-util 3.0.0-beta.2 (getting selected
version)...
SSL connect error on handle 1F19AC0
And this happens every time... As I
On Monday, 26 November 2018 at 03:09:03 UTC, Mike Parker wrote:
I mean, can you think of any module in the
Python/Javascript/C# standard library that simply including it
will swell your program to the point it can't compile? I'm not
an omnipotent master programmer, but as a professional, I
can
On Monday, 26 November 2018 at 12:11:03 UTC, Alex wrote:
On Monday, 26 November 2018 at 11:57:40 UTC, Andrey wrote:
Hello,
I try to build my project using command "dub build" but I
can\t because there is an error:
Fetching derelict-util 3.0.0-beta.2 (getting selected
version)...
SSL connect e
On Sunday, 25 November 2018 at 01:01:30 UTC, bauss wrote:
On Saturday, 24 November 2018 at 08:50:59 UTC, Eko Wahyudin
wrote:
On Saturday, 24 November 2018 at 08:09:38 UTC, Stanislav
Blinov wrote:
[...]
aah ya,, this statement is work
static foreach (i; 0 .. symbols.length)
thank you.
It s
On Monday, 26 November 2018 at 13:50:13 UTC, Eko Wahyudin wrote:
seems my problem is i use GDC, i got this error
error: basic type expected, not foreach.
The common versions of gdc don't support static foreach, but
plain foreach should work there the same way in this context.
So just remove
On 11/26/18 4:04 AM, Per Nordlöw wrote:
Why is there no
- __traits(isArray, T)
alongside
- __traits(isStaticArray, T) and
- __traits(isAssociativeArray, T)
Thanks for bringing this to my attention, Per.
The core idea is to have __traits "primitive and ugly" and std.traits
"convenient and
Hi all!
Can somebody explain to me, why the example below is not working
in a way I'm expecting it to work?
My example is a little bit longer this time, however the half of
it is taken from
https://dlang.org/library/std/concurrency/receive_only.html
´´´
import std.experimental.all;
struct D
On 11/26/18 9:00 AM, Alex wrote:
Hi all!
Can somebody explain to me, why the example below is not working in a
way I'm expecting it to work?
My example is a little bit longer this time, however the half of it is
taken from
https://dlang.org/library/std/concurrency/receive_only.html
´´´
impo
On Monday, 26 November 2018 at 14:28:33 UTC, Steven Schveighoffer
wrote:
Some problems arose:
1. Obviously, this is not the case, as the output is
different, depending on the thread I start the model function.
Yes, unless you declare the model to be shared, there is a copy
made for each threa
On Sunday, 25 November 2018 at 22:00:21 UTC, Chris Katko wrote:.
So 1) I have to compile manually, then link. Except that also
runs the files every time even if they're up-to-date. Is that
normal behavior for C/C++?
Well you dont have to use separate commands but yes compiling and
linking a
On 11/26/18 10:16 AM, Alex wrote:
On Monday, 26 November 2018 at 14:28:33 UTC, Steven Schveighoffer wrote:
A static member is stored per thread. If you want a global that's
shared between all threads, you need to make it shared. But the result
may not be what you are looking for, shared can c
On Monday, 26 November 2018 at 15:26:43 UTC, Steven Schveighoffer
wrote:
Well, if you want to run calculations in another thread, then
send the result back to the original, you may be better off
sending the state needed for the calculation to the worker
thread, and receiving the result back v
Hi,
I attempted to use a combination of traits and mixins to
automatically create aliases of names in SDL2 without the SDL_
prefix for convenience. However, I was only able to achieve this
for functions in the module, and not for types nor enum values.
How could I go about achieving the desir
On 11/26/18 10:37 AM, Alex wrote:
On Monday, 26 November 2018 at 15:26:43 UTC, Steven Schveighoffer wrote:
Well, if you want to run calculations in another thread, then send the
result back to the original, you may be better off sending the state
needed for the calculation to the worker threa
On 11/26/18 8:59 AM, Adam D. Ruppe wrote:
On Monday, 26 November 2018 at 13:50:13 UTC, Eko Wahyudin wrote:
seems my problem is i use GDC, i got this error
error: basic type expected, not foreach.
The common versions of gdc don't support static foreach, but plain
foreach should work there the
On Monday, 26 November 2018 at 16:27:23 UTC, Steven Schveighoffer
wrote:
On 11/26/18 10:37 AM, Alex wrote:
On Monday, 26 November 2018 at 15:26:43 UTC, Steven
Schveighoffer wrote:
Well, if you want to run calculations in another thread, then
send the result back to the original, you may be be
On Sun, Nov 25, 2018 at 09:53:50PM +, Stanislav Blinov via
Digitalmars-d-learn wrote:
> On Sunday, 25 November 2018 at 21:38:43 UTC, H. S. Teoh wrote:
>
> > Actually, I just thought of a way to do this with the existing language:
> > use a struct to simulate an enum:
> >
> > struct E {
>
On Saturday, 17 November 2018 at 08:17:36 UTC, Paul Backus wrote:
You could run the calculation in another thread and use
std.concurrency.receiveTimeout [1] to stop waiting for the
result after a certain amount of time.
Ok... would you say the following is a feasible alternative?
´´´
import s
On Friday, 23 November 2018 at 08:57:57 UTC, Chris Katko wrote:
Any time I see people mention the benefits of D, I see "compile
times" "compile times" "compile times" over and over.
I'm using very modest amounts of templates, for a fairly small
sized program (very early work toward a game), an
ParameterIdentifierTuple from std.traits did work fine for
regular functions but not for template functions:
Error: template instance
`std.traits.ParameterIdentifierTuple!(f)` does not match
template declaration `ParameterIdentifierTuple(func...) if
(func.length == 1 && isCallable!func)` (foo
On Tuesday, 27 November 2018 at 02:00:44 UTC, PacMan wrote:
ParameterIdentifierTuple from std.traits did work fine for
regular functions but not for template functions:
Error: template instance
`std.traits.ParameterIdentifierTuple!(f)` does not match
template declaration `ParameterIdentifierT
On Tue, 27 Nov 2018 02:00:44 +, PacMan wrote:
> f is defined as:
>
>> void f(T)(T t, string p)
>> if(is(T == A) || is(T == B))
>>{
>> // ...
>>}
>
> my goal is get "p" as string.
`f` is a template that generates functions. Before you instantiate that
template, the function doesn't exis
28 matches
Mail list logo