digitalmars.D - Raw binary(to work without OS) in D
- Alex (2/2) Jun 21 2012 is it possible to use D to write code to work without OS?
- Era Scarecrow (8/10) Jun 21 2012 With the runtime, I want to say no. If you drop the runtime and
- Walter Bright (3/5) Jun 21 2012 Sure. But you'll need to thoroughly understand how the D runtime startup...
- Mehrdad (2/7) Jun 21 2012 Good luck getting the C-runtime part of the "D runtime" right..
- Walter Bright (2/10) Jun 21 2012 It's not that hard. But there's a lot of detail to learn & take care of.
- Mehrdad (4/8) Jun 21 2012 Where do you find the "detail"?
- Dmitry Olshansky (5/13) Jun 22 2012 Just replace all of symbols with abort stubs. Then implement the ones
- Mehrdad (8/9) Jun 22 2012 Er, the question isn't WHAT to do, it's HOW.
- Dmitry Olshansky (13/22) Jun 22 2012 Look at say Win32 API. There is a way to reroute most of things you
- Mehrdad (8/22) Jun 22 2012 I'm talking about things like PE file sections used to support
- Dmitry Olshansky (15/27) Jun 22 2012 While I usually try to help people where I can do so
- Mehrdad (13/23) Jun 22 2012 Allow me to translate?
- Timon Gehr (7/26) Jun 22 2012 Note that this kind of melodramatism is not helping your case.
- Mehrdad (9/18) Jun 22 2012 You mean in response to @Dmitri's comments? Or to someone else?
- Timon Gehr (9/29) Jun 22 2012 There is no need to deduce such messages from insufficient support or
- Mehrdad (29/44) Jun 22 2012 I see.
- Dmitry Olshansky (19/24) Jun 22 2012 I actually meant my previous post to be the last in this thread.
- Mehrdad (17/35) Jun 22 2012 The trouble is I only see what you write, not what you think.
- Roman D. Boiko (15/31) Jun 22 2012 and
- Mehrdad (22/59) Jun 22 2012 lol. I don't speak Russian, sorry. :\
- Roman D. Boiko (7/10) Jun 22 2012 In general, it is easy to write two very different statements in
- Mehrdad (3/13) Jun 22 2012 No I mean, I understand what you're saying. It's just that, well,
- Dmitry Olshansky (21/55) Jun 22 2012 Sorry, like Roman said I'm not native speaker. And I'm not sure of the
- Mehrdad (12/29) Jun 22 2012 Yeah I'm not a native either, so that doesn't help me so much
- Nick Sabalausky (25/30) Feb 15 2014 No, that quote is merely pointing out, for cautionary purposes, that the...
- Walter Bright (2/8) Jun 22 2012 The PE file section documentation can be found by googling "Windows PE f...
- Don Clugston (4/13) Jun 22 2012 On Windows, all of the SEH code is in D. The C library isn't used any mo...
- Mehrdad (11/13) Jun 22 2012 That's certainly changed a lot since the last time I looked, so
- Walter Bright (4/7) Jun 22 2012 Those are defined by Microsoft, and hold pointers to static constructors...
- Walter Bright (3/5) Jun 22 2012 The startup code is done in the C library, and the thread creation stuff...
- Andrei Alexandrescu (5/7) Jun 27 2012 Would be great if a contributor could translate FP parsing and
- David Nadlinger (10/17) Jun 27 2012 Same here; I need it for a side-feature in Thrift (exporting IDL
- dennis luehring (3/10) Jun 27 2012 can someone name these functions - or a list of them, are these standard...
- Jens Mueller (7/14) Jun 28 2012 I think formatting cannot be done such that it is CTFE-able. I tried
- Don Clugston (3/17) Jun 28 2012 Yeah, I think I will have to find a way of allowing it. But it's
- Jens Mueller (3/23) Jun 28 2012 Good luck! I'm looking forward to your solution.
- Mehrdad (3/5) Jun 28 2012 I think just exposing them via .sig and .exp might be the way to
- Roman D. Boiko (2/4) Jun 28 2012 sig is easy to confuse with sign
- Andrei Alexandrescu (3/6) Jun 28 2012 .mantissa and .exp
- Timon Gehr (5/12) Jun 28 2012 Imho, it should be either
- Jens Mueller (9/16) Jun 28 2012 Letting the compiler define these properties is a solution. I thought
- Don Clugston (11/27) Jun 28 2012 Yes, adding new properties would be the easiest way from a CTFE
- bearophile (7/10) Jun 28 2012 But ucents are in D specs and I think their name is already
- David Nadlinger (4/6) Jun 28 2012 I don't think this is a problem at all – for example, the type
- Don Clugston (2/8) Jul 02 2012 Good point.
- Jens Mueller (9/41) Jun 28 2012 You could add a deprecated alias to X.mant_dig and provide a new name.
- Don Clugston (8/48) Jul 02 2012 Yes, the implicit bit. For float and double it isn't present, but it's
- David Nadlinger (8/15) Jun 28 2012 .exp might potentially lead to confusion regarding std.math.exp
- Paul D. Anderson (5/21) Jun 29 2012 In my BigDecimal/BigFloat modules I use .coefficient and
- Paul D. Anderson (4/20) Jun 29 2012 How about .mant and .expo?
- Walter Bright (2/8) Jun 22 2012 One way is to get the library source code for the C compiler and study i...
- Mehrdad (3/16) Jun 22 2012 By "get" you mean "buy", right?
- Paulo Pinto (3/20) Jun 22 2012 Well Walter can also decide to invest his time somewhere else, he
- Walter Bright (6/9) Jun 22 2012 For Digital Mars C, yes you can buy it. For gcc, you can look at the C l...
- Roman D. Boiko (4/7) Jun 22 2012 Sorry, Walter, I didn't understand this statement. Did you mean
- Walter Bright (4/7) Jun 22 2012 No. I meant dmd for Win64.
- Dmitry Olshansky (6/13) Jun 22 2012 I believe SDK with compiler is a free download though I might be off on
- David Nadlinger (9/11) Jun 22 2012 Also, there are Express editions of Visual Studio which are
- Dmitry Olshansky (5/10) Jun 22 2012 Yay!
- Paulo Pinto (3/14) Jun 22 2012 I guess you wanted to say "desktop" instead of "native code",
- David Nadlinger (2/4) Jun 22 2012 Yes, of course, that's what I meant.
- bearophile (4/5) Jun 28 2012 Are you sure? Do you have a reference on this?
- Paulo Pinto (8/13) Jun 28 2012 The huge amount of documentation made available at BUILD time,
- bearophile (4/9) Jun 28 2012 OK. No need for a list.
- Roman D. Boiko (5/13) Jun 22 2012 Correct. VS SDK is free, the same is true for Windows SDK. Also
- Sean Kelly (2/6) Jun 22 2012 I think there's a free version of VS.
- Brad Anderson (8/14) Jun 22 2012 Yes, Visual Studio Express. They had announced that Visual Studio Expre...
- mta`chrono (2/17) Jun 22 2012 I'm afright. Please explain what is meant by this, Walter.
- Roman D. Boiko (5/11) Jun 22 2012 I also asked for clarification a few posts before. Most likely
- dennis luehring (2/14) Jun 22 2012 no - dmd64 will work with VS
- Iain Buclaw (8/25) Jun 28 2012 Wouldn't it be useful if the compiler had diagnostics for all implicit
- Sean Kelly (4/9) Jun 28 2012 Yes it would. I guess the question is how to expose this. Generally =
- Iain Buclaw (10/18) Jun 29 2012 speaking though, array append type operations allocate, AA insertions a...
- bearophile (4/7) Jun 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5070
- Paulo Pinto (10/18) Jun 22 2012 I don't really know the runtime code of the generated binary
- AlexPhoenix (2/4) Feb 11 2014 by the way, with which args i must run D to generate raw binary?
- Adam D. Ruppe (5/6) Feb 11 2014 This is more of a linker question than a compiler one...
- AlexPhoenix (9/16) Feb 13 2014 I found trouble.
is it possible to use D to write code to work without OS? like i do it with gcc.
Jun 21 2012
On Thursday, 21 June 2012 at 16:39:07 UTC, Alex wrote:is it possible to use D to write code to work without OS? like i do it with gcc.With the runtime, I want to say no. If you drop the runtime and GC (including dynamic arrays), I honestly don't see why not. However if you don't have any OS connections you have to write IO yourself, some of it probably in assembly (That or it's a very silent and unfruitful program). Maybe good for certain device drivers but beyond that it doesn't seem too practical. At this moment.
Jun 21 2012
On 6/21/2012 9:39 AM, Alex wrote:is it possible to use D to write code to work without OS? like i do it with gcc.Sure. But you'll need to thoroughly understand how the D runtime startup code works, so you can adjust as necessary.
Jun 21 2012
On Thursday, 21 June 2012 at 19:44:40 UTC, Walter Bright wrote:On 6/21/2012 9:39 AM, Alex wrote:Good luck getting the C-runtime part of the "D runtime" right..is it possible to use D to write code to work without OS? like i do it with gcc.Sure. But you'll need to thoroughly understand how the D runtime startup code works, so you can adjust as necessary.
Jun 21 2012
On 6/21/2012 11:07 PM, Mehrdad wrote:On Thursday, 21 June 2012 at 19:44:40 UTC, Walter Bright wrote:It's not that hard. But there's a lot of detail to learn & take care of.On 6/21/2012 9:39 AM, Alex wrote:Good luck getting the C-runtime part of the "D runtime" right..is it possible to use D to write code to work without OS? like i do it with gcc.Sure. But you'll need to thoroughly understand how the D runtime startup code works, so you can adjust as necessary.
Jun 21 2012
On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:On 6/21/2012 11:07 PM, Mehrdad wrote:Where do you find the "detail"? (Remember this, below?) http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=155617Good luck getting the C-runtime part of the "D runtime" right..It's not that hard. But there's a lot of detail to learn & take care of.
Jun 21 2012
On 22-Jun-12 10:49, Mehrdad wrote:On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:Just replace all of symbols with abort stubs. Then implement the ones you happen to actually need.On 6/21/2012 11:07 PM, Mehrdad wrote:Where do you find the "detail"? (Remember this, below?)Good luck getting the C-runtime part of the "D runtime" right..It's not that hard. But there's a lot of detail to learn & take care of.http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=155617-- Dmitry Olshansky
Jun 22 2012
On Friday, 22 June 2012 at 08:00:08 UTC, Dmitry Olshansky wrote:Then implement the ones you happen to actually need.Er, the question isn't WHAT to do, it's HOW. If you have any idea how to implement things like TLS, SEH, and the like, then PLEASE, share them! The point I was trying to make was, though, that this information is not being shared with anyone. Which leads me to believe that whoever has this information doesn't want people to use it for D development...
Jun 22 2012
On 22-Jun-12 12:08, Mehrdad wrote:On Friday, 22 June 2012 at 08:00:08 UTC, Dmitry Olshansky wrote:Look at say Win32 API. There is a way to reroute most of things you listed directly to it. I actually do this kind of stuff in my spare time. Of course your own kernel has some manner of system calls too.Then implement the ones you happen to actually need.Er, the question isn't WHAT to do, it's HOW. If you have any idea how to implement things like TLS, SEH, and the like, then PLEASE, share them!The point I was trying to make was, though, that this information is not being shared with anyone.If you can't figure it out on your own, chances are you won't be able to do what you wanted in the first place (e.g. real-time micro-kernel). I mean it's nothing magical, all of these things are present in say MS C compiler and people do these things with it just _fine_.Which leads me to believe that whoever has this information doesn't want people to use it for D development...Yeah, I understand how it could be frustrating, but once you are on this kind of level you usually already running circles around all of this stuff. That being said the info won't hurt of course. -- Dmitry Olshansky
Jun 22 2012
On Friday, 22 June 2012 at 08:35:51 UTC, Dmitry Olshansky wrote:Look at say Win32 API. There is a way to reroute most of things you listed directly to it. I actually do this kind of stuff in my spare time. Of course your own kernel has some manner of system calls too.I'm talking about things like PE file sections used to support TLS and whatnot. They're unrelated to the Windows API.If you can't figure it out on your own, chances are you won't be able to do what you wanted in the first place (e.g. real-time micro-kernel).You're not being helpful.I mean it's nothing magical, all of these things are present in say MS C compiler and people do these things with it just _fine_.Uh, no. D puts extra crap in the binary.Yeah, I understand how it could be frustrating, but once you are on this kind of level you usually already running circles around all of this stuff. That being said the info won't hurt of course.I guess I'm not at your majesty's High Level yet? Thanks for being so helpful.
Jun 22 2012
On 22-Jun-12 18:17, Mehrdad wrote:You're not being helpful.While I usually try to help people where I can do so I didn't intend to _help_ you with this post in any capacity. Aside fromJust replace all of symbols with abort stubs. Then implement the ones you happen to actually need.but you are (probably) way ahead of this advice.Like what? I'm aware only of some fancy _beg/_end sections and a bunch of stuff from DMC runtime, mostly FP math things.I mean it's nothing magical, all of these things are present in say MS C compiler and people do these things with it just _fine_.Uh, no. D puts extra crap in the binary.No problem. I meant actually low level. Like "down to hardware/OS" so it's rather the opposite ;) It's not like I've asserted yours or mine levels at anything in particular at all. (that 'you' in my paragraph above should have probably been 'one' i.e. 'once one on this kind of level...') -- Dmitry OlshanskyYeah, I understand how it could be frustrating, but once you are on this kind of level you usually already running circles around all of this stuff. That being said the info won't hurt of course.I guess I'm not at your majesty's High Level yet? Thanks for being so helpful.
Jun 22 2012
On Friday, 22 June 2012 at 14:40:42 UTC, Dmitry Olshansky wrote:Someone can't recognize sarcasm...I guess I'm not at your majesty's High Level yet? Thanks for being so helpful.No problem.I meant actually low level. Like "down to hardware/OS" so it's rather the opposite ;) It's not like I've asserted yours or mine levels at anything in particular at all.Allow me to translate? "Geez, I guess you're just an idiot for needing so much spoon-fed to you. I can land people on the moon without anyone ever telling me how. Not that I never insulted you at anything in particular."(that 'you' in my paragraph above should have probably been 'one' i.e. 'once one on this kind of level...')Oh, so now you're insulting /everyone/ like me, instead of just me! That obviously makes the situation better. Are you serious? So you're going to tell people they're just too stupid for the task if they can't figure something out by themselves?
Jun 22 2012
On 06/22/2012 04:58 PM, Mehrdad wrote:On Friday, 22 June 2012 at 14:40:42 UTC, Dmitry Olshansky wrote:Note that this kind of melodramatism is not helping your case. Getting insulted and shooting in all directions is genuinely stupid behaviour and wastes everyone's time. You have to realize that some of your comments have been rather impolite lately. Why do you assume that everyone else cares a lot more about how some random comment might be conceived?Someone can't recognize sarcasm...I guess I'm not at your majesty's High Level yet? Thanks for being so helpful.No problem.I meant actually low level. Like "down to hardware/OS" so it's rather the opposite ;) It's not like I've asserted yours or mine levels at anything in particular at all.Allow me to translate? "Geez, I guess you're just an idiot for needing so much spoon-fed to you. I can land people on the moon without anyone ever telling me how. Not that I never insulted you at anything in particular."(that 'you' in my paragraph above should have probably been 'one' i.e. 'once one on this kind of level...')Oh, so now you're insulting /everyone/ like me, instead of just me! That obviously makes the situation better. Are you serious? So you're going to tell people they're just too stupid for the task if they can't figure something out by themselves?
Jun 22 2012
On Friday, 22 June 2012 at 15:12:13 UTC, Timon Gehr wrote:Note that this kind of melodramatism is not helping your case. Getting insulted and shooting in all directions is genuinely stupid behaviour and wastes everyone's time. You have to realize that some of your comments have been rather impolite lately.You mean in response to Dmitri's comments? Or to someone else? It would be very helpful for me if you could show a couple examples of what you're referring to.Why do you assume that everyone else cares a lot more about how some random comment might be conceived?"Might" be conceived? Is it really just me? Okay, well then you tell me: Isn't the quoteIf you can't figure it out on your own, chances are you won't be able todo what you wanted in the first place just saying I'm too stupid for this to help me anyway?
Jun 22 2012
On 06/22/2012 05:21 PM, Mehrdad wrote:On Friday, 22 June 2012 at 15:12:13 UTC, Timon Gehr wrote:You like blaming someone, or claiming someone has bad intentions. Eg:Note that this kind of melodramatism is not helping your case. Getting insulted and shooting in all directions is genuinely stupid behaviour and wastes everyone's time. You have to realize that some of your comments have been rather impolite lately.You mean in response to Dmitri's comments? Or to someone else? It would be very helpful for me if you could show a couple examples of what you're referring to.Which leads me to believe that whoever has this information doesn't want people to use it for D development...The way I'm understanding it is that the message is essentially "If you want to develop your own systems with our systems programming language, then you gotta buy it, sorry. Batteries not included."There is no need to deduce such messages from insufficient support or documentation of a free product run 100% by volunteers. Who should such comments be directed at? What should their effect be? I only see it generating bad air.I think it does not matter, because the optimal reaction would be the same in each case: ignore the comment and continue the productive part of the discussion.Why do you assume that everyone else cares a lot more about how some random comment might be conceived?"Might" be conceived? Is it really just me? Okay, well then you tell me: Isn't the quoteIf you can't figure it out on your own, chances are you won't be able todo what you wanted in the first place just saying I'm too stupid for this to help me anyway?
Jun 22 2012
On Friday, 22 June 2012 at 15:37:16 UTC, Timon Gehr wrote:You like blaming someone, or claiming someone has bad intentions. Eg:I see. I would agree if you said it was nonconstructive, but I don't see how it's /impolite/ -- at all. My intention wasn't to claim Walter (assuming that's whom you meant I was referring to) has bad intentions (I -- at least partially -- understand he can't just release the code, etc.). The trouble was that his "solution" to the problem was "buy the source code". That's not /bad/ intentions... it simply goes against the nature of D/DMD. If his response had instead been "well, I'd love to share this info, but due to legal issues I can't", then I couldn't help but sympathize. The issue is that I've asked this question a bunch of times (e.g. the one I linked to earlier), and _only now_ has anyone given any reasonable response at all for solving the problem ("buy the code") -- so it only naturally makes me wonder: is that the intention of promoting? Again, wasn't trying to be "impolite" to Walter (or you or the others). I just find that the "buy the source code" comment (which, to be sure, is better than the nothing I'd gotten before) is sending completely the wrong message. If you had any other examples for where you believe I've been impolite, let me know. (Feel free to email me if you don't want to clutter here.) That would actually be helpful for me.Which leads me to believe that whoever has this information doesn't want people to use it for D development...The way I'm understanding it is that the message is essentially "If you want to develop your own systems with our systems programming language, then you gotta buy it, sorry. Batteries not included."There is no need to deduce such messages from insufficient support or documentation of a free product run 100% by volunteers.I think it does not matterI don't...because the optimal reaction would be the same in each case: ignore the comment and continue the productive part of the discussion.I do sometimes try to do that, though I guess I'll try it more often...
Jun 22 2012
On 22-Jun-12 19:21, Mehrdad wrote:"Might" be conceived? Is it really just me? Okay, well then you tell me: Isn't the quoteI actually meant my previous post to be the last in this thread. But here it goes: 1. I classify the above as speculation on my part, namely to put it in other words (not featuring any individual): "this work take a lot of low-level hacking meaning that investigating symbols output by compiler and their meaning is least of problem there usually" That's ALL I meant to say here. You can frame it like advice, insult, promotion or whatever you fell like (it's not like I or someone else can stop you). 2. The sarcasm is not lost on me, but for some reason I _think_ you are/were outraged way before my post. Being outraged doesn't help sort out things 99% of time (this is my assertion you may disagree). 3. If anything the mailing list/NG is not technical support (especially "general discussion ones") I'm not obliged to offer you any help. It's all about sharing opinions. So take it or ignore it and let's move on. -- Dmitry OlshanskyIf you can't figure it out on your own, chances are you won't be able todo what you wanted in the first place just saying I'm too stupid for this to help me anyway?
Jun 22 2012
On Friday, 22 June 2012 at 15:45:30 UTC, Dmitry Olshansky wrote:I actually meant my previous post to be the last in this thread. But here it goes:Sorry :\1. I classify the above as speculation on my part, namely to put it in other words (not featuring any individual): "this work take a lot of low-level hacking meaning that investigating symbols output by compiler and their meaning is least of problem there usually" That's ALL I meant to say here. You can frame it like advice, insult, promotion or whatever you fell like (it's not like I or someone else can stop you).The trouble is I only see what you write, not what you think. What you're writing here is very clearly different in tone from what you said before, even if it wasn't intentional. (Usually the onus is more on the speaker to get his words across, not on the reader to try and decipher them.)2. The sarcasm is not lost on me, but for some reason I _think_ you are/were outraged way before my post."Outraged"? Not sure at what you're referring specifically...Being outraged doesn't help sort out things 99% of time (this is my assertion you may disagree).Totally agree... though (until now) I didn't see any attempt at "sorting out" anything. (The second comment only made things worse.)3. If anything the mailing list/NG is not technical support (especially "general discussion ones") I'm not obliged to offer you any help. It's all about sharing opinions.Yes, and I wasn't asking for you to offer me help either. But insulting people -- yeah, It's against my expectations to go on an NG and be told I'm too stupid to do something. Even if it's your opinion.So take it or ignore it and let's move on.Sure, if you'd like to. (I didn't get that message from you until now.)
Jun 22 2012
On Friday, 22 June 2012 at 16:08:13 UTC, Mehrdad wrote:The trouble is I only see what you write, not what you think. What you're writing here is very clearly different in tone from what you said before, even if it wasn't intentional. (Usually the onus is more on the speaker to get his words across, not on the reader to try and decipher them.)Comparing what Dmitry wrote earlier:If you can't figure it out on your own, chances are you won't be able to do what you wanted in the first place (e.g. real-time micro-kernel).andYeah, I understand how it could be frustrating, but once you are on this kind of level you usually already running circles around all of this stuff.to later interpretation:may seem to be very different at first. But in Russian the first and the last sentences would have similar meanings. In general, it is difficult to predict how something is going to be perceived. So it is usually OK for a person to say something assuming that others will understand the intended meaning, provided that clarification is given on request. In this case, Dmitry provided a very reasonable clarification about the meaning of word 'level'. And interpretation of a statement which I quoted first is reasonably equivalent to what Dmitry provided later. (I'm from Ukraine, we speak Russian well. Dmitry is from Russia. Hope you will believe me.)1. I classify the above as speculation on my part, namely to put it in other words (not featuring any individual): "this work take a lot of low-level hacking meaning that investigating symbols output by compiler and their meaning is least of problem there usually"
Jun 22 2012
On Friday, 22 June 2012 at 17:06:19 UTC, Roman D. Boiko wrote:On Friday, 22 June 2012 at 16:08:13 UTC, Mehrdad wrote:lol. I don't speak Russian, sorry. :\ For me, the first one would imply the last one, but not necessarily the other way around.The trouble is I only see what you write, not what you think. What you're writing here is very clearly different in tone from what you said before, even if it wasn't intentional. (Usually the onus is more on the speaker to get his words across, not on the reader to try and decipher them.)Comparing what Dmitry wrote earlier:If you can't figure it out on your own, chances are you won't be able to do what you wanted in the first place (e.g. real-time micro-kernel).andYeah, I understand how it could be frustrating, but once you are on this kind of level you usually already running circles around all of this stuff.to later interpretation:may seem to be very different at first. But in Russian the first and the last sentences would have similar meanings.1. I classify the above as speculation on my part, namely to put it in other words (not featuring any individual): "this work take a lot of low-level hacking meaning that investigating symbols output by compiler and their meaning is least of problem there usually"In general, it is difficult to predict how something is going to be perceived. So it is usually OK for a person to say something assuming that others will understand the intended meaning, provided that clarification is given on request.I suppose? Though if someone were trying to insult you, I'm not sure if they would ever confirm, "Yes, I mean to say you're an idiot", or that they would necessarily repeat it, even if you asked them. (Sad but true, I think.) So I'm not sure if you can ask for a clarification for everything...In this case, Dmitry provided a very reasonable clarification about the meaning of word 'level'. And interpretation of a statement which I quoted first is reasonably equivalent to what Dmitry provided later.Well, yes; he clearly said:so that would've been fine. What didn't help the situation was the other part...I meant actually low level. Like "down to hardware/OS" so it's rather the opposite ;)With that part, it was saying, "If you don't know this stuff then you shouldn't be working at this level", _NOT_ "you're going to have bigger problems at this level". The implications are different. Maybe my reasoning was weird, but that's how it came across..."[...] you usually already running circles around all of this stuff"(I'm from Ukraine, we speak Russian well. Dmitry is from Russia. Hope you will believe me.)I have no reason not to. :) But I also have a hard time integrating that fact into the rest of the discussion, since I obviously don't know Russian.
Jun 22 2012
On Friday, 22 June 2012 at 17:33:17 UTC, Mehrdad wrote:I have no reason not to. :) But I also have a hard time integrating that fact into the rest of the discussion, since I obviously don't know Russian.In general, it is easy to write two very different statements in Russian which may be considered to have similar or equivalent meanings. In many cases it is OK to say something figuratively, and people will very likely perceive the meaning correctly. That may easily become a habit. This often causes me to say vague statements in English.
Jun 22 2012
On Friday, 22 June 2012 at 17:41:06 UTC, Roman D. Boiko wrote:On Friday, 22 June 2012 at 17:33:17 UTC, Mehrdad wrote:No I mean, I understand what you're saying. It's just that, well, the writer's nationality is sorta beyond my scope as a reader. :-)I have no reason not to. :) But I also have a hard time integrating that fact into the rest of the discussion, since I obviously don't know Russian.In general, it is easy to write two very different statements in Russian which may be considered to have similar or equivalent meanings. In many cases it is OK to say something figuratively, and people will very likely perceive the meaning correctly. That may easily become a habit. This often causes me to say vague statements in English.
Jun 22 2012
On 22-Jun-12 20:08, Mehrdad wrote:On Friday, 22 June 2012 at 15:45:30 UTC, Dmitry Olshansky wrote:Sorry, like Roman said I'm not native speaker. And I'm not sure of the emotional component of things I type. To be honest no matter what form I use I tend to be neutral in general (or so I thought). (Except some very rare cases. I recall that I told something harsh in response to the "brilliant idea" of turning enforce into assert with some version statement)I actually meant my previous post to be the last in this thread. But here it goes:Sorry :\1. I classify the above as speculation on my part, namely to put it in other words (not featuring any individual): "this work take a lot of low-level hacking meaning that investigating symbols output by compiler and their meaning is least of problem there usually" That's ALL I meant to say here. You can frame it like advice, insult, promotion or whatever you fell like (it's not like I or someone else can stop you).The trouble is I only see what you write, not what you think. What you're writing here is very clearly different in tone from what you said before, even if it wasn't intentional. (Usually the onus is more on the speaker to get his words across, not on the reader to try and decipher them.)I meant something like this:2. The sarcasm is not lost on me, but for some reason I _think_ you are/were outraged way before my post."Outraged"? Not sure at what you're referring specifically...Good luck getting the C-runtime part of the "D runtime" right.....If you have any idea how to implement things like TLS, SEH, and thelike, then PLEASE, share them! You were almost shouting or demanding (or so it seemed to me). I think this was the first time I insulted somebody uninterruptedly and that went totally unexpected for me.Good. And bad, as it seems I need to refresh my word/phrase selection :)Being outraged doesn't help sort out things 99% of time (this is my assertion you may disagree).Totally agree... though (until now) I didn't see any attempt at "sorting out" anything. (The second comment only made things worse.)If anything I'm not about to make any statements aimed at a particular person. If there was insult, I'm sorry as I failed to spot emotional context of things I posted.3. If anything the mailing list/NG is not technical support (especially "general discussion ones") I'm not obliged to offer you any help. It's all about sharing opinions.Yes, and I wasn't asking for you to offer me help either. But insulting people -- yeah, It's against my expectations to go on an NG and be told I'm too stupid to do something. Even if it's your opinion.OK, glad we are (sort of) having some agreement. -- Dmitry OlshanskySo take it or ignore it and let's move on.Sure, if you'd like to. (I didn't get that message from you until now.)
Jun 22 2012
On Friday, 22 June 2012 at 18:52:41 UTC, Dmitry Olshansky wrote:Sorry, like Roman said I'm not native speaker. And I'm not sure of the emotional component of things I type. To be honest no matter what form I use I tend to be neutral in general (or so I thought).Yeah I'm not a native either, so that doesn't help me so much either... :\ (Though I guess, from another perspective, learning English has also helped me a lot. :P my point's there though.)I meant something like this:Ah. I wasn't demanding :-) "shouting" is closer but I wasn't trying to be yelling at anyone :P it just shows I didn't communicate well either. :)Good luck getting the C-runtime part of the "D runtime"right.. ...If you have any idea how to implement things like TLS, SEH,and the like, then PLEASE, share them! You were almost shouting or demanding (or so it seemed to me). I think this was the first time I insulted somebody uninterruptedly and that went totally unexpected for me.If anything I'm not about to make any statements aimed at a particular person. If there was insult, I'm sorry as I failed to spot emotional context of things I posted.Sorry about my misunderstanding as well -- my inference engine kinda failed at inferring what you meant. :POK, glad we are having some agreement.Yup :)
Jun 22 2012
On 6/22/2012 11:21 AM, Mehrdad wrote:On Friday, 22 June 2012 at 15:12:13 UTC, Timon Gehr wrote: Isn't the quoteNo, that quote is merely pointing out, for cautionary purposes, that the task you're ultimately trying to do is typically either equally difficult, or more difficult, than this first step you're currently on. If I'm reading correctly, he simply doesn't want you to end up being unpleasantly surprised by what you may face once you do reach that point. But explaining it that way is verbose and difficult (I spent entirely too long figuring out how to word it - and I'm a native speaker), so he wrote it in a more straightforward way: As an "A implies B" relation, ie an rather frank and blunt "if...then". (AIUI, anyway) Slight soapbox, not directed at anyone in particular: Emotion tends to severely complicate communication, so for technical things (which tend to *already* be difficult to communicate), a person speaking/writing will frequently need to disregard emotion-related concerns in their choice of wording. Therefore, when reading/listening, it's best to "Be like Spock, not Bones" and always assume anything that *can* be interpreted unemotionally or benign was *intended* to be unemotional and benign, regardless of whether or not that might be a false assumption. Granted, as a reader/listener, there have been plenty of times I've colossally failed to follow that guideline, so I'm certainly not immune from such failings myself. But it's a working theory I've formulated after being in (and near) a few too many flamewars, and FWIW I think it's fairly sound.If you can't figure it out on your own, chances are you won't be able todo what you wanted in the first place just saying I'm too stupid for this to help me anyway?
Feb 15 2014
On 6/22/2012 7:17 AM, Mehrdad wrote:On Friday, 22 June 2012 at 08:35:51 UTC, Dmitry Olshansky wrote:The PE file section documentation can be found by googling "Windows PE file format".Look at say Win32 API. There is a way to reroute most of things you listed directly to it. I actually do this kind of stuff in my spare time. Of course your own kernel has some manner of system calls too.I'm talking about things like PE file sections used to support TLS and whatnot. They're unrelated to the Windows API.
Jun 22 2012
On 22/06/12 10:08, Mehrdad wrote:On Friday, 22 June 2012 at 08:00:08 UTC, Dmitry Olshansky wrote:On Windows, all of the SEH code is in D. The C library isn't used any more. I think the main thing that's still done in C is the floating point formatting.Then implement the ones you happen to actually need.Er, the question isn't WHAT to do, it's HOW. If you have any idea how to implement things like TLS, SEH, and the like, then PLEASE, share them!The point I was trying to make was, though, that this information is not being shared with anyone. Which leads me to believe that whoever has this information doesn't want people to use it for D development...
Jun 22 2012
On Friday, 22 June 2012 at 11:41:26 UTC, Don Clugston wrote:On Windows, all of the SEH code is in D. The C library isn't used any more.That's certainly changed a lot since the last time I looked, so that's good. But lots of other parts about D (TLS, GC, etc.) still have that problem though. I was never able to get the __xi_a, __xi_z, etc. stuff correct, and I've spent a heck of a lot of time on it. The way I'm understanding it is that the message is essentially "If you want to develop your own systems with our systems programming language, then you gotta buy it, sorry. Batteries not included."
Jun 22 2012
On 6/22/2012 7:51 AM, Mehrdad wrote:But lots of other parts about D (TLS, GC, etc.) still have that problem though. I was never able to get the __xi_a, __xi_z, etc. stuff correct, and I've spent a heck of a lot of time on it.Those are defined by Microsoft, and hold pointers to static constructors from Microsoft C generated code. It's unused by DMC, except to not muck them up in case someone links in MSC generated code.
Jun 22 2012
On 6/22/2012 4:41 AM, Don Clugston wrote:On Windows, all of the SEH code is in D. The C library isn't used any more. I think the main thing that's still done in C is the floating point formatting.The startup code is done in the C library, and the thread creation stuff still relies on the C library, too.
Jun 22 2012
On 6/22/12 7:41 AM, Don Clugston wrote:I think the main thing that's still done in C is the floating point formatting.Would be great if a contributor could translate FP parsing and formatting code into D. Then we can use it in CTFE. I need it badly for some function tabulation code. Andrei
Jun 27 2012
On Wednesday, 27 June 2012 at 12:15:37 UTC, Andrei Alexandrescu wrote:On 6/22/12 7:41 AM, Don Clugston wrote:Same here; I need it for a side-feature in Thrift (exporting IDL for existing types at a compile time), where I'm currently just using a horrible hack which rounds slightly wrong. There a quite a few papers about efficient floating point formatting out there, and it should not be hard to convert one of the described algorithms into actual code. I originally planned to do it myself last summer, but never found the time to… DavidI think the main thing that's still done in C is the floating point formatting.Would be great if a contributor could translate FP parsing and formatting code into D. Then we can use it in CTFE. I need it badly for some function tabulation code.
Jun 27 2012
Am 27.06.2012 14:15, schrieb Andrei Alexandrescu:On 6/22/12 7:41 AM, Don Clugston wrote:can someone name these functions - or a list of them, are these standard c stuff or specials?I think the main thing that's still done in C is the floating point formatting.Would be great if a contributor could translate FP parsing and formatting code into D. Then we can use it in CTFE. I need it badly for some function tabulation code. Andrei
Jun 27 2012
Andrei Alexandrescu wrote:On 6/22/12 7:41 AM, Don Clugston wrote:I think formatting cannot be done such that it is CTFE-able. I tried implementing a less-inefficient version. As far as I can tell at some point you need to extract the significand and the exponent. This is done by some "unsafe" cast which is not allowed in CTFE. I don't know a way to do it in CTFE-compatible way. JensI think the main thing that's still done in C is the floating point formatting.Would be great if a contributor could translate FP parsing and formatting code into D. Then we can use it in CTFE. I need it badly for some function tabulation code.
Jun 28 2012
On 28/06/12 15:31, Jens Mueller wrote:Andrei Alexandrescu wrote:Yeah, I think I will have to find a way of allowing it. But it's difficult to see a clean way of doing it.On 6/22/12 7:41 AM, Don Clugston wrote:I think formatting cannot be done such that it is CTFE-able. I tried implementing a less-inefficient version. As far as I can tell at some point you need to extract the significand and the exponent. This is done by some "unsafe" cast which is not allowed in CTFE. I don't know a way to do it in CTFE-compatible way. JensI think the main thing that's still done in C is the floating point formatting.Would be great if a contributor could translate FP parsing and formatting code into D. Then we can use it in CTFE. I need it badly for some function tabulation code.
Jun 28 2012
Don Clugston wrote:On 28/06/12 15:31, Jens Mueller wrote:Good luck! I'm looking forward to your solution. JensAndrei Alexandrescu wrote:Yeah, I think I will have to find a way of allowing it. But it's difficult to see a clean way of doing it.On 6/22/12 7:41 AM, Don Clugston wrote:I think formatting cannot be done such that it is CTFE-able. I tried implementing a less-inefficient version. As far as I can tell at some point you need to extract the significand and the exponent. This is done by some "unsafe" cast which is not allowed in CTFE. I don't know a way to do it in CTFE-compatible way. JensI think the main thing that's still done in C is the floating point formatting.Would be great if a contributor could translate FP parsing and formatting code into D. Then we can use it in CTFE. I need it badly for some function tabulation code.
Jun 28 2012
On Thursday, 28 June 2012 at 14:02:37 UTC, Jens Mueller wrote:Good luck! I'm looking forward to your solution. JensI think just exposing them via .sig and .exp might be the way to go?
Jun 28 2012
On Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:I think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with sign
Jun 28 2012
On 6/28/12 10:07 AM, Roman D. Boiko wrote:On Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .exp AndreiI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with sign
Jun 28 2012
On 06/28/2012 04:35 PM, Andrei Alexandrescu wrote:On 6/28/12 10:07 AM, Roman D. Boiko wrote:Imho, it should be either .mantissa and .exponent or .mant and .expOn Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .exp AndreiI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with sign
Jun 28 2012
Andrei Alexandrescu wrote:On 6/28/12 10:07 AM, Roman D. Boiko wrote:Letting the compiler define these properties is a solution. I thought Don is looking for something more general. But maybe this isn't needed here. Don't know. But using mantissa should be discouraged. I suggest calling them .significand and .exponent significand is preferred over mantissa by IEEE FP committee. I think it's fine to spell them out. There won't be much code using them anyway. JensOn Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .expI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with sign
Jun 28 2012
On 28/06/12 17:00, Jens Mueller wrote:Andrei Alexandrescu wrote:Yes, adding new properties would be the easiest way from a CTFE perspective; that way, they are endian-ness independent. It's a bit niche, but then again adding a special case for this in CTFE is niche as well. Maybe it would be the best approach. With naming, I'm included to agree, but the funny thing is that we have X.mant_dig as the number of digits in the significand. There's an oddity, though: the type of X.significand would be dependent on the type of X (and for the non-existent quadruple float, it would be non-existent ucent type!) Would it include the implicit bit of an 80-bit x87 real (the silly bit)?On 6/28/12 10:07 AM, Roman D. Boiko wrote:Letting the compiler define these properties is a solution. I thought Don is looking for something more general. But maybe this isn't needed here. Don't know. But using mantissa should be discouraged. I suggest calling them .significand and .exponent significand is preferred over mantissa by IEEE FP committee. I think it's fine to spell them out. There won't be much code using them anyway. JensOn Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .expI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with sign
Jun 28 2012
Don Clugston:There's an oddity, though: the type of X.significand would be dependent on the type of X (and for the non-existent quadruple float, it would be non-existent ucent type!)But ucents are in D specs and I think their name is already somewhere in the compiler. While "quadruple" (or "qfloat") is not yet in D specs: http://en.wikipedia.org/wiki/Quadruple_precision Bye, bearophile
Jun 28 2012
On Thursday, 28 June 2012 at 15:28:10 UTC, Don Clugston wrote:There's an oddity, though: the type of X.significand would be dependent on the type of X […]I don't think this is a problem at all – for example, the type of T.init depends on T as well… David
Jun 28 2012
On 28/06/12 18:37, David Nadlinger wrote:On Thursday, 28 June 2012 at 15:28:10 UTC, Don Clugston wrote:Good point.There's an oddity, though: the type of X.significand would be dependent on the type of X […]I don't think this is a problem at all – for example, the type of T.init depends on T as well… David
Jul 02 2012
Don Clugston wrote:On 28/06/12 17:00, Jens Mueller wrote:Sounds good then.Andrei Alexandrescu wrote:Yes, adding new properties would be the easiest way from a CTFE perspective; that way, they are endian-ness independent. It's a bit niche, but then again adding a special case for this in CTFE is niche as well. Maybe it would be the best approach.On 6/28/12 10:07 AM, Roman D. Boiko wrote:Letting the compiler define these properties is a solution. I thought Don is looking for something more general. But maybe this isn't needed here. Don't know. But using mantissa should be discouraged. I suggest calling them .significand and .exponent significand is preferred over mantissa by IEEE FP committee. I think it's fine to spell them out. There won't be much code using them anyway. JensOn Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .expI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with signWith naming, I'm included to agree, but the funny thing is that we have X.mant_dig as the number of digits in the significand.You could add a deprecated alias to X.mant_dig and provide a new name. We should adopt IEEE's vocabulary where possible.There's an oddity, though: the type of X.significand would be dependent on the type of X (and for the non-existent quadruple float, it would be non-existent ucent type!)But this is no problem, is it?Would it include the implicit bit of an 80-bit x87 real (the silly bit)?Not sure what the silly bit is. You mean the bit that is implicitly always 1, don't you? mant_dig says 24 for a float. Means it is included when counting the bits. Then for consistency it should be included. Jens
Jun 28 2012
On 28/06/12 18:36, Jens Mueller wrote:Don Clugston wrote:Yes, the implicit bit. For float and double it isn't present, but it's there for 80bit x87 and 68K reals. But it would not be present for quadruple types. I'm not sure if it's always present on Itanium 80-bit reals. It's included in the 80-bit reals only for historical reasons -- it seemed like a good idea at the time. It allowed an optimisation for a long-obsolete algorithm.On 28/06/12 17:00, Jens Mueller wrote:Sounds good then.Andrei Alexandrescu wrote:Yes, adding new properties would be the easiest way from a CTFE perspective; that way, they are endian-ness independent. It's a bit niche, but then again adding a special case for this in CTFE is niche as well. Maybe it would be the best approach.On 6/28/12 10:07 AM, Roman D. Boiko wrote:Letting the compiler define these properties is a solution. I thought Don is looking for something more general. But maybe this isn't needed here. Don't know. But using mantissa should be discouraged. I suggest calling them .significand and .exponent significand is preferred over mantissa by IEEE FP committee. I think it's fine to spell them out. There won't be much code using them anyway. JensOn Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .expI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with signWith naming, I'm included to agree, but the funny thing is that we have X.mant_dig as the number of digits in the significand.You could add a deprecated alias to X.mant_dig and provide a new name. We should adopt IEEE's vocabulary where possible.There's an oddity, though: the type of X.significand would be dependent on the type of X (and for the non-existent quadruple float, it would be non-existent ucent type!)But this is no problem, is it?Would it include the implicit bit of an 80-bit x87 real (the silly bit)?Not sure what the silly bit is. You mean the bit that is implicitly always 1, don't you? mant_dig says 24 for a float. Means it is included when counting the bits. Then for consistency it should be included.
Jul 02 2012
On Thursday, 28 June 2012 at 14:35:24 UTC, Andrei Alexandrescu wrote:On 6/28/12 10:07 AM, Roman D. Boiko wrote:.exp might potentially lead to confusion regarding std.math.exp with UFCS in place. Not that this would be a huge deal, but since new property would be used only very rarely anyway, I don't think going for a longer name like .exponent or even rawExponent/exponentBits/… would be a problem. DavidOn Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .expI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with sign
Jun 28 2012
On Thursday, 28 June 2012 at 16:50:59 UTC, David Nadlinger wrote:On Thursday, 28 June 2012 at 14:35:24 UTC, Andrei Alexandrescu wrote:In my BigDecimal/BigFloat modules I use .coefficient and .exponent externally but .mant and .expo internally. It would be nice to be consistent -- I can adapt to whatever is best. PaulOn 6/28/12 10:07 AM, Roman D. Boiko wrote:.exp might potentially lead to confusion regarding std.math.exp with UFCS in place. Not that this would be a huge deal, but since new property would be used only very rarely anyway, I don't think going for a longer name like .exponent or even rawExponent/exponentBits/… would be a problem. DavidOn Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .expI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with sign
Jun 29 2012
On Thursday, 28 June 2012 at 16:50:59 UTC, David Nadlinger wrote:On Thursday, 28 June 2012 at 14:35:24 UTC, Andrei Alexandrescu wrote:How about .mant and .expo? That's what I'm using in the BigDecimal/BigFloat modules as private names. The property names are .coefficient and .exponent.On 6/28/12 10:07 AM, Roman D. Boiko wrote:.exp might potentially lead to confusion regarding std.math.exp with UFCS in place. Not that this would be a huge deal, but since new property would be used only very rarely anyway, I don't think going for a longer name like .exponent or even rawExponent/exponentBits/… would be a problem. DavidOn Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote:.mantissa and .expI think just exposing them via .sig and .exp might be the way to go?sig is easy to confuse with sign
Jun 29 2012
On 6/21/2012 11:49 PM, Mehrdad wrote:On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:One way is to get the library source code for the C compiler and study it.On 6/21/2012 11:07 PM, Mehrdad wrote:Where do you find the "detail"?Good luck getting the C-runtime part of the "D runtime" right..It's not that hard. But there's a lot of detail to learn & take care of.
Jun 22 2012
On Friday, 22 June 2012 at 09:50:54 UTC, Walter Bright wrote:On 6/21/2012 11:49 PM, Mehrdad wrote:By "get" you mean "buy", right? I find that to be against D's (supposedly) open-source nature...On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:One way is to get the library source code for the C compiler and study it.On 6/21/2012 11:07 PM, Mehrdad wrote:Where do you find the "detail"?Good luck getting the C-runtime part of the "D runtime" right..It's not that hard. But there's a lot of detail to learn & take care of.
Jun 22 2012
On Friday, 22 June 2012 at 14:11:59 UTC, Mehrdad wrote:On Friday, 22 June 2012 at 09:50:54 UTC, Walter Bright wrote:Well Walter can also decide to invest his time somewhere else, he needs to pay his bills...On 6/21/2012 11:49 PM, Mehrdad wrote:By "get" you mean "buy", right? I find that to be against D's (supposedly) open-source nature...On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:One way is to get the library source code for the C compiler and study it.On 6/21/2012 11:07 PM, Mehrdad wrote:Where do you find the "detail"?Good luck getting the C-runtime part of the "D runtime" right..It's not that hard. But there's a lot of detail to learn & take care of.
Jun 22 2012
On 6/22/2012 7:11 AM, Mehrdad wrote:For Digital Mars C, yes you can buy it. For gcc, you can look at the C library source code for free. I'm sure the latter does the same things.One way is to get the library source code for the C compiler and study it.By "get" you mean "buy", right?I find that to be against D's (supposedly) open-source nature...D is open source, however, that isn't necessarily true of C. For example, the Win64 version of dmd will be designed to work with Microsoft VS, which will cost $500.
Jun 22 2012
On Friday, 22 June 2012 at 17:23:38 UTC, Walter Bright wrote:D is open source, however, that isn't necessarily true of C. For example, the Win64 version of dmd will be designed to work with Microsoft VS, which will cost $500.Sorry, Walter, I didn't understand this statement. Did you mean VS will cost $500? Did you mean Win64 version of dmc (not dmd)? If no, than how will dmd be designed to work with VS?
Jun 22 2012
On 6/22/2012 10:28 AM, Roman D. Boiko wrote:Did you mean VS will cost $500?Yes (or whatever price MS sets it at).Did you mean Win64 version of dmc (not dmd)?No. I meant dmd for Win64.If no, than how will dmd be designed to work with VS?By emitting code that will link with VS code & libraries.
Jun 22 2012
On 22-Jun-12 22:47, Walter Bright wrote:On 6/22/2012 10:28 AM, Roman D. Boiko wrote:I believe SDK with compiler is a free download though I might be off on this.Did you mean VS will cost $500?Yes (or whatever price MS sets it at).Great. -- Dmitry OlshanskyDid you mean Win64 version of dmc (not dmd)?No. I meant dmd for Win64.If no, than how will dmd be designed to work with VS?By emitting code that will link with VS code & libraries.
Jun 22 2012
On Friday, 22 June 2012 at 18:56:48 UTC, Dmitry Olshansky wrote:I believe SDK with compiler is a free download though I might be off on this.Also, there are Express editions of Visual Studio which are currently, and will be at least for the next release, free for download. Originally, Microsoft wanted to include only the SDK for »Metro-style« apps with VC++ 2012 Express, but after this caused massively negative reactions in the developer/internet/open-source/… community, a native code edition was announced as well. David
Jun 22 2012
On 22-Jun-12 23:23, David Nadlinger wrote:Originally, Microsoft wanted to include only the SDK for »Metro-style« apps with VC++ 2012 Express, but after this caused massively negative reactions in the developer/internet/open-source/… community, a native code edition was announced as well. DavidYay! P.S. Sorry can't resist ;) -- Dmitry Olshansky
Jun 22 2012
On Friday, 22 June 2012 at 19:23:10 UTC, David Nadlinger wrote:On Friday, 22 June 2012 at 18:56:48 UTC, Dmitry Olshansky wrote:I guess you wanted to say "desktop" instead of "native code", as Metro is also native code.I believe SDK with compiler is a free download though I might be off on this.Also, there are Express editions of Visual Studio which are currently, and will be at least for the next release, free for download. Originally, Microsoft wanted to include only the SDK for »Metro-style« apps with VC++ 2012 Express, but after this caused massively negative reactions in the developer/internet/open-source/… community, a native code edition was announced as well. David
Jun 22 2012
On Friday, 22 June 2012 at 22:46:28 UTC, Paulo Pinto wrote:I guess you wanted to say "desktop" instead of "native code", as Metro is also native code.Yes, of course, that's what I meant.
Jun 22 2012
Paulo Pinto:as Metro is also native code.Are you sure? Do you have a reference on this? Bye, bearophile
Jun 28 2012
On Thursday, 28 June 2012 at 13:39:54 UTC, bearophile wrote:Paulo Pinto:The huge amount of documentation made available at BUILD time, plus Windows 8 to play with? WinRT (aka Metro) is COM based. Instead of me dumping a list of links, what you want to know exactly? -- Pauloas Metro is also native code.Are you sure? Do you have a reference on this? Bye, bearophile
Jun 28 2012
Paulo Pinto:The huge amount of documentation made available at BUILD time, plus Windows 8 to play with? WinRT (aka Metro) is COM based. Instead of me dumping a list of links, what you want to know exactly?OK. No need for a list. Bye, bearophile
Jun 28 2012
On Friday, 22 June 2012 at 18:56:48 UTC, Dmitry Olshansky wrote:On 22-Jun-12 22:47, Walter Bright wrote:Correct. VS SDK is free, the same is true for Windows SDK. Also there are VS express and VS shell, which are also free. But I'm sure that Visual Studio itself is not a dependency and there is nothing to link to in it, only in SDKs.On 6/22/2012 10:28 AM, Roman D. Boiko wrote:I believe SDK with compiler is a free download though I might be off on this.Did you mean VS will cost $500?Yes (or whatever price MS sets it at).
Jun 22 2012
On Jun 22, 2012, at 11:47 AM, Walter Bright wrote:On 6/22/2012 10:28 AM, Roman D. Boiko wrote:I think there's a free version of VS.Did you mean VS will cost $500?Yes (or whatever price MS sets it at).
Jun 22 2012
On Fri, Jun 22, 2012 at 1:19 PM, Sean Kelly <sean invisibleduck.org> wrote:On Jun 22, 2012, at 11:47 AM, Walter Bright wrote:Yes, Visual Studio Express. They had announced that Visual Studio Express 2012 wouldn't support native applications (only target Window 8's WinRT) but they have since reversed that decision. Unless there is some other obstacle that gets in the way Win64 DMD users should be able to get everything they need for free. Regards, Brad AndersonOn 6/22/2012 10:28 AM, Roman D. Boiko wrote:I think there's a free version of VS.Did you mean VS will cost $500?Yes (or whatever price MS sets it at).
Jun 22 2012
Am 22.06.2012 19:23, schrieb Walter Bright:On 6/22/2012 7:11 AM, Mehrdad wrote:I'm afright. Please explain what is meant by this, Walter.For Digital Mars C, yes you can buy it. For gcc, you can look at the C library source code for free. I'm sure the latter does the same things.One way is to get the library source code for the C compiler and study it.By "get" you mean "buy", right?I find that to be against D's (supposedly) open-source nature...D is open source, however, that isn't necessarily true of C. For example, the Win64 version of dmd will be designed to work with Microsoft VS, which will cost $500.
Jun 22 2012
On Friday, 22 June 2012 at 18:26:22 UTC, mta`chrono wrote:Am 22.06.2012 19:23, schrieb Walter Bright:I also asked for clarification a few posts before. Most likely Walter meant that DMC (not DMD) for Win64 will work with Visual Studio, which is not free. Also DMC is not free, but it costs way below $500.D is open source, however, that isn't necessarily true of C. For example, the Win64 version of dmd will be designed to work with Microsoft VS, which will cost $500.I'm afright. Please explain what is meant by this, Walter.
Jun 22 2012
Am 22.06.2012 20:30, schrieb Roman D. Boiko:On Friday, 22 June 2012 at 18:26:22 UTC, mta`chrono wrote:no - dmd64 will work with VSAm 22.06.2012 19:23, schrieb Walter Bright:I also asked for clarification a few posts before. Most likely Walter meant that DMC (not DMD) for Win64 will work with Visual Studio, which is not free. Also DMC is not free, but it costs way below $500.D is open source, however, that isn't necessarily true of C. For example, the Win64 version of dmd will be designed to work with Microsoft VS, which will cost $500.I'm afright. Please explain what is meant by this, Walter.
Jun 22 2012
On 22 June 2012 07:35, Walter Bright <newshound2 digitalmars.com> wrote:On 6/21/2012 11:07 PM, Mehrdad wrote:Wouldn't it be useful if the compiler had diagnostics for all implicit allocations it makes (ie: closures, array literals)? Similar to that of the -vtls switch. These such things you may want to avoid in a freestanding environment (no link to C runtime). -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';On Thursday, 21 June 2012 at 19:44:40 UTC, Walter Bright wrote:It's not that hard. But there's a lot of detail to learn & take care of.On 6/21/2012 9:39 AM, Alex wrote:Good luck getting the C-runtime part of the "D runtime" right..is it possible to use D to write code to work without OS? like i do it with gcc.Sure. But you'll need to thoroughly understand how the D runtime startup code works, so you can adjust as necessary.
Jun 28 2012
On Jun 28, 2012, at 9:45 AM, Iain Buclaw wrote:=20 Wouldn't it be useful if the compiler had diagnostics for all implicit allocations it makes (ie: closures, array literals)? Similar to that of the -vtls switch. These such things you may want to avoid in a freestanding environment (no link to C runtime).Yes it would. I guess the question is how to expose this. Generally = speaking though, array append type operations allocate, AA insertions = allocate, and non-scope delegate use allocates. I think that's it.=
Jun 28 2012
On 28 June 2012 18:02, Sean Kelly <sean invisibleduck.org> wrote:On Jun 28, 2012, at 9:45 AM, Iain Buclaw wrote:speaking though, array append type operations allocate, AA insertions allo= cate, and non-scope delegate use allocates. =A0I think that's it.Wouldn't it be useful if the compiler had diagnostics for all implicit allocations it makes (ie: closures, array literals)? =A0Similar to that of the -vtls switch. These such things you may want to avoid in a freestanding environment (no link to C runtime).Yes it would. =A0I guess the question is how to expose this. =A0Generally=From a user perspective? A switch that has a less ugly than-vimplicit_library_calls. Which spurts out messages like: "Function %s builds a closure", func or "Expression %s makes implicit allocation call to %s", expr, func --=20 Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';
Jun 29 2012
Iain Buclaw:http://d.puremagic.com/issues/show_bug.cgi?id=5070 Bye, bearophileFrom a user perspective? A switch that has a less ugly than-vimplicit_library_calls. Which spurts out messages like: "Function %s builds a closure", func
Jun 29 2012
On Friday, 22 June 2012 at 06:07:59 UTC, Mehrdad wrote:On Thursday, 21 June 2012 at 19:44:40 UTC, Walter Bright wrote:I don't really know the runtime code of the generated binary code, but this is no different than other high level languages used for OS development, like Modula-3 or Oberon. The C runtime just needs to be replaced by an Assembly runtime that provides the ground work for the language runtime at the OS level. The way this is done on Oberon's case is well documented. After all the reason why C has so tiny runtime, is that in C the OS is the language runtime.On 6/21/2012 9:39 AM, Alex wrote:Good luck getting the C-runtime part of the "D runtime" right..is it possible to use D to write code to work without OS? like i do it with gcc.Sure. But you'll need to thoroughly understand how the D runtime startup code works, so you can adjust as necessary.
Jun 22 2012
On Thursday, 21 June 2012 at 16:39:07 UTC, Alex wrote:is it possible to use D to write code to work without OS? like i do it with gcc.by the way, with which args i must run D to generate raw binary?
Feb 11 2014
On Tuesday, 11 February 2014 at 11:53:48 UTC, AlexPhoenix wrote:by the way, with which args i must run D to generate raw binary?This is more of a linker question than a compiler one... check out the makefile.bare in here http://arsdnet.net/dcode/minimal.zip It makes a raw binary that can be loaded by GRUB
Feb 11 2014
On Tuesday, 11 February 2014 at 18:09:56 UTC, Adam D. Ruppe wrote:On Tuesday, 11 February 2014 at 11:53:48 UTC, AlexPhoenix wrote:I found trouble. I trying to do the same with: dmd -m32 -debug -c ITextScreen.d -gc -defaultlib= -debuglib= -version=bare_metal -debug=allocations and the then i trying to link with ld(also try with objcopy and gcc) from MinGW, and have ITextScreen.obj: file not recognized: File format not recognized what i do wrong?by the way, with which args i must run D to generate raw binary?This is more of a linker question than a compiler one... check out the makefile.bare in here http://arsdnet.net/dcode/minimal.zip It makes a raw binary that can be loaded by GRUB
Feb 13 2014