On Monday, 29 March 2021 at 01:39:16 UTC, Adam D. Ruppe wrote:
On Monday, 29 March 2021 at 01:24:13 UTC, Preetpal wrote:
writeln(isRandomAccessRange(arr));
Template arguments are passed by !(), not just ().
I believe you must also pass `typeof(arr)` since
isRandomAccessRange is only
This is a minimal example that re-creates the error message. I am
not understanding the error message that the compiler is giving
me. From my understanding, the compiler is saying that there is a
single possible candidate but it cannot figure out which one to
choose. Why would it not choose
On Saturday, 3 April 2021 at 19:02:34 UTC, Brad wrote:
Obviously it is a type mismatch - I have tried using to!uint to
convert the result from unpredictableSeed to a type that will
match - but that just causes more errors.
Thank you in advance.
I was able to compile the sample without any
On Friday, 12 March 2021 at 10:26:55 UTC, Dennis wrote:
```
version(BigEndian) {
private enum bigEndian = true;
} else {
private enum bigEndian = false;
}
int parse(in ubyte[] data) {
if (__ctfe || bigEndian) {
// Portable code
} else {
// Little-endian optimized
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
On Saturday, 6 March 2021 at 22:14:26 UTC, kdevel wrote:
After replacing dmd with ldmd2 (LDC 1.25.1) I get tons of link
errors all of
the form mentioned in the subject. Any idea what can be done
about it?
(With a handcrafted single compile/link statement using ldc2
everything compiles
but
On Monday, 22 February 2021 at 08:00:06 UTC, Ali Çehreli wrote:
I achieve it with 'flock' (man 2 flock) on Linux. My case is
different thoug: It allows me to have single writer and many
readers of program data, which is kept inside a cache
directory. All instances start with read permissionss
I want to restrict a D application to a single instance. Is there
a way to do this using the D standard library?
I know this can be done using named mutexes on Windows using
Windows-specific APIs but I want to avoid this in general because
I want to port the code to FreeBSD without
On Monday, 22 February 2021 at 02:39:58 UTC, Steven Schveighoffer
wrote:
On 2/21/21 9:29 PM, Preetpal wrote:
I want to restrict a D application to a single instance. Is
there a way to do this using the D standard library?
When you say "application", you mean a class or type?
I actually
On Monday, 22 February 2021 at 02:39:58 UTC, Steven Schveighoffer
wrote:
On 2/21/21 9:29 PM, Preetpal wrote:
I want to restrict a D application to a single instance. Is
there a way to do this using the D standard library?
When you say "application", you mean a class or type?
I decided to
I want to reuse existing C++ code in a new project that I am
writing in D and I want to use D in an existing C++ code base (it
is not large). I do not anticipate interop being an issue.
I am wondering if mixing D and C++ is a common practice? If it is
a common practice, is anyone is currently
On Friday, 19 February 2021 at 10:01:36 UTC, Max Haughton wrote:
On Friday, 19 February 2021 at 09:44:15 UTC, Preetpal wrote:
I want to reuse existing C++ code in a new project that I am
writing in D and I want to use D in an existing C++ code base
(it is not large). I do not anticipate
On Friday, 19 February 2021 at 10:21:29 UTC, Max Haughton wrote:
On Friday, 19 February 2021 at 10:18:28 UTC, Preetpal wrote:
On Friday, 19 February 2021 at 10:01:36 UTC, Max Haughton
wrote:
On Friday, 19 February 2021 at 09:44:15 UTC, Preetpal wrote:
[...]
C++ interop is used every day.
Is this supposed to work out of the box (see: [Reddit
Post](https://www.reddit.com/r/d_language/comments/sypgaj/dmd_supports_crosscompilation_with_os_switch/))?
Trying to cross-compile a hello world program for Linux on
Windows with the command **dmd -os=linux main.d** which gives no
output
On Tuesday, 13 September 2022 at 19:54:15 UTC, Preetpal wrote:
In Windows 10, Version 1607 (and later), you can [enable long
paths](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry) which bypasses the MAX_PATH limitation for local paths (e.g.,
In Windows 10, Version 1607 (and later), you can [enable long
paths](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry) which bypasses the MAX_PATH limitation for local paths (e.g., C:\Users\you\log.txt). Currently if you iterate over a directory
Is there a way to install packages "globally" using dub?
For example, when using the node package manager (NPM) you can
install a package "globally" (so it is available for the current
user from the command line) using the `--global` flag as follows:
`npm install --global typescript`
This
On Thursday, 6 October 2022 at 08:50:02 UTC, christian.koestlin
wrote:
On Thursday, 6 October 2022 at 07:06:52 UTC, Preetpal wrote:
Is there a way to install packages "globally" using dub?
For example, when using the node package manager (NPM) you can
install a package "globally" (so it is
On Monday, 14 November 2022 at 10:44:11 UTC, Imperatorn wrote:
On Tuesday, 13 September 2022 at 19:54:15 UTC, Preetpal wrote:
In Windows 10, Version 1607 (and later), you can [enable long
paths](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry)
In case anyone wants to see a working example of how to use long
paths on Windows, I uploaded a
[gist](https://gist.github.com/preetpalS/2fd6c6bf05a94734f89b70b679716bf3) (see my comment in the gist for how to make it work). It is an upgraded version of the original command line tool shown in
20 matches
Mail list logo