On Saturday, 10 February 2018 at 06:32:43 UTC, German Diago wrote:
Hello everyone,
I am trying to forward some member functions from a struct as a
Catch-all function, so I did something like this:
struct A {
struct HeaderData {
align(1):
char [21] id;
On Saturday, 10 February 2018 at 06:32:43 UTC, German Diago wrote:
The mixin line does not work. I want to generate the access to
the field. How could I achieve that?
struct Outer
{
struct Inner
{
int a;
float b;
}
Inner i;
Hello everyone,
I am trying to forward some member functions from a struct as a
Catch-all function, so I did something like this:
struct A {
struct HeaderData {
align(1):
char [21] id;
ubyte field1;
ubyte field2;
}
Nullable!(
On Saturday, 10 February 2018 at 02:08:50 UTC, Alex wrote:
Inside of the struct E I define more then one static array.
Namely, one for each Typedef I plan to instantiate. The
Typedefs have to be known at compile time, so the amount of
them has to be known by me :)
Then, during the initializatio
On Tuesday, 6 February 2018 at 23:03:07 UTC, dekevin wrote:
Hello everyone,
I just ran into the problem, that I need a static variable,
where the initialisation code for that variable is only
accessible during run-time (since part of the initialisation
code will be dynamically linked).
Is th
On Saturday, 10 February 2018 at 01:23:20 UTC, Ali Çehreli wrote:
>
> Yup. They are shared by two Typedef instantiations with
different cookies.
>
> So...
> The question is two-fold:
> Would it help to alter the init value of the Typedef?
> If yes, how to alter it?
> If no, is this a bug?
I thin
On 02/09/2018 05:14 PM, Alex wrote:
>> > struct E
>> > {
>> > size_t i;
>> > static T[] tarr;
>>
>> To save time to others, note that 'tarr' is a static member that ends
>> up being shared by two Typedef instantiations.
>
> Yup. They are shared by two Typedef instantiations with differe
On Saturday, 10 February 2018 at 01:01:39 UTC, Ali Çehreli wrote:
On 02/09/2018 03:45 PM, Alex wrote:
> A question about Typedef usage:
> Say, I have the following circumstances
>
> /// --- code --- ///
>
> import std.typecons;
>
> void main()
> {
> MyEA ea;
> MyEB eb;
> ea.tarr.le
On 02/09/2018 03:45 PM, Alex wrote:
> A question about Typedef usage:
> Say, I have the following circumstances
>
> /// --- code --- ///
>
> import std.typecons;
>
> void main()
> {
> MyEA ea;
> MyEB eb;
> ea.tarr.length = 5;
> static assert(!is(MyEA == MyEB));
> static as
A question about Typedef usage:
Say, I have the following circumstances
/// --- code --- ///
import std.typecons;
void main()
{
MyEA ea;
MyEB eb;
ea.tarr.length = 5;
static assert(!is(MyEA == MyEB));
static assert(!is(MyEA == E));
static assert(!i
On Friday, 9 February 2018 at 21:39:22 UTC, Adam D. Ruppe wrote:
On Friday, 9 February 2018 at 21:31:29 UTC, ShadoLight wrote:
[1] https://run.dlang.io/is/dyElXg
There's missing quotes in there:
Line 14:
code ~= "push(call!"~piece~"(pop(), pop()));\n";
Should be:
code ~= "push(call!\""~piec
On Friday, 9 February 2018 at 21:31:29 UTC, ShadoLight wrote:
writeln(parse(code)); // to aid with debugging
writeln(convertToD(parse(code))); // debugging aid
..to..
writeln(parse(code)[]); // to aid with debugging
writeln(convertToD(parse(
On Friday, 9 February 2018 at 21:31:29 UTC, ShadoLight wrote:
[1] https://run.dlang.io/is/dyElXg
There's missing quotes in there:
Line 14:
code ~= "push(call!"~piece~"(pop(), pop()));\n";
Should be:
code ~= "push(call!\""~piece~"\"(pop(), pop()));\n";
That might have been an error in the o
Hi,
Trying to improve my CT-fu, I looked at a DSL example (chapter 9)
in Adam's D-Cookbook. Although I am sure Adam's original examples
would have worked, there were some errors in the example code in
the book.
The example also contains some code to allow you to test the
functions at RT, wh
On Friday, 9 February 2018 at 18:14:06 UTC, Mike Wey wrote:
You may need to pass `/s` to implib so it will add the
underscore to the symbol in the import library. If it's
actually needed depends on what the dll uses.
That did it, now both dynamic loading and dynamic linking work.
:) Thanks bo
On Thursday, 8 February 2018 at 21:09:33 UTC, JN wrote:
Hi,
is there any way to debug binaries on Windows? I'd at least
like to know which line of code made it crash. If it's D code,
I get a call trace usually, but if it's a call to a C library,
I get a crash and that's it. I am using VSCode
On 09-02-18 15:04, Dennis wrote:
I read the Derelict documentation a while ago, I didn't grasp all of it.
Reading it again, I can now make sense of it though. :)
On Friday, 9 February 2018 at 12:53:44 UTC, Mike Parker wrote:
Did you link with the library you created with implib? That linker
er
On Fri, 09 Feb 2018 15:48:54 +, Nicholas Wilson wrote:
> On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:
>> On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:
>>> Is there a way I can see/log what requests are being made? I can
>>> change both the client and server.
>>
On Fri, Feb 09, 2018 at 03:05:33PM +, Ralph Doncaster via
Digitalmars-d-learn wrote:
> This seems odd to me. Is there a way I can make a function that takes
> an array of any type but only of a specific size in bytes?
>
> void.d(8): Error: function void.foo (void[12] arr) is not callable
> u
On Friday, 9 February 2018 at 16:28:50 UTC, Nicholas Wilson wrote:
On Friday, 9 February 2018 at 15:50:24 UTC, Ralph Doncaster
wrote:
Is there a way I can make a function that takes an array of any
type but only of a specific size in bytes?
With a template that constrains the types size:
void
On Friday, 9 February 2018 at 15:50:24 UTC, Ralph Doncaster wrote:
On Friday, 9 February 2018 at 15:24:27 UTC, Mike Parker wrote:
On Friday, 9 February 2018 at 15:05:33 UTC, Ralph Doncaster
wrote:
This seems odd to me. Is there a way I can make a function
that takes an array of any type but on
On Friday, 9 February 2018 at 15:24:27 UTC, Mike Parker wrote:
On Friday, 9 February 2018 at 15:05:33 UTC, Ralph Doncaster
wrote:
This seems odd to me. Is there a way I can make a function
that takes an array of any type but only of a specific size in
bytes?
void.d(8): Error: function void.f
On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
Is there a way I can see/log what requests are being made? I
can change both the client and server.
-v and -vv
So it turns out that structs do not work as parameters TO
On Friday, 9 February 2018 at 14:51:30 UTC, Mike Parker wrote:
Where was the lib file located? Was it in the root project
directory? How are you compiling your project? What does your
directory tree look like?
(...)
That depends. Is that the directory where your executable is
written? Are you
On Friday, 9 February 2018 at 15:24:27 UTC, Mike Parker wrote:
import std.stdio;
enum numBytes = 12;
void foo(T, size_t N)(T[N] arr)
if((N * T.sizeof) == numBytes)
{
writeln(arr);
}
void bar(ubyte[12] arr)
{
writeln(arr);
}
Also, it's worth mentioning in case you aren't
On Friday, 9 February 2018 at 15:05:33 UTC, Ralph Doncaster wrote:
This seems odd to me. Is there a way I can make a function
that takes an array of any type but only of a specific size in
bytes?
void.d(8): Error: function void.foo (void[12] arr) is not
callable using argument types (uint[3]
This seems odd to me. Is there a way I can make a function that
takes an array of any type but only of a specific size in bytes?
void.d(8): Error: function void.foo (void[12] arr) is not
callable using argument types (uint[3])
Failed: ["/usr/bin/dmd", "-v", "-o-", "void.d", "-I."]
void foo(vo
On Friday, 9 February 2018 at 14:04:05 UTC, Dennis wrote:
I added `pragma(lib, "mupen64plus.lib");` above the extern(C)
block.
Adding `libs "mupen64plus"` to dub.sdl doesn't make a
difference.
Where was the lib file located? Was it in the root project
directory? How are you compiling your pr
I read the Derelict documentation a while ago, I didn't grasp all
of it. Reading it again, I can now make sense of it though. :)
On Friday, 9 February 2018 at 12:53:44 UTC, Mike Parker wrote:
Did you link with the library you created with implib? That
linker error suggests you didn't.
I added
On Friday, 9 February 2018 at 11:46:31 UTC, Nicholas Wilson wrote:
On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
Is there a way I can see/log what requests are being made? I
can change both the client and server.
-v
On Friday, 9 February 2018 at 12:15:04 UTC, Dennis wrote:
I presume the .dll isn't loaded properly (if at all), but I
can't find a load function in the .lib and don't know how to
debug this. So I guess I'll just do it manually since that
works, but does anyone have some tips to make .dll bin
On Friday, 9 February 2018 at 12:15:04 UTC, Dennis wrote:
I found the IMPLIB tool
(http://www.digitalmars.com//ctg/implib.html) and made a .lib
for the .dll and at first I got:
Error 42: Symbol Undefined _CoreGetAPIVersions
Error: linker exited with status 1
Forgot to address this in the p
On Friday, 9 February 2018 at 11:46:31 UTC, Nicholas Wilson wrote:
On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
Is there a way I can see/log what requests are being made? I
can change both the client and server.
-v
I want to bind to a .dll on Windows, so I looked at how Derelict
packages are doing it and found it does it like this:
```
extern(C) {
alias da_CoreGetAPIVersions = m64p_error
function(int*,int*,int*,int*);
...
}
__gshared {
da_CoreGetAPIVersions CoreGetAPIVersions;
...
}
protected o
On Thursday, 8 February 2018 at 20:24:19 UTC, Nicholas Wilson
wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
I have set up a vibe.d rest interface (on a server) and have a
client on my machine.
struct Observation
{
string desc;
DateTime time;
}
interface O
On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
Is there a way I can see/log what requests are being made? I
can change both the client and server.
-v and -vv
All that gives me is a bunch of
[FAC3BFF6:FAC451F6 dia] A
On Thursday, 8 February 2018 at 21:09:33 UTC, JN wrote:
Hi,
is there any way to debug binaries on Windows? I'd at least
like to know which line of code made it crash. If it's D code,
I get a call trace usually, but if it's a call to a C library,
I get a crash and that's it. I am using VSCode
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
Is there a way I can see/log what requests are being made? I
can change both the client and server.
-v and -vv
38 matches
Mail list logo