In the portability section of the language spec, they talk about
endianness (https://dlang.org/spec/portability.html#endianness)
which refers "to the order in which multibyte types are stored."
IMO if you wanted to actually be sure your code is portable
across both big endian and little endian
On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote:
I thought it would be fun to convert some old C++/C quant utils
to D. I'm starting with a simple library that I call from vba
in Excel on macos:
module xlutils;
import core.stdc.string : strlen, strcpy;
//import std.conv : to;
//import
On Thursday, 11 March 2021 at 18:35:37 UTC, Imperatorn wrote:
On Thursday, 11 March 2021 at 17:00:06 UTC, David wrote:
On Thursday, 11 March 2021 at 14:49:32 UTC, Imperatorn wrote:
On Thursday, 11 March 2021 at 10:29:55 UTC, David wrote:
On Thursday, 11 March 2021 at 08:40:58 UTC, Imperatorn w
On Thursday, 11 March 2021 at 18:41:08 UTC, Ali Çehreli wrote:
On 3/11/21 10:06 AM, Chris Piker wrote:
>https://dlang.org/spec/hash-map.html#static_initialization
>
> that this feature is not yet implemented.
I use a shared static this() block:
immutable string[int] aa;
shared static this
On Thursday, 11 March 2021 at 19:12:34 UTC, H. S. Teoh wrote:
On Thu, Mar 11, 2021 at 06:06:35PM +, Chris Piker via
immutable int[string] aa;
shared static this() {
aa = [ "abc": 123, "def": 456, /* ... */ ];
}
Hi H.S.T
Yes, I'm using static if, but do you
On Thursday, 11 March 2021 at 18:41:08 UTC, Ali Çehreli wrote:
On 3/11/21 10:06 AM, Chris Piker wrote:
>https://dlang.org/spec/hash-map.html#static_initialization
>
> that this feature is not yet implemented.
I use a shared static this() block:
immutable string[int] aa;
shared static this
On Thu, Mar 11, 2021 at 06:06:35PM +, Chris Piker via Digitalmars-d-learn
wrote:
[...]
> Today I ran across a situation where an immutable associative array
> would be handy. While perusing the language spec I noticed here:
>
> https://dlang.org/spec/hash-map.html#static_initialization
>
>
On 3/11/21 10:06 AM, Chris Piker wrote:
>https://dlang.org/spec/hash-map.html#static_initialization
>
> that this feature is not yet implemented.
I use a shared static this() block:
immutable string[int] aa;
shared static this() {
aa = [ 1: "one" ];
}
void main() {
assert(aa.length ==
On Thursday, 11 March 2021 at 17:00:06 UTC, David wrote:
On Thursday, 11 March 2021 at 14:49:32 UTC, Imperatorn wrote:
On Thursday, 11 March 2021 at 10:29:55 UTC, David wrote:
On Thursday, 11 March 2021 at 08:40:58 UTC, Imperatorn wrote:
On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote:
Hi D
At work I've begun writing programs in D that I would typically
write in python. My goal is to get away from split python/C
development and just use one language most of the time. Today I
ran across a situation where an immutable associative array would
be handy. While perusing the lan
Try it with:
-allinst
It may just be deciding a template instance isn't required.
On 3/11/21 8:41 AM, Iliya wrote:
> I am using dmd 2.094.1 on linux
Your program links fine for me with 2.094.2 on Linux.
Ali
On Thursday, 11 March 2021 at 17:25:35 UTC, Ali Çehreli wrote:
On 3/11/21 8:41 AM, Iliya wrote:
> I am using dmd 2.094.1 on linux
Your program links fine for me with 2.094.2 on Linux.
Ali
Thank you, Ali!
I also played with it on playground. Seems that it is a bug.
The compilation results:
On Thursday, 11 March 2021 at 14:49:32 UTC, Imperatorn wrote:
On Thursday, 11 March 2021 at 10:29:55 UTC, David wrote:
On Thursday, 11 March 2021 at 08:40:58 UTC, Imperatorn wrote:
On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote:
I thought it would be fun to convert some old C++/C quant
On Thursday, 11 March 2021 at 14:35:45 UTC, rikki cattermole
wrote:
Pipe it to grep should work
| grep -v "__D2"
Thanks - though I'm trying to suppress the symbols being
generated in the library.
A colleague says it can be done in ldc but not dmd. I'll think
I'll try that out.
Hello.
I am using dmd 2.094.1 on linux for compiling a piece code I
found on the github. Unfortunately linker can't link it as it
can't find opCall symbol instantiation demangled as:
pure nothrow @nogc @safe bool
app.IsEqual!(char).IsEqual.opCall(in char, in char)
Do you have any ideas on:
On Thursday, 11 March 2021 at 14:23:39 UTC, Adam D. Ruppe wrote:
On Thursday, 11 March 2021 at 12:26:07 UTC, Виталий Фадеев
wrote:
_processMouseKey = &process; // <-- not works
_processMouseMove = &process; // <-- not works
This *should* actually work. What type are those variables?
On Thursday, 11 March 2021 at 10:29:55 UTC, David wrote:
On Thursday, 11 March 2021 at 08:40:58 UTC, Imperatorn wrote:
On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote:
I thought it would be fun to convert some old C++/C quant
utils to D. I'm starting with a simple library that I call
f
Pipe it to grep should work
| grep -v "__D2"
On Thursday, 11 March 2021 at 12:26:07 UTC, Виталий Фадеев wrote:
_processMouseKey = &process; // <-- not works
_processMouseMove = &process; // <-- not works
This *should* actually work. What type are those variables?
struct MouseKeyEvent {}
struct MouseMoveEvent{}
void process( ref
On Thursday, 11 March 2021 at 13:14:56 UTC, Paul Backus wrote:
On Thursday, 11 March 2021 at 12:56:34 UTC, Виталий Фадеев
wrote:
[...]
Something like this:
template Overloads(alias symbol)
{
static if (__traits(compiles, __traits(parent, symbol)))
alias Overloads =
On Thursday, 11 March 2021 at 12:56:34 UTC, Виталий Фадеев wrote:
What right way to call function directly with selecting one of
two ?
If they are not nested functions, you can also do:
```
// Separate names
void processKey (ref MouseKeyEvent event) {...}
void processMove(ref MouseMoveEvent eve
On Thursday, 11 March 2021 at 12:56:34 UTC, Виталий Фадеев wrote:
This will generate lambda:
__processMouseKey = (ref MouseKeyEvent event) {
process(event); };
two calls:
call labnda;
call process;
What right way to call function directly with selecting one of
two ?
Something like
On Thursday, 11 March 2021 at 12:48:13 UTC, Paul Backus wrote:
On Thursday, 11 March 2021 at 12:26:07 UTC, Виталий Фадеев
wrote:
Have:
void process( ref MouseKeyEvent event )
{
...
}
void process( ref MouseMoveEvent event )
{
...
}
Want:
_processMouseK
On Thursday, 11 March 2021 at 12:26:07 UTC, Виталий Фадеев wrote:
Have:
void process( ref MouseKeyEvent event )
{
...
}
void process( ref MouseMoveEvent event )
{
...
}
Want:
_processMouseKey = &process; // <-- not works
_processMouseMove = &proces
Have:
void process( ref MouseKeyEvent event )
{
...
}
void process( ref MouseMoveEvent event )
{
...
}
Want:
_processMouseKey = &process; // <-- not works
_processMouseMove = &process; // <-- not works
What is correct way to get address of function
On Thursday, 11 March 2021 at 08:40:58 UTC, Imperatorn wrote:
On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote:
I thought it would be fun to convert some old C++/C quant
utils to D. I'm starting with a simple library that I call
from vba in Excel on macos:
[...]
*trigger warning*
"v
On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote:
I thought it would be fun to convert some old C++/C quant utils
to D. I'm starting with a simple library that I call from vba
in Excel on macos:
[...]
*trigger warning*
"vba in Excel on macos" ⚠️
Btw, have you looked at excel-d?
htt
I thought it would be fun to convert some old C++/C quant utils
to D. I'm starting with a simple library that I call from vba in
Excel on macos:
module xlutils;
import core.stdc.string : strlen, strcpy;
//import std.conv : to;
//import std.string : toStringz;
import core.stdc.stdlib : malloc,
29 matches
Mail list logo