On Monday, 27 March 2023 at 18:39:19 UTC, Alexander Zhirov wrote:
I mean get the UUID data type itself. Just using
[this example](https://dlang.org/phobos/std_uuid.html#.UUID)
`cast(ubyte[16])ubyte[]` will not work, conversion error.
```d
writeln(toHexString(cast(ubyte[])value.attributes["objec
On Tuesday, 28 March 2023 at 00:51:43 UTC, Steven Schveighoffer
wrote:
auto uuid = UUID(*cast(ubyte[16]*)youruuiddata.ptr);
```d
ubyte[] arr = cast(ubyte[])value.attributes["objectGUID"][0].dup;
writeln(UUID(cast(ubyte[16])arr.ptr));
```
`Error: cannot cast expression 'cast(ubyte*)arr' of type
On 28/03/2023 2:25 PM, ryuukk_ wrote:
On Tuesday, 28 March 2023 at 01:06:50 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Have you tried installing mago?
https://github.com/rainers/mago
There are instructions for vs-code in README.
I did not try mago, but it shouldn't be needed as pdb is uni
On 28/03/2023 2:33 PM, ryuukk_ wrote:
what is: "Manual Installation of the Concord extension in VS Code", i
can't find it anywhere
Extension is mago, but don't forget: cpptools-1.4.0 or later needed.
what are: "MagoNatCC.dll, MagoNatCC.vsdconfig and .vsdbg-config.json"? i
can only find: "Mago
On Tuesday, 28 March 2023 at 01:21:02 UTC, Richard (Rikki) Andrew
Cattermole wrote:
On 28/03/2023 2:06 PM, Richard (Rikki) Andrew Cattermole wrote:
Have you tried installing mago?
https://github.com/rainers/mago
There are instructions for vs-code in README.
Binaries are available in the inst
On Tuesday, 28 March 2023 at 01:06:50 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Have you tried installing mago?
https://github.com/rainers/mago
There are instructions for vs-code in README.
I did not try mago, but it shouldn't be needed as pdb is
universally understood by tools
It also
On 28/03/2023 2:06 PM, Richard (Rikki) Andrew Cattermole wrote:
Have you tried installing mago?
https://github.com/rainers/mago
There are instructions for vs-code in README.
Binaries are available in the installer of VisualD, they can be
extracted by 7zip (I've checked everything is in there
Have you tried installing mago?
https://github.com/rainers/mago
There are instructions for vs-code in README.
On 3/27/23 1:13 PM, Espartan Jhon wrote:
hola a todos quisiera saber como es que puedo eliminar los caracteres
nulos de las respuestas de mi socket
In English (via google translate):
Hello everyone, I would like to know how I can remove null characters
from my socket responses
My response i
I've now waste an entire day trying to figure out what's wrong,
perhaps trusted D for my projects was a bad idea, i now look like
a fool
On 3/27/23 1:56 PM, Alexander Zhirov wrote:
I get `objectGUID` data from LDAP as binary data. I need to convert
`ubyte[]` data into a readable `UUID`. As far as I understand, it is
possible to do this via `toHexString()`, but I have reached a dead end.
Is there a way to make it more elegant, li
I just remembered you can do something like this!
```
import std.stdio;
enum FEATURE_A_AVAILABLE()
{
version(FEATURE_A) return true;
else return false;
}
void main()
{
static if (!FEATURE_A_AVAILABLE)
{
writeln("feature A not available");
}
}
```
It's evaluated at
On Monday, 27 March 2023 at 22:22:26 UTC, Jeremy wrote:
Is there a way I can define a manifest constant from the
compiler command-line, like the -Dmacro option for C compilers?
You can do this way:
```
dmd -version=FEATURE_A
```
```D
import std.stdio;
void main()
{
version(FEATURE_A)
Is there a way I can define a manifest constant from the compiler
command-line, like the -Dmacro option for C compilers?
Fore more clarity, all syntax i have tried:
```
type_to_tiledef
kshared.defs.type_to_tiledef
_D7kshared4defs15type_to_tiledef
kshared:defs:type_to_tiledef
kshared::defs::type_to_tiledef
kshared->defs->type_to_tiledef
```
Two questions for the D team:
Does globals have a special syntax? as you can see above i also
tried the mangled name inside the PDB (using hex viewer
https://github.com/WerWolv/ImHex)
Walter, how do you debug your programs written in D?
To clarify, i tested both dmd/ldc, they both doesn't work on
windows
To clarify even more:
I am a mere user who wants to debug its program on windows using
vscode's debugger wich uses msvc
I can debug a c/rust/zig executable without issue and see globals
The problem only happens with dmd/ld
On Monday, 27 March 2023 at 19:31:24 UTC, Richard (Rikki) Andrew
Cattermole wrote:
The person you need is WebFreak and they are not online right
now.
On IRC earlier today
```
[6:43:29 pm] nope, I haven't gotten globals to work
in debugger before
[6:43:33 pm] I don't think they are emitted
The person you need is WebFreak and they are not online right now.
If anyone know what is the problem exactly, then please speak up,
this problem needs to be reported to the right place fixed so it
can be fixed, all languages i tested don't have this issue (c,
rust, zig, odin)
D is not a toy language, let's take this issue seriously, shall
we? or is it?..
On Monday, 27 March 2023 at 18:33:46 UTC, novice2 wrote:
https://run.dlang.io/is/JP01aZ
```
void main(){
import std.stdio: writeln;
import std.format: format;
ubyte[] a = [159, 199, 22, 163, 13, 74, 145, 73, 158,
112, 7, 192, 12, 193, 7, 194];
string b =
On Monday, 27 March 2023 at 17:56:22 UTC, Alexander Zhirov wrote:
I get `objectGUID` data from LDAP as binary data. I need to
convert `ubyte[]` data into a readable `UUID`. As far as I
understand, it is possible to do this via `toHexString()`, but
I have reached a dead end. Is there a way to ma
I get `objectGUID` data from LDAP as binary data. I need to
convert `ubyte[]` data into a readable `UUID`. As far as I
understand, it is possible to do this via `toHexString()`, but I
have reached a dead end. Is there a way to make it more elegant,
like [this
technique](https://dlang.org/phobo
On Monday, 27 March 2023 at 15:05:16 UTC, Armando wrote:
Wonderful, that works like a treat, thank you so much! For
those who wonder, inserting after works too:
Very cool! Thanks for asking and sharing! :)
Anyone got an idea?
Executable built with : ``dmd -g -debug`` on windows
On Visual Studio with the visuald addon i can debug the
executable and inspect the globals
On VSCode i can debug the executable and inspect locals, but not
globals
What does visuald does under the hood to be able to i
On Monday, 27 March 2023 at 16:59:29 UTC, FabArd wrote:
Hi,
I don't understand a point in the grammar :
5.4.6 AliasAssign:
Identifier = Type
5.4.7 AliasReassignment:
Identifier = StorageClasses(optional) Type
AliasAssign rule is included in the AliasReassignment rule.
hola a todos quisiera saber como es que puedo eliminar los
caracteres nulos de las respuestas de mi socket
#!/usr/bin/env dmd
/*+
ESTE ES EL ARCHIVO EN LIMPIO
+*/
import std;
import std.concurrency;
import std.algorithm: countUntil;
import std.system;
alias print = writeln;
void conexion
Hi,
I don't understand a point in the grammar :
5.4.6 AliasAssign:
Identifier = Type
5.4.7 AliasReassignment:
Identifier = StorageClasses(optional) Type
AliasAssign rule is included in the AliasReassignment rule.
Why there are two rules in the grammar to describe the s
Wonderful, that works like a treat, thank you so much! For those
who wonder, inserting after works too:
```d
for (auto range = list[]; !range.empty;)
{
if (range.back.id == 8)
list.insertAfter(range, MyType(88));
range.popBack();
}
```
which will give
```
My
On 3/26/23 4:41 PM, ryuukk_ wrote:
On Sunday, 26 March 2023 at 19:08:32 UTC, Steven Schveighoffer wrote:
On 3/26/23 2:07 PM, ryuukk_ wrote:
Hi,
It's common knowledge that accessing tls global is slow
http://david-grs.github.io/tls_performance_overhead_cost_linux/
What i do not understand is
On Sunday, 26 March 2023 at 18:07:03 UTC, ryuukk_ wrote:
Even C does it better:
https://gcc.gnu.org/onlinedocs/gcc/Thread-Local.html
Honestly I find TLS-by-default to be a bad idea, it has become a
trap to be avoided, and TLS does occasionally speed up things but
it should be opt-in.
On Sunday, 26 March 2023 at 18:07:03 UTC, ryuukk_ wrote:
What i do not understand is the reasoning behind choosing tls
global by default in D
Because the language maintainers decided that they want to
emphasize the actor model with no default shared state in the
language.
This is quite bene
On Sunday, 26 March 2023 at 18:07:03 UTC, ryuukk_ wrote:
``shared`` is even more ugly since everything must be shared
afterwards
The limitations of `shared` can be bypassed with a "function"
that removes type qualifiers. `return *cast(Unqual!T*)
&foo`(example, doesn't work as is for arrays.)
On Sunday, 26 March 2023 at 18:07:03 UTC, ryuukk_ wrote:
``shared`` is even more ugly since everything must be shared
afterwards
The limitations of `shared` can be bypassed with a "function"
that removes type qualifiers. `return *cast(Unqual!T*)
&foo`(example, doesn't work as is for arrays.)
On Sunday, 26 March 2023 at 18:07:03 UTC, ryuukk_ wrote:
``shared`` is even more ugly since everything must be shared
afterwards
The limitations of `shared` can be bypassed with a "function"
that removes type qualifiers. `return *cast(Unqual!T*)
&foo`(example, doesn't work as is for arrays.)
On Sunday, 26 March 2023 at 18:07:03 UTC, ryuukk_ wrote:
It should be the opposite
Slow code ugly
Fast code beautiful
What's fast today may not be fast tomorrow but the language might
still be relevant.
e.g.: It used to be faster to ...
- pre-calculate sin/cos tables, now the memory look
On Sunday, 26 March 2023 at 18:07:03 UTC, ryuukk_ wrote:
``shared`` is even more ugly since everything must be shared
afterwards
The limitations of `shared` can be bypassed with a "function"
that removes type qualifiers. `return *cast(Unqual!T*)
&foo`(example, doesn't work as is for arrays.)
37 matches
Mail list logo