Re: d bare bones

2013-09-06 Thread Ramon
On Saturday, 7 September 2013 at 05:35:04 UTC, H. S. Teoh wrote: I find that it's much more convincing for me to say "feature X is broken, here's the code change to make it better", than to say "feature X is broken, D sucks, you lazy bums better start working to fix X or else I'm leaving". It

Re: d bare bones

2013-09-06 Thread H. S. Teoh
On Sat, Sep 07, 2013 at 05:35:48AM +0200, Ramon wrote: [...] > I'm sorry, honestly sorry, that I myself can not (yet) contribute > much more than thoughts and constructive(!) criticism. I'm working > on it and - thanks to Iain (I was just a split second away from > leaving D) - I stayed. That's not

Re: d bare bones

2013-09-06 Thread Ramon
On Saturday, 7 September 2013 at 00:05:08 UTC, Dicebot wrote: On Friday, 6 September 2013 at 19:24:22 UTC, Ramon wrote: Frankly, when hacking the kernel you use C, period. There are alternatives, Ada for instance but they have a price tag too. And D, with all the warm feelings we might have for

Re: d bare bones

2013-09-06 Thread Dicebot
On Friday, 6 September 2013 at 19:24:22 UTC, Ramon wrote: Frankly, when hacking the kernel you use C, period. There are alternatives, Ada for instance but they have a price tag too. And D, with all the warm feelings we might have for it, is not one of those alternatives. Lot of confusion com

Re: d bare bones

2013-09-06 Thread Ramon
eles Risking to find myself in hot water ... I think that gc is grossly overestimated and it's too often painted in promised land colours. For one, there are, of course, trade offs; sometimes gc's advantages outweigh the disadvantages, sometimes not and close to hardware basically hardly ever

Re: d bare bones

2013-09-06 Thread eles
On Friday, 6 September 2013 at 19:24:22 UTC, Ramon wrote: Let's be honest. D, as Iain correctly indicated, is a userland language Unfortunately, in this case, it brings to my actual workplace nothing more than does C#. And we already use the latter for GUI and so on. When really needed some p

Re: d bare bones

2013-09-06 Thread Jacob Carlborg
On 2013-09-06 11:35, eles wrote: I am starting a new thread, since I am afraid that the other one will become too cluttered with issues... It is about this OS kernel: http://wiki.osdev.org/D_Bare_Bones I tried to duplicate the steps. However, on my x86_64 machine, the actual commands that I ha

Re: d bare bones

2013-09-06 Thread Ramon
OK, OK, completely overblown but for the sake of the point: Well, if you bend and strip down Clarion or php far enough, you might use it for a kernel, too. Frankly, when hacking the kernel you use C, period. There are alternatives, Ada for instance but they have a price tag too. And D, with all

Re: d bare bones

2013-09-06 Thread eles
On Friday, 6 September 2013 at 17:09:03 UTC, Leandro Lucarella wrote: eles, el 6 de September a las 16:20 me escribiste: On Friday, 6 September 2013 at 14:09:15 UTC, Iain Buclaw wrote: >On 6 September 2013 14:13, Dicebot wrote: >>On Friday, 6 September 2013 at 12:25:56 UTC, eles wrote: >>> >>>

Re: d bare bones

2013-09-06 Thread Leandro Lucarella
eles, el 6 de September a las 16:20 me escribiste: > On Friday, 6 September 2013 at 14:09:15 UTC, Iain Buclaw wrote: > >On 6 September 2013 14:13, Dicebot wrote: > >>On Friday, 6 September 2013 at 12:25:56 UTC, eles wrote: > >>> > >>>On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw > >>>w

Re: d bare bones

2013-09-06 Thread eles
On Friday, 6 September 2013 at 13:47:47 UTC, Dicebot wrote: I think you need own light-weight runtime stubs linked with the binary. Adam has done some nice experiments in that direction : http://arsdnet.net/dcode/minimal.zip Thank you, you are kind, I hope to have an working example. But, wit

Re: d bare bones

2013-09-06 Thread Iain Buclaw
On 6 September 2013 14:34, eles wrote: > On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote: >> >> On 6 September 2013 10:35, eles wrote: >> Back to volatile the only (faintly close) alternative is 'shared'. > > > After some thinking, it wasn't about synchronization between thread

Re: d bare bones

2013-09-06 Thread Iain Buclaw
On 6 September 2013 14:13, Dicebot wrote: > On Friday, 6 September 2013 at 12:25:56 UTC, eles wrote: >> >> On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote: >>> >>> On 6 September 2013 10:35, eles wrote: >>> But there's no equivalent to volatile statements other than >>> implementi

Re: d bare bones

2013-09-06 Thread Dicebot
On Friday, 6 September 2013 at 14:09:15 UTC, Iain Buclaw wrote: And all I'm saying is that if you want to use it on bare metal then you have to strip out phobos and re-implement everything from druntime. I am mostly aware of this and have studied Xomb sources and runtime reimplementation quit

Re: d bare bones

2013-09-06 Thread eles
On Friday, 6 September 2013 at 14:10:06 UTC, Iain Buclaw wrote: On 6 September 2013 14:34, eles wrote: On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote: On 6 September 2013 10:35, eles wrote: *p=3; a=*p; 'p' should be marked as 'shared' in this instance. That will help,

Re: d bare bones

2013-09-06 Thread eles
On Friday, 6 September 2013 at 14:09:15 UTC, Iain Buclaw wrote: On 6 September 2013 14:13, Dicebot wrote: On Friday, 6 September 2013 at 12:25:56 UTC, eles wrote: On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote: On 6 September 2013 10:35, eles wrote: And all I'm saying is t

Re: d bare bones

2013-09-06 Thread Dicebot
On Friday, 6 September 2013 at 13:34:33 UTC, eles wrote: Any clues? I think you need own light-weight runtime stubs linked with the binary. Adam has done some nice experiments in that direction : http://arsdnet.net/dcode/minimal.zip

Re: d bare bones

2013-09-06 Thread eles
On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote: On 6 September 2013 10:35, eles wrote: Back to volatile the only (faintly close) alternative is 'shared'. After some thinking, it wasn't about synchronization between threads as the error message was misleading. Was not abou

Re: d bare bones

2013-09-06 Thread Dicebot
On Friday, 6 September 2013 at 12:25:56 UTC, eles wrote: On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote: On 6 September 2013 10:35, eles wrote: But there's no equivalent to volatile statements other than implementing your own low level thread library for use in kernel-land to

Re: d bare bones

2013-09-06 Thread Iain Buclaw
On 6 September 2013 13:25, eles wrote: > On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote: >> >> On 6 September 2013 10:35, eles wrote: >> But there's no equivalent to volatile statements other than >> implementing your own low level thread library for use in kernel-land >> to all

Re: d bare bones

2013-09-06 Thread eles
On Friday, 6 September 2013 at 10:43:38 UTC, Iain Buclaw wrote: On 6 September 2013 10:35, eles wrote: But there's no equivalent to volatile statements other than implementing your own low level thread library for use in kernel-land to allow synchronized to work properly. Frankly, but each

Re: Newbie GDC issues

2013-09-06 Thread eles
On Friday, 6 September 2013 at 10:35:15 UTC, Iain Buclaw wrote: On 6 September 2013 10:15, eles wrote: On Friday, 6 September 2013 at 07:55:39 UTC, Iain Buclaw wrote: On 6 September 2013 08:32, eles wrote: On Thursday, 5 September 2013 at 23:49:18 UTC, Ramon wrote: I'll have to give it a t

Re: d bare bones

2013-09-06 Thread Iain Buclaw
On 6 September 2013 10:35, eles wrote: > I am starting a new thread, since I am afraid that the other one will become > too cluttered with issues... > > It is about this OS kernel: > > http://wiki.osdev.org/D_Bare_Bones > > I tried to duplicate the steps. However, on my x86_64 machine, the actual

Re: Newbie GDC issues

2013-09-06 Thread Iain Buclaw
On 6 September 2013 10:15, eles wrote: > On Friday, 6 September 2013 at 07:55:39 UTC, Iain Buclaw wrote: >> >> On 6 September 2013 08:32, eles wrote: >>> >>> On Thursday, 5 September 2013 at 23:49:18 UTC, Ramon wrote: >> >> In today's gdc implementation (back then I believe that was for D1) - >>

d bare bones

2013-09-06 Thread eles
I am starting a new thread, since I am afraid that the other one will become too cluttered with issues... It is about this OS kernel: http://wiki.osdev.org/D_Bare_Bones I tried to duplicate the steps. However, on my x86_64 machine, the actual commands that I had to use are: $nasm -f elf -o

Re: Newbie GDC issues

2013-09-06 Thread eles
On Friday, 6 September 2013 at 07:55:39 UTC, Iain Buclaw wrote: On 6 September 2013 08:32, eles wrote: On Thursday, 5 September 2013 at 23:49:18 UTC, Ramon wrote: In today's gdc implementation (back then I believe that was for D1) - you'd have to use -fno-emit-moduleinfo (maybe I should rever

Re: Newbie GDC issues

2013-09-06 Thread Iain Buclaw
On 6 September 2013 08:32, eles wrote: > On Thursday, 5 September 2013 at 23:49:18 UTC, Ramon wrote: >> >> On D's, and in particular GDC's, way to conquer the world there will >> evidently be many newbies to notice D, look at it, be drawn to it (and be >> happily trapped). >> >> I am such a newbie

Re: Newbie GDC issues

2013-09-06 Thread Iain Buclaw
On 6 September 2013 08:34, Ramon wrote: > On Friday, 6 September 2013 at 07:02:56 UTC, Iain Buclaw wrote: >> >> >> Dynamic arrays are just structs with a length and ptr field. So when >> you invoke '.length' in the debugger you aren't calling a method, you >> are just retrieving the type's field

Re: Newbie GDC issues

2013-09-06 Thread eles
On Thursday, 5 September 2013 at 23:49:18 UTC, Ramon wrote: On D's, and in particular GDC's, way to conquer the world there will evidently be many newbies to notice D, look at it, be drawn to it (and be happily trapped). I am such a newbie and the idea behind this thread is to collect all the

Re: Newbie GDC issues

2013-09-06 Thread Ramon
On Friday, 6 September 2013 at 07:02:56 UTC, Iain Buclaw wrote: Dynamic arrays are just structs with a length and ptr field. So when you invoke '.length' in the debugger you aren't calling a method, you are just retrieving the type's field value. Currently, the only fancy thing the gdb does

Re: Newbie GDC issues

2013-09-06 Thread Iain Buclaw
On 6 September 2013 01:59, Ramon wrote: > On Thursday, 5 September 2013 at 23:58:06 UTC, H. S. Teoh wrote: > > Thanks and > > >> @Iain: on that note, it looks like gdb thinks it's debugging C++, but D >> doesn't have anything called 'operator[]'. It would be Really Nice if we >> could somehow coax