very very thank you

2015-10-28 Thread guodemone via Digitalmars-d-learn
衷心的谢谢你,(very veryvery thank you in english)

Re: Can you give me your files[kickstart32.s kmain.d linker32.ld makefile]?

2015-10-28 Thread lobo via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 11:01:14 UTC, guodemone wrote: My english is poor. My code to build is wrong.so need make some improvements. I would like to refer to your 32-bit code, make some improvements. My Email: 704975...@qq.com very very thank you. I've uploaded a dummy kernel wit

Re: Get type from string

2015-10-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 17:57:16 UTC, DarkRiDDeR wrote: Thank you! Is it possible to call a method from a string at run time? Yes, though you have to prepare code to do it. Again, I'd try to make it work on interfaces on some level. The free sample chapter of my book https://www.pa

Re: Get type from string

2015-10-28 Thread DarkRiDDeR via Digitalmars-d-learn
Thank you! Is it possible to call a method from a string at run time?

Re: Get type from string

2015-10-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 17:38:45 UTC, DarkRiDDeR wrote: string name = "Bob"; __traits(getMember, Types.getType(name), "print")(); How can you implement "Types.getType(name)"? I do not know in advance what can be the class names. You don't. __traits works at compile time, the string i

Get type from string

2015-10-28 Thread DarkRiDDeR via Digitalmars-d-learn
Example: class Bob { static void print () { write("str"); } } string name = "Bob"; __traits(getMember, Types.getType(name), "print")(); How can you implement "Types.getType(name)"? I do not know in advance what can be the class names.

Re: How coding bootloader with (Asm+Dlang)?

2015-10-28 Thread tcak via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 15:23:11 UTC, guodemone wrote: I would like to use (Dlang + nasm) to write bootloader, how to write? Start from here: http://wiki.osdev.org/D_Bare_Bones I would suggest you to start by learning to do it with C first though. There are too many documents about

Re: D bindings for Bonjour

2015-10-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 17:07:32 UTC, Vincent R wrote: Sorry to ask so much question but how do you declare different calling conventions like the following macro: This specific case is common enough to be built into the language: use `extern(System)` instead of Windows or C and the

Re: D bindings for Bonjour

2015-10-28 Thread Vincent R via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 16:53:15 UTC, Daniel Kozák wrote: V Wed, 28 Oct 2015 16:36:32 + Vincent R via Digitalmars-d-learn napsáno: On Wednesday, 28 October 2015 at 16:12:08 UTC, Vincent R wrote: > On Wednesday, 28 October 2015 at 16:09:02 UTC, Cauterite > wrote: >> On Wednesday

Re: D bindings for Bonjour

2015-10-28 Thread Daniel Kozák via Digitalmars-d-learn
V Wed, 28 Oct 2015 16:36:32 + Vincent R via Digitalmars-d-learn napsáno: > On Wednesday, 28 October 2015 at 16:12:08 UTC, Vincent R wrote: > > On Wednesday, 28 October 2015 at 16:09:02 UTC, Cauterite wrote: > >> On Wednesday, 28 October 2015 at 16:04:52 UTC, Vincent R wrote: > >>> [...]

Re: D bindings for Bonjour

2015-10-28 Thread Vincent R via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 16:12:08 UTC, Vincent R wrote: On Wednesday, 28 October 2015 at 16:09:02 UTC, Cauterite wrote: On Wednesday, 28 October 2015 at 16:04:52 UTC, Vincent R wrote: [...] enum kDNSServiceOutputFlags = (kDNSServiceFlagsValidate | kDNSServiceFlagsValidateOptional | k

Re: I'm getting an unhelpful linker error, what've I got wrong?

2015-10-28 Thread Kagamin via Digitalmars-d-learn
streamint writebuffer(in ubyte[] buffer); final streamint writebuffer(T)(in T* buffer, in streamint count){ return this.writebuffer(cast(ubyte[])buffer[0..count]); }

D bindings for Bonjour

2015-10-28 Thread Vincent R via Digitalmars-d-learn
Hi, I am starting my first project in D and I would like to do a Bonjour(Zeroconf) browser app. My first task is to write a binding to the dns_sd library but I have an issue with the following macro: #define kDNSServiceOutputFlags (kDNSServiceFlagsValidate | kDNSServiceFlagsValidateOptional

Re: D bindings for Bonjour

2015-10-28 Thread Vincent R via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 16:09:02 UTC, Cauterite wrote: On Wednesday, 28 October 2015 at 16:04:52 UTC, Vincent R wrote: [...] enum kDNSServiceOutputFlags = (kDNSServiceFlagsValidate | kDNSServiceFlagsValidateOptional | kDNSServiceFlagsMoreComing | kDNSServiceFlagsAdd | kDNSServiceFla

Re: D bindings for Bonjour

2015-10-28 Thread Cauterite via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 16:04:52 UTC, Vincent R wrote: Hi, I am starting my first project in D and I would like to do a Bonjour(Zeroconf) browser app. My first task is to write a binding to the dns_sd library but I have an issue with the following macro: #define kDNSServiceOutputFla

How coding bootloader with (Asm+Dlang)?

2015-10-28 Thread guodemone via Digitalmars-d-learn
I would like to use (Dlang + nasm) to write bootloader, how to write?

Re: I'm getting an unhelpful linker error, what've I got wrong?

2015-10-28 Thread pineapple via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 12:06:14 UTC, Kagamin wrote: On Wednesday, 28 October 2015 at 11:48:27 UTC, pineapple wrote: There's also a writebuffer method in the interface with this signature, though: streamint writebuffer(T)(in T* buffer, in streamint count); Interface can't have t

Re: I'm getting an unhelpful linker error, what've I got wrong?

2015-10-28 Thread tcak via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 11:48:27 UTC, pineapple wrote: On Wednesday, 28 October 2015 at 11:40:14 UTC, tcak wrote: The "writebuffer" is defined to take an array as parameter. Yet, you are passing a pointer and a length to it. Instead, pass the parameter "str" to it directly. Also, you d

Re: I'm getting an unhelpful linker error, what've I got wrong?

2015-10-28 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 11:48:27 UTC, pineapple wrote: There's also a writebuffer method in the interface with this signature, though: streamint writebuffer(T)(in T* buffer, in streamint count); Interface can't have templated virtual instance methods.

Re: I'm getting an unhelpful linker error, what've I got wrong?

2015-10-28 Thread pineapple via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 11:40:14 UTC, tcak wrote: The "writebuffer" is defined to take an array as parameter. Yet, you are passing a pointer and a length to it. Instead, pass the parameter "str" to it directly. Also, you do not have to put "!char" to there. Compiler will solve it out b

Re: I'm getting an unhelpful linker error, what've I got wrong?

2015-10-28 Thread tcak via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 11:11:01 UTC, pineapple wrote: When I attempt to compile my code I get the same linker error with both dmd and ldc2. I know where the problematic code is, as I don't get the error when I comment out lines 102 through 107, but I don't understand why it's bad. I m

I'm getting an unhelpful linker error, what've I got wrong?

2015-10-28 Thread pineapple via Digitalmars-d-learn
When I attempt to compile my code I get the same linker error with both dmd and ldc2. I know where the problematic code is, as I don't get the error when I comment out lines 102 through 107, but I don't understand why it's bad. I must have some misconceptions about how templates work? Is there

Can you give me your files[kickstart32.s kmain.d linker32.ld makefile]?

2015-10-28 Thread guodemone via Digitalmars-d-learn
My english is poor. My code to build is wrong.so need make some improvements. I would like to refer to your 32-bit code, make some improvements. My Email: 704975...@qq.com very very thank you.

My email

2015-10-28 Thread guodemone via Digitalmars-d-learn
704975...@qq.com very very thank you.