Sample output:
Initializing.
User logged on: true
Starting request.
hid: 4838393704146785693
..
Request completed: NumberOfCurrentPlayers_t(1, 5828)
Terminating.
Not present: any indication that the registered callresult was
executed.
On Saturday, 9 June 2018 at 03:07:39 UTC, cc wrote:
I've put together a simplified test program here (124KB):
Here is a pastebin of the D source file updated with some
additional comments at the end with the callback class
definitions from the original header files
On Friday, 8 June 2018 at 07:32:54 UTC, evilrat wrote:
On Friday, 8 June 2018 at 06:59:51 UTC, cc wrote:
On Friday, 8 June 2018 at 02:52:10 UTC, Mike Parker wrote:
On Friday, 8 June 2018 at 00:55:35 UTC, cc wrote:
class CImpl : CCallbackBase {
extern(C++) {
If anyone has any
On 06/08/2018 11:13 AM, Brian wrote:
> Like:
>
> class A
> {
> string b;
> string c;
> }
>
> compile-time to:
>
> class A
> {
> string _b;
> string c;
> }
>
> or:
>
> class A
> {
> string c;
> }
>
If these are your classes you can use static if or version:
version = Z;
On 6/8/18 2:13 PM, Brian wrote:
Like:
class A
{
string b;
string c;
}
compile-time to:
class A
{
string _b;
string c;
}
or:
class A
{
string c;
}
Not possible in D. What you are looking for is an AST macro, and D does
not have those.
However, you can
Writing a single value to binary file can be done in (at least)
two ways. Let `f` be a `File`:
```
f.rawWrite(()[0 .. 1]);
```
or
```
f.lockingBinaryWriter.put(value);
```
The former way is little talked about, the latter is not even
documented. As far as I can see, the latter resolves to
On Friday, June 08, 2018 03:51:11 David Bennett via Digitalmars-d-learn
wrote:
> On Thursday, 7 June 2018 at 04:58:40 UTC, Jonathan M Davis wrote:
> > It would be trivial enough to create a wrapper template so that
> > you can do something like
> >
> > immutable n = ctfe!(foo());
> >
> > e.g.
> >
On Friday, 8 June 2018 at 17:09:54 UTC, H. S. Teoh wrote:
I would, if I had the time to spare to make such a chart.
Perhaps you (or somebody here) could do it? It *is* a wiki,
after all. Y'all don't have to wait for me to get around to
it, the edit button is right there.
T
Fair
On Thursday, June 07, 2018 22:43:50 aliak via Digitalmars-d-learn wrote:
> On Thursday, 7 June 2018 at 21:32:54 UTC, Jonathan M Davis wrote:
> > struct S
> > {
> >
> > int* ptr = new int(42);
> >
> > }
>
> Is that supposed to compile? -> https://run.dlang.io/is/SjUEOu
>
> Error: cannot use
Like:
class A
{
string b;
string c;
}
compile-time to:
class A
{
string _b;
string c;
}
or:
class A
{
string c;
}
On Fri, Jun 08, 2018 at 02:57:26PM +, jmh530 via Digitalmars-d-learn wrote:
[...]
> May I suggest that you add a flow chart that gives a very high level
> understanding of the compiler steps. Like how Rust's introduction to
> MIR has:
> https://blog.rust-lang.org/2016/04/19/MIR.html
I would,
On Fri, Jun 08, 2018 at 02:36:01PM +, Gopan via Digitalmars-d-learn wrote:
> On Friday, 8 June 2018 at 05:10:16 UTC, H. S. Teoh wrote:
> > All this talk of CTFE and "compile-time", along with the confusion
> > that arises from conflating everything done by the compiler into the
> > blanket
I'm trying to create a template class that can be parameterized
with a module and will be able to serialize and deserialize (and
more) all types in that module and submodules that have a
specific UDA or superclass.
My initial idea was to do a recursive search for types by
starting from the
On Friday, 8 June 2018 at 05:10:16 UTC, H. S. Teoh wrote:
All this talk of CTFE and "compile-time", along with the
confusion that arises from conflating everything done by the
compiler into the blanket term "compile-time" makes me want to
scream:
On Friday, 8 June 2018 at 05:10:16 UTC, H. S. Teoh wrote:
All this talk of CTFE and "compile-time", along with the
confusion that arises from conflating everything done by the
compiler into the blanket term "compile-time" makes me want to
scream:
On 06/08/2018 10:52 AM, Flaze07 wrote:
ah...well thank you, well...I did finds another way, but it is probably
better to use linearRemove
I used
arr = make!( Array!uint )( remove( arr[], 2 );
so linearRemove is probably better
Instead of creating a new array, you could update the length of
On Wednesday, 6 June 2018 at 14:46:56 UTC, ag0aep6g wrote:
On 06/06/2018 04:20 PM, Flaze07 wrote:
hmm, and sorry for asking more, what about removing an element
from it ? I found no remove operation that can remove from the
middle ( removeAny and removeBack both removes the latest
element,
On Friday, 8 June 2018 at 08:06:27 UTC, Arafel wrote:
On Thursday, 7 June 2018 at 13:07:21 UTC, evilrat wrote:
I don't think so. It clearly states that children must mixin
too, which can mean it just grabs symbols in scope only, and
base class has no way of knowing about its subclasses. It
On Friday, 8 June 2018 at 03:08:21 UTC, Mike Franklin wrote:
I recall similar issues with a project I was working on, but I
don't remember all the details now. Anyway, I ended up with
this in the end.
Using main() instead of WinMain() did the trick too. Also it's
simpler, so I choose this
On Thursday, 7 June 2018 at 13:07:21 UTC, evilrat wrote:
I don't think so. It clearly states that children must mixin
too, which can mean it just grabs symbols in scope only, and
base class has no way of knowing about its subclasses. It also
has "agressive mode" that will make metadata for
On Friday, 8 June 2018 at 02:44:13 UTC, Mike Parker wrote:
...you can get it with this:
dmd -m64 -L/SUBSYSTEM:console -L/ENTRY:WinMainCRTStartup foo.d
Thank You! It works with LDC -m64 as well.
And now that I repaired my VCRedist2015 the bat file test (my
second code example) is working too.
On Friday, 8 June 2018 at 06:59:51 UTC, cc wrote:
On Friday, 8 June 2018 at 02:52:10 UTC, Mike Parker wrote:
On Friday, 8 June 2018 at 00:55:35 UTC, cc wrote:
class CImpl : CCallbackBase {
extern(C++) {
If anyone has any insight to provide it would be greatly
appreciated, thanks!
On Friday, 8 June 2018 at 02:52:10 UTC, Mike Parker wrote:
On Friday, 8 June 2018 at 00:55:35 UTC, cc wrote:
class CImpl : CCallbackBase {
extern(C++) {
If anyone has any insight to provide it would be greatly
appreciated, thanks!
I've not used any of the C++ interfacing features
On Friday, 8 June 2018 at 00:55:35 UTC, cc wrote:
I've defined it in D, as per
https://dlang.org/spec/cpp_interface.html#classes :
change this to class, or even abstract class as shown in example
extern(C++) {
interface CCallbackBase {
//this() { m_nCallbackFlags
24 matches
Mail list logo