I upgraded from DMD 2.074.1 (!) to 2.077.1 and tried to compile a
mixed c++/d project (DMD links to one c++ lib). Here is the full
error message:
fatal error C1905: Front end and back end not compatible (must
target same processor).
LINK : fatal error LNK1257: code generation failed
Error:
On 12/17/17 11:18 AM, Vino wrote:
On Sunday, 17 December 2017 at 00:45:06 UTC, Ali Çehreli wrote:
On 12/16/2017 03:58 PM, Steven Schveighoffer wrote:
[...]
I was going to suggest the same to Vino and I was writing the
following program to demonstrate how low the number of allocations is.
On 2017-12-17 12:49, kerdemdemir wrote:
I have an enum statement :
enum : string
{
KErdem
Ali
Zafer
Salih
//etc...
}
I don't want to give a name to my enum class since I am accessing this
variables very often.
But I also have a function like:
double
On 12/17/2017 12:32 AM, Ryan David Sheasby wrote:
> I've searched high and low but can't
> seem to find a simple sleep/delay/wait/pause function in the core or in
> phobos.
Prepending "dlang" to Google searches has been working well for me.
Googling for "dlang sleep" lists the documentation as
On 12/17/2017 06:44 AM, Alexandru Ermicioi wrote:
> It is interesting that it will not work with global functions as well:
>
>
> void foo(int i, double d) {};
> enum bool check = is(typeof(foo) == void function(int, double));
>
There, the address-of operator is missing. This
On Sunday, 17 December 2017 at 15:57:08 UTC, ParticlePeter wrote:
I upgraded from DMD 2.074.1 (!) to 2.077.1 and tried to compile
a mixed c++/d project (DMD links to one c++ lib). Here is the
full error message:
Forgot most important info, ita an x64 project those used VS
linker by default
HI All,
As per the document form std.parallelism it states that we can
use taskPool.reduce so can we use the same for fold
(taskPool.fold) as basically both are same with slight variation
on seed values, if possible can can we define the same in the
below lines
Tried the below but getting
On Sunday, 17 December 2017 at 00:45:06 UTC, Ali Çehreli wrote:
On 12/16/2017 03:58 PM, Steven Schveighoffer wrote:
[...]
I was going to suggest the same to Vino and I was writing the
following program to demonstrate how low the number of
allocations is.
[...]
Hi Steven /Ali,
On Sunday, 17 December 2017 at 14:44:15 UTC, Alexandru Ermicioi
wrote:
Suppose:
struct F {
static void foo(T)(T i, int o) {}
}
enum bool check(T) = is(F.foo!T == void function(Z, int), Z);
enum correct = check!int;
Upon running it will return false, though, by logic is
On Sunday, 17 December 2017 at 15:57:08 UTC, ParticlePeter wrote:
I upgraded from DMD 2.074.1 (!) to 2.077.1 and tried to compile
a mixed c++/d project (DMD links to one c++ lib). Here is the
full error message:
fatal error C1905: Front end and back end not compatible (must
target same
I have an enum statement :
enum : string
{
KErdem
Ali
Zafer
Salih
//etc...
}
I don't want to give a name to my enum class since I am accessing
this variables very often.
But I also have a function like:
double ReturnCoolNess( /* Is there any way? */ enumVal )
{
switch
On Sunday, December 17, 2017 11:49:58 kerdemdemir via Digitalmars-d-learn
wrote:
> I have an enum statement :
>
> enum : string
> {
> KErdem
> Ali
> Zafer
> Salih
> //etc...
> }
>
>
> I don't want to give a name to my enum class since I am accessing
> this variables very
On Saturday, 16 December 2017 at 19:57:30 UTC, Marc wrote:
Does D have something similar?
As others have said, D has UDAs.
An alternative to using __traits(getAttributes) is to use
std.traits.getUDAs [1]
I've made a small example using std.traits.getUDAs, based off of
your example. [2]
What I meant with anonymous enums was:
https://dlang.org/spec/enum.html#anonymous_enums. Maybe I
couldn't explain well but I believe D have anonymous enums. I am
sorry I have forgotten to remove " :string" in my example from
the "enum : string". Please stretch out ": string" part my
problem
Hi,
Have someone tried to test a function against a signature using
is expression?
Suppose:
struct F {
static void foo(T)(T i, int o) {}
}
enum bool check(T) = is(F.foo!T == void function(Z, int), Z);
enum correct = check!int;
Upon running it will return false,
On Sunday, 17 December 2017 at 16:19:00 UTC, ag0aep6g wrote:
On Sunday, 17 December 2017 at 14:44:15 UTC, Alexandru Ermicioi
wrote:
Suppose:
struct F {
static void foo(T)(T i, int o) {}
}
enum bool check(T) = is(F.foo!T == void function(Z, int), Z);
enum correct = check!int;
On 12/17/17 8:32 AM, Adam D. Ruppe wrote:
On Sunday, 17 December 2017 at 08:32:20 UTC, Ryan David Sheasby wrote:
What am I missing?
the official search is hard to use, so I made my own. When looking for
something, try dpldocs.info/search_term
http://dpldocs.info/sleep
and here it pops
On Sunday, 17 December 2017 at 16:40:46 UTC, John wrote:
Yah the sc.ini file is wrong for Environment64.
[Environment64]
LIB="%@P%\..\lib64"
.
.
.
; Windows installer uncomments the version detected
LINKCMD=%VCINSTALLDIR%\bin\HostX86\x86\link.exe
Thanks! Is this a known, reported bug?
On Sunday, 17 December 2017 at 17:15:57 UTC, ParticlePeter wrote:
On Sunday, 17 December 2017 at 16:40:46 UTC, John wrote:
Yah the sc.ini file is wrong for Environment64.
[Environment64]
LIB="%@P%\..\lib64"
.
.
.
; Windows installer uncomments the version detected
Thanks for your idea.
On Monday, 18 December 2017 at 05:08:24 UTC, Jonathan M Davis
wrote:
ubyte[] makeCMDPacket(RCPCmd cmd, in ubyte[] data)
{
this.preamble = RCPPKT_PRE;
this.hdr.msgtype = RCPMSG_CMD;
this.hdr.cmdcode = cast (ubyte)
On Monday, December 18, 2017 03:00:47 Binghoo Dang via Digitalmars-d-learn
wrote:
> hi,
>
> I'm a dlang newbie, and I recently made a program that interacts
> with an RFID Reader, it's basically a Serial-Port communication
> model. And after 2 days, I finally got a working code like these:
>
>
I'm looking for a memory leak in my use of vibe.d JSON objects.
The gc profiler built into the runtime only shows allocation
count and allocation bytes, so I can make guesses around what
might have leaked, but I can't be sure where or when, or exactly
what leaked.
I'm sure someone else has
On Sunday, 17 December 2017 at 08:32:20 UTC, Ryan David Sheasby
wrote:
What am I missing?
the official search is hard to use, so I made my own. When
looking for something, try dpldocs.info/search_term
http://dpldocs.info/sleep
and here it pops right up.
For years now, I've been under the impression that the
distinction between extern(Windows) and extern(System) actually
mattered. I recall extern(System) was first added to the language
to resolve this situation for C bindings:
version(Windows) extern(Windows):
else extern(C):
Which, or
On Sunday, 17 December 2017 at 08:40:53 UTC, rikki cattermole
wrote:
On 17/12/2017 8:32 AM, Ryan David Sheasby wrote:
Hey guys. First time poster here. I've searched high and low
but can't seem to find a simple sleep/delay/wait/pause
function in the core or in phobos. The most recent
On 17/12/2017 8:32 AM, Ryan David Sheasby wrote:
Hey guys. First time poster here. I've searched high and low but can't
seem to find a simple sleep/delay/wait/pause function in the core or in
phobos. The most recent information I can find about it is this forum
post from 12 years ago:
On Sunday, 17 December 2017 at 08:26:03 UTC, Jonathan M Davis
wrote:
assert(0) does indeed turn into a HLT instruction in -release
mode (as does any assertion that's known to be false at compile
time). It's a special case intended for marking code that's
supposed to be unreachable. Without
On Sunday, 17 December 2017 at 08:10:06 UTC, codephantom wrote:
On Sunday, 17 December 2017 at 00:10:27 UTC, Anonymouse wrote:
If you return inside a scopeguard though, the exception (or
error!) is swallowed. https://run.dlang.io/is/GEtQ6D
The scope guard will not 'swallow' it, if you use
On Sunday, December 17, 2017 09:32:53 codephantom via Digitalmars-d-learn
wrote:
> On Sunday, 17 December 2017 at 08:26:03 UTC, Jonathan M Davis
>
> wrote:
> > assert(0) does indeed turn into a HLT instruction in -release
> > mode (as does any assertion that's known to be false at compile
> >
On 2017-12-16 22:11, Marc wrote:
I can't "pack" an object, right? In C#, TextSize is a class and 256 is
constructor's first argument. In D it's pretty much an array but I guess
it's close enough. Thanks!
In D it's an tuple of basically anything that is known at compile time,
values or
On Sunday, 17 December 2017 at 00:10:27 UTC, Anonymouse wrote:
If you return inside a scopeguard though, the exception (or
error!) is swallowed. https://run.dlang.io/is/GEtQ6D
The scope guard will not 'swallow' it, if you use -release mode.
Which suggests to me, that assert(0) operates
On Sunday, December 17, 2017 08:10:06 codephantom via Digitalmars-d-learn
wrote:
> On Sunday, 17 December 2017 at 00:10:27 UTC, Anonymouse wrote:
> > If you return inside a scopeguard though, the exception (or
> > error!) is swallowed. https://run.dlang.io/is/GEtQ6D
>
> The scope guard will not
Hey guys. First time poster here. I've searched high and low but
can't seem to find a simple sleep/delay/wait/pause function in
the core or in phobos. The most recent information I can find
about it is this forum post from 12 years ago:
On Sunday, 17 December 2017 at 08:32:20 UTC, Ryan David Sheasby
wrote:
Hey guys. First time poster here. I've searched high and low
but can't seem to find a simple sleep/delay/wait/pause function
in the core or in phobos. The most recent information I can
find about it is this forum post from
On 2017-12-17 02:32, Venkat wrote:
dmd has the -H and -Hd switches. Does dub have any setting to make it
generate D interface files ?
Not that I know of, but you can create your own build type for that [1]
[1] http://code.dlang.org/package-format?lang=sdl#build-types
--
/Jacob Carlborg
On Sunday, 17 December 2017 at 19:29:00 UTC, ParticlePeter wrote:
On Sunday, 17 December 2017 at 19:16:02 UTC, ParticlePeter
wrote:
On Sunday, 17 December 2017 at 17:56:47 UTC, John wrote:
I don't think so, all that would need to be changed is this
line:
On Sunday, 17 December 2017 at 17:01:37 UTC, Steven Schveighoffer
wrote:
I searched for "sleep" in "library", core.thread was the first
result.
Yeah, me too (followed by core.time, std.datetime.stopwatch, and
std.datetime...), but it isn't obvious any of them are actual
winners.
If you
On Sunday, 17 December 2017 at 19:16:02 UTC, ParticlePeter wrote:
On Sunday, 17 December 2017 at 17:56:47 UTC, John wrote:
I don't think so, all that would need to be changed is this
line:
https://github.com/dlang/dmd/blob/v2.077.1/ini/windows/bin/sc.ini#L53
Not very many people use it I
On Sunday, December 17, 2017 12:47:26 kerdemdemir via Digitalmars-d-learn
wrote:
> What I meant with anonymous enums was:
> https://dlang.org/spec/enum.html#anonymous_enums. Maybe I
> couldn't explain well but I believe D have anonymous enums. I am
> sorry I have forgotten to remove " :string" in
On 12/17/2017 08:11 AM, Vino wrote:
> As per the document form std.parallelism it states that we can use
> taskPool.reduce so can we use the same for fold (taskPool.fold) as
> basically both are same with slight variation on seed values, if
> possible can can we define the same in the below
On Sunday, 17 December 2017 at 17:56:47 UTC, John wrote:
I don't think so, all that would need to be changed is this
line:
https://github.com/dlang/dmd/blob/v2.077.1/ini/windows/bin/sc.ini#L53
Not very many people use it I guess if it's been there for 8
months lol.
Hm, actually that line
On Sunday, 17 December 2017 at 20:09:02 UTC, ParticlePeter wrote:
On Sunday, 17 December 2017 at 19:29:00 UTC, ParticlePeter
wrote:
On Sunday, 17 December 2017 at 19:16:02 UTC, ParticlePeter
[snip]
LINKCMD=%VCINSTALLDIR%\bin\HostX32\x64\link.exe
or
hi,
I'm a dlang newbie, and I recently made a program that interacts
with an RFID Reader, it's basically a Serial-Port communication
model. And after 2 days, I finally got a working code like these:
```
enum RCPCmd{
RCPCMD_GET_REGION = 0x06,
RCPCMD_SET_REGION = 0x07,
43 matches
Mail list logo