On Wednesday, 2 December 2020 at 21:01:22 UTC, Ali Çehreli wrote:
On 12/2/20 12:20 PM, Ferhat Kurtulmuş wrote:
given the function:
export void ceaser_enc(char* input, ref char* output);
this compiles:
char* sezar = (new char[65]).ptr;
ceaser_enc(key, sezar);
this does not compile:
On Thursday, 3 December 2020 at 02:44:40 UTC, Ali Çehreli wrote:
On 12/2/20 5:46 PM, Marcone wrote:
Hello, my name is Marcone, I live in Brazil, and I have been
studying Dlang for a year. I finished my first application in
Dlang with a graphical interface in Win32api and made it
available on t
On 12/2/20 5:46 PM, Marcone wrote:
Hello, my name is Marcone, I live in Brazil, and I have been studying
Dlang for a year. I finished my first application in Dlang with a
graphical interface in Win32api and made it available on the internet
for anyone who wants to download it. Here is the progr
Hello, my name is Marcone, I live in Brazil, and I have been
studying Dlang for a year. I finished my first application in
Dlang with a graphical interface in Win32api and made it
available on the internet for anyone who wants to download it.
Here is the program link. As a beginner in the D pro
On Thursday, 3 December 2020 at 01:19:05 UTC, bachmeier wrote:
On Thursday, 3 December 2020 at 00:30:06 UTC, Kyle Ingraham
wrote:
What did I do wrong in constructing the bindings? If it helps
the library provides a function called EdsRelease for
cleaning-up allocated objects. Is the managemen
On Thursday, 3 December 2020 at 00:58:20 UTC, Paul Backus wrote:
On Thursday, 3 December 2020 at 00:30:06 UTC, Kyle Ingraham
wrote:
// EDSDKTypes.h
typedef struct __EdsObject* EdsBaseRef;
typedef EdsBaseRef EdsCameraListRef;
//
[...]
// edsdk.d
struct EdsBaseRef;
alias EdsBaseRef EdsCameraL
On Thursday, 3 December 2020 at 00:30:06 UTC, Kyle Ingraham wrote:
What did I do wrong in constructing the bindings? If it helps
the library provides a function called EdsRelease for
cleaning-up allocated objects. Is the management of pointers
between D and C the issue? Please forgive me if I'
On Thursday, 3 December 2020 at 00:30:06 UTC, Kyle Ingraham wrote:
// EDSDKTypes.h
typedef struct __EdsObject* EdsBaseRef;
typedef EdsBaseRef EdsCameraListRef;
//
[...]
// edsdk.d
struct EdsBaseRef;
alias EdsBaseRef EdsCameraListRef;
You've dropped a level of indirection here. In the C hea
Hello all. I am new to D and loving the experience so far.
I am trying to make use of a C library from Canon that provides a
header and a pre-compiled binary containing implementations of
declarations found in the header. I used the excellent guide at
https://www.gamedev.net/articles/programmi
On Tuesday, 1 December 2020 at 22:58:53 UTC, WhatMeWorry wrote:
I'm trying to build DMD with Visual D under Visual Studio as
shown in the Wiki:
https://wiki.dlang.org/Building_under_Windows
The notes say to use the solution vcbuild:
You should be able to build DMD using the visual studio
s
On 12/2/20 12:20 PM, Ferhat Kurtulmuş wrote:
given the function:
export void ceaser_enc(char* input, ref char* output);
this compiles:
char* sezar = (new char[65]).ptr;
ceaser_enc(key, sezar);
this does not compile:
char[] sezar = new char[65];
ceaser_enc(key, sezar.ptr);
On Wednesday, 2 December 2020 at 20:08:29 UTC, Jack wrote:
On Wednesday, 2 December 2020 at 19:42:37 UTC, Jack wrote:
D code:
[...]
compiled with:
[...]
called from:
[...]
but hinstLib is NULL and GetLastError() = 193:
[...]
What am I missing?
for same reason, the dll build
given the function:
export void ceaser_enc(char* input, ref char* output);
this compiles:
char* sezar = (new char[65]).ptr;
ceaser_enc(key, sezar);
this does not compile:
char[] sezar = new char[65];
ceaser_enc(key, sezar.ptr);
by yielding: "cannot pass rvalue argument cast(ch
On Wednesday, 2 December 2020 at 19:42:37 UTC, Jack wrote:
D code:
import core.sys.windows.dll;
mixin SimpleDllMain;
version(Windows) extern(C) export
int foo() { return 42; }
compiled with:
dmd -ofmydll.dll -shared -m32 dll.d
called from:
typedef int (__cdecl *MYPROC)(void);
int WINA
Now my slice works fine.
// Tipo Nulo.
class None {}
// Função slice()
auto slice(T1, T2, T3 = None)(T1 conteudo, T2 inicio, T3 fim =
T3.init) {
int start, end, startlen;
static if (is(T2 == int)) {inicio = inicio < 0 ? conteudo.length
+ inicio : inicio;}
static if (is(T3 == int))
D code:
import core.sys.windows.dll;
mixin SimpleDllMain;
version(Windows) extern(C) export
int foo() { return 42; }
compiled with:
dmd -ofmydll.dll -shared -m32 dll.d
called from:
typedef int (__cdecl *MYPROC)(void);
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
I try find a memory issue with ldc -betterC -g -fsanitize=address
-disable-fp-elim, get invalid path to external symbolizer!
Is there a way to print the symbol and line ?
=
==113433==ERROR: AddressSanitizer: heap-buffer-overflow
On Wednesday, 2 December 2020 at 12:59:52 UTC, Paul Backus wrote:
No, this is not a bug, because Nullable!T currently has an
implicit conversion to T via `alias this`. [1] However, this
implicit conversion is deprecated, and will be removed in a
future release. Once that happens, `isTuple!NT` w
On Wednesday, 2 December 2020 at 15:40:09 UTC, Adam D. Ruppe
wrote:
On Wednesday, 2 December 2020 at 11:46:26 UTC, Andre Pany wrote:
[...]
Function pointers don't really have parameter names. They are
allowed for user habit and documentation purposes, but the
compiler mostly* ignores them; t
On Wednesday, 2 December 2020 at 11:46:26 UTC, Andre Pany wrote:
alias fpt = extern(C) nothrow void function(int a, int b);
Function pointers don't really have parameter names. They are
allowed for user habit and documentation purposes, but the
compiler mostly* ignores them; they aren't actua
On Wednesday, 2 December 2020 at 11:46:26 UTC, Andre Pany wrote:
Hi,
I need to retrieve the parameter identifier but only empty
strings are returned:
tuple("", "")
``` d
alias fpt = extern(C) nothrow void function(int a, int b);
void main()
{
import std.traits : ParameterIdentifierTuple;
On Wednesday, 2 December 2020 at 05:25:09 UTC, Ben Jones wrote:
This seems like very surprising behavior to me. Is it a bug?
import std.typecons;
alias NT = Nullable!(Tuple!(int, double));
pragma(msg, isTuple!NT); //prints true!
No, this is not a bug, because Nullable!T currently has an
impl
On 12/1/20 5:18 PM, Johannes Loher wrote:
Am 01.12.20 um 14:55 schrieb drug:
On 12/1/20 2:40 PM, Johannes Loher wrote:
...
However, I am having trouble running the unit tests when using the
...
This can be one of solution https://github.com/dlang/dub/pull/2050
Thanks! Let's see if it gets
Hi,
I need to retrieve the parameter identifier but only empty
strings are returned:
tuple("", "")
``` d
alias fpt = extern(C) nothrow void function(int a, int b);
void main()
{
import std.traits : ParameterIdentifierTuple;
pragma(msg, ParameterIdentifierTuple!(fpt));
}
```
Where is
On Wednesday, 2 December 2020 at 06:31:49 UTC, H. S. Teoh wrote:
On Tue, Dec 01, 2020 at 10:49:55PM +, ddcovery via
Digitalmars-d-learn wrote:
Yesterday I really shocked when, comparing one algorithm
written in javascript and the equivalent in D, javascript
performed better!!!
[...]
With
25 matches
Mail list logo