Re: Bitfileds Error: no identifier for declarator

2021-10-27 Thread data pulverizer via Digitalmars-d-learn
On Thursday, 28 October 2021 at 05:51:27 UTC, Imperatorn wrote: Try renaming debug to something else Many thanks guys. I should have spotted that one!

Re: Bitfileds Error: no identifier for declarator

2021-10-27 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 28 October 2021 at 05:20:35 UTC, data pulverizer wrote: Hi, I am trying to compile the following items: [...] Try renaming debug to something else

Re: Bitfileds Error: no identifier for declarator

2021-10-27 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 28 October 2021 at 05:51:27 UTC, Imperatorn wrote: On Thursday, 28 October 2021 at 05:20:35 UTC, data pulverizer wrote: Hi, I am trying to compile the following items: [...] Try renaming debug to something else uint, "debugflag",1,

Re: Bitfileds Error: no identifier for declarator

2021-10-27 Thread Stanislav Blinov via Digitalmars-d-learn
On Thursday, 28 October 2021 at 05:20:35 UTC, data pulverizer wrote: I am trying to compile the following items: struct sxpinfo_struct { mixin(bitfields!( // ... uint, "debug",1, // ... } ``` But I get the error... `debug` is a language keyword, try a different one, like

Re: Bitfileds Error: no identifier for declarator

2021-10-27 Thread data pulverizer via Digitalmars-d-learn
On Thursday, 28 October 2021 at 05:20:35 UTC, data pulverizer wrote: Hi, I am trying to compile the following items ... Sorry forgot to prepend: ``` enum SEXPTYPE { NILSXP = 0, SYMSXP = 1, LISTSXP = 2, CLOSXP = 3, ENVSXP = 4, PROMSXP = 5, LANGSXP = 6, SPECIALSXP = 7, BUILTIN

Bitfileds Error: no identifier for declarator

2021-10-27 Thread data pulverizer via Digitalmars-d-learn
Hi, I am trying to compile the following items: ``` import std.bitmanip: bitfields; enum TYPE_BITS = 5; enum NAMED_BITS = 16; struct sxpinfo_struct { mixin(bitfields!( SEXPTYPE, "type", TYPE_BITS, uint, "scalar", 1, uint, "obj", 1, uint, "alt", 1, uint, "gp",

Re: Are there anything like leetcode.com but that supports D?

2021-10-27 Thread Dr Machine Code via Digitalmars-d-learn
On Thursday, 28 October 2021 at 01:29:41 UTC, Siarhei Siamashka wrote: On Sunday, 24 October 2021 at 05:46:48 UTC, Dr Machine Code wrote: I'd like that to some friends getting start with programming. There are also websites, which host programming competitions. Beginners friendly: * https://

Linker issues with struct postblit

2021-10-27 Thread Thomas Gregory via Digitalmars-d-learn
I am a maintainer of the [dhtslib](https://github.com/blachlylab/dhtslib) package and I have been running into issues with a new implementation of reference counting we are using. Below is the implementation (which is basically our replacement for `RefCounted`). ```d /// Template struct that

Re: Are there anything like leetcode.com but that supports D?

2021-10-27 Thread Siarhei Siamashka via Digitalmars-d-learn
On Sunday, 24 October 2021 at 05:46:48 UTC, Dr Machine Code wrote: I'd like that to some friends getting start with programming. There are also websites, which host programming competitions. Beginners friendly: * https://atcoder.jp/ * https://www.codechef.com/ Higher difficulty: * https://

Re: What is D's "__debugbreak()" equivalent?

2021-10-27 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 27 October 2021 at 17:07:31 UTC, H. S. Teoh wrote: asm { int 3; } yeah that's how i do it in dmd too

Re: What is D's "__debugbreak()" equivalent?

2021-10-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/27/21 12:54 PM, Simon wrote: Microsofts C++ compiler provides the __debugbreak function, which on x86 emits interrupt 3, which will cause the debugger to halt. What is the equivalent in D? I tried using raise(SIGINT) from core.stdc.signal, but that just closes the debugger (I thought that

Re: What is D's "__debugbreak()" equivalent?

2021-10-27 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Oct 27, 2021 at 04:54:49PM +, Simon via Digitalmars-d-learn wrote: > Microsofts C++ compiler provides the __debugbreak function, which on > x86 emits interrupt 3, which will cause the debugger to halt. What is > the equivalent in D? I tried using raise(SIGINT) from > core.stdc.signal, b

What is D's "__debugbreak()" equivalent?

2021-10-27 Thread Simon via Digitalmars-d-learn
Microsofts C++ compiler provides the __debugbreak function, which on x86 emits interrupt 3, which will cause the debugger to halt. What is the equivalent in D? I tried using raise(SIGINT) from core.stdc.signal, but that just closes the debugger (I thought that was the same, seems like I was wro

Re: Analyze debug condition in template

2021-10-27 Thread novice2 via Digitalmars-d-learn
On Wednesday, 27 October 2021 at 08:14:29 UTC, Kagamin wrote: ... Then the logger can inspect symbols in the template argument and compare their names to the function name. Aha, thank you, i will try!

Re: Analyze debug condition in template

2021-10-27 Thread Kagamin via Digitalmars-d-learn
You can do something like ```d enum LogSettings { func1,func2,func3 } alias logger!LogSettings logf; void func1() { logf(...); } ``` Then the logger can inspect symbols in the template argument and compare their names to the function name.

Re: Error: Could not open 'libcmt.lib'

2021-10-27 Thread bauss via Digitalmars-d-learn
On Monday, 25 October 2021 at 14:43:06 UTC, Willem wrote: Just starting out new with D. Up until now I have been using Python and a bit of OCaml. Error when linking: "lld-link: error: could not open 'libcmt.lib': no such file or directory" What I did: I installed the complete D setup in my

Re: TimeoutException for connecting to MySQL using a hunt-entity.

2021-10-27 Thread bauss via Digitalmars-d-learn
On Monday, 25 October 2021 at 12:54:32 UTC, greenbyte wrote: On Monday, 25 October 2021 at 07:45:26 UTC, Imperatorn wrote: On Friday, 22 October 2021 at 11:42:34 UTC, greenbyte wrote: Hi, all! I use the hunt-entity library to work with MySQL. I get the hunt.Exceptions.TimeoutException: "Timeo

Re: std.zip expand: memory allocation failed

2021-10-27 Thread bauss via Digitalmars-d-learn
On Tuesday, 26 October 2021 at 13:43:36 UTC, Steven Schveighoffer wrote: On 10/26/21 2:32 AM, bauss wrote: On Monday, 25 October 2021 at 22:38:38 UTC, Imperatorn wrote: On Monday, 25 October 2021 at 20:50:40 UTC, Steven Schveighoffer wrote: On 10/24/21 8:00 AM, Selim Ozel wrote: It turns out