thank you.
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.
On Tuesday, 27 October 2015 at 12:13:13 UTC, guodemone wrote:
sorry,My english is poot.
file asm.h
[...]
Can ldc work with C header files? I don't think it can but I
could be wrong.
Here's how I build my 32-bit bootloader and link with my kernel
main (you will have to replace names etc.):
On Wednesday, 28 October 2015 at 00:07:23 UTC, sigod wrote:
Only removed `filter` from code.
You know, I was just writing an answer for this and I kinda
changed my mind. Without filter... I think splitter.splitter
ought to work.
The implementation requires slicing unless you pass it a
pred
On Tuesday, 27 October 2015 at 22:56:07 UTC, sigod wrote:
On Tuesday, 27 October 2015 at 22:33:32 UTC, Adam D. Ruppe
wrote:
On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote:
P.S. Maybe I should repost my question on SO? I really
thought it was a bug, so I posted it here.
You could, bu
On Tuesday, 27 October 2015 at 22:53:35 UTC, Ali Çehreli wrote:
On 10/27/2015 03:34 PM, bioinfornatics wrote:
> I use FieldTypeTuple and FieldNameTuple to get type and
correponding
> field name but I fail to loop over these tuple.
You can use the .tupleof property and a compile-time foreach:
On Tuesday, 27 October 2015 at 22:33:32 UTC, Adam D. Ruppe wrote:
On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote:
P.S. Maybe I should repost my question on SO? I really thought
it was a bug, so I posted it here.
You could, but I'd say the same thing there
I don't expect different a
On Tuesday, 27 October 2015 at 21:50:31 UTC, Chris Piker wrote:
I get the following compile errors from the experimental logger
class:
/usr/include/dmd/phobos/std/experimental/logger/core.d(702):
Error: long has no effect in expression (cast(ubyte)160u)
Solved: Finally found how to set the
On 10/27/2015 03:34 PM, bioinfornatics wrote:
> I use FieldTypeTuple and FieldNameTuple to get type and correponding
> field name but I fail to loop over these tuple.
You can use the .tupleof property and a compile-time foreach:
http://dlang.org/class.html (Search for .tuplof on that page)
On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote:
P.S. Maybe I should repost my question on SO? I really thought
it was a bug, so I posted it here.
You could, but I'd say the same thing there - it is no bug, the
algorithm legitimately needs that functionality to split
successfully. At
Dear,
I use FieldTypeTuple and FieldNameTuple to get type and
correponding field name but I fail to loop over these tuple.
As example:
struct Person{
private string name;
private ushort age;
private bool isMale;
this(string name, ushort age, bool isMale){
this.nam
Well, problem boils down to `splitter` having a greater
constraints than most functions can meet.
Thanks everyone for clarification.
P.S. Maybe I should repost my question on SO? I really thought it
was a bug, so I posted it here.
On Tuesday, 27 October 2015 at 21:54:33 UTC, Jonathan M Davis
wrote:
Well, split calls splitter, and it doesn't make much of an
attempt to check its arguments in its template constraint,
mostly passing the buck onto splitter, since it's really just a
wrapper around splitter that calls array on
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote:
split's documentation says that it requires a ForwardRange but
the output of filter is an InputRange. (I can't imagine now why
split has that requirement.)
You need to .save at the beginning so when you hit the split
point, it ca
On 10/27/2015 02:55 PM, Adam D. Ruppe wrote:
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote:
split's documentation says that it requires a ForwardRange but the
output of filter is an InputRange. (I can't imagine now why split has
that requirement.)
You need to .save at the begi
Using DMD64 (v2.068.2) on Linux CentOS 6.7, compiler was
downloaded
from this link:
http://downloads.dlang.org/releases/2.x/2.068.2/dmd-2.068.2-0.fedora.x86_64.rpm
I get the following compile errors from the experimental logger
class:
/usr/include/dmd/phobos/std/experimental/logger/core.d(70
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote:
On 10/27/2015 01:58 PM, sigod wrote:
Here's simple code:
import std.algorithm;
import std.array;
import std.file;
void main(string[] args)
{
auto t = args[1].readText()
.splitter('\n'
On Tuesday, October 27, 2015 20:58:56 sigod via Digitalmars-d-learn wrote:
> Here's simple code:
>
> import std.algorithm;
> import std.array;
> import std.file;
>
> void main(string[] args)
> {
> auto t = args[1].readText()
> .splitter('\n')
> .filter!(e => e.le
On 10/27/2015 01:58 PM, sigod wrote:
Here's simple code:
import std.algorithm;
import std.array;
import std.file;
void main(string[] args)
{
auto t = args[1].readText()
.splitter('\n')
.filter!(e => e.length)
.split("---")
On Tuesday, 27 October 2015 at 21:28:31 UTC, Adam D. Ruppe wrote:
On Tuesday, 27 October 2015 at 21:23:45 UTC, TheFlyingFiddle
wrote:
I can account for the first thing a vtable. But that
should only cover 4bytes. What's in the other 4bytes?
The monitor used for `synchronized`.
(yes, this is s
On Tuesday, 27 October 2015 at 21:23:45 UTC, TheFlyingFiddle
wrote:
I can account for the first thing a vtable. But that
should only cover 4bytes. What's in the other 4bytes?
The monitor used for `synchronized`.
(yes, this is something a lot of people want to remove as it is
rarely all that u
With this code:
class A { }
pragma(msg, __traits(classInstanceSize, A));
I get the output 8 (32-bit).
I can account for the first thing a vtable. But that
should only cover 4bytes. What's in the other 4bytes?
Here's simple code:
import std.algorithm;
import std.array;
import std.file;
void main(string[] args)
{
auto t = args[1].readText()
.splitter('\n')
.filter!(e => e.length)
Asm + D with the ability to write on behalf of Clang bootloader,
and prove that he can completely replace Clang.
This is my wish.
You chose quite advanced topic. Maybe you want to build common
skills in system programming first?
sorry,My english is poot.
file asm.h
/*
是bootasm.S汇编文件所需要的头文件,主要是一些与X86保护模式的段访问方式相关的宏定义
*/
#ifndef __BOOT_ASM_H__
#define __BOOT_ASM_H__
/* Assembler macros to create x86 segments */
/* Normal segment */
#define SEG_NULLASM
On Tuesday, 27 October 2015 at 08:41:24 UTC, Andrea Fontana wrote:
Template mixins can be used only for declaration.
Thanks for the quick reply! I didn't know that. Now the error
message makes sense.
Probably what you need is a (non-template) mixin.
Yes, it's gonna be a string mixin, or a
Thanks all for the answers, I'll investigate all.
On Tuesday, 27 October 2015 at 07:56:51 UTC, SimonN wrote:
Hi,
I'd like to generate several very similar class methods with a
mixin template.
The mixin template shall take alias parameters, so that
different methods can
bind it to different fields. Reduced problem case:
Template mixins can
Hi,
I'd like to generate several very similar class methods with a
mixin template.
The mixin template shall take alias parameters, so that different
methods can
bind it to different fields. Reduced problem case:
class A {
int myField;
mixin template fieldSetter(alias what
30 matches
Mail list logo