On Thursday, 21 June 2012 at 19:44:40 UTC, Walter Bright wrote:
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
On 6/21/2012 11:07 PM, Mehrdad wrote:
On Thursday, 21 June 2012 at 19:44:40 UTC, Walter Bright wrote:
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
On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:
On 6/21/2012 11:07 PM, Mehrdad wrote:
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.
Where do you find the detail?
(Remember this, below?)
On Thu, 21 Jun 2012 10:51:03 -0700, Dmitry Olshansky
dmitry.o...@gmail.com wrote:
On 21-Jun-12 11:40, bearophile wrote:
For DMD in GitHub there are more than one hundred open pull requests
(currently 111). So far people have created more than one thousand
patches for DMD (currently 1022):
On Thursday, 21 June 2012 at 19:43:40 UTC, Walter Bright wrote:
On 6/21/2012 10:56 AM, Paulo Pinto wrote:
On Tuesday, 19 June 2012 at 20:06:28 UTC, Walter Bright wrote:
On 6/19/2012 11:28 AM, Alex Rønne Petersen wrote:
I think we need to be clear on this: Does DMD support
Solaris? I would
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:
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
On 22-Jun-12 10:49, Mehrdad wrote:
On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:
On 6/21/2012 11:07 PM, Mehrdad wrote:
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.
Where do you find
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
Jesse Phillips wrote:
On Thursday, 21 June 2012 at 20:30:07 UTC, Jens Mueller wrote:
auto file = File(filename, r);
auto records = csvReader!(Record)(file.byLine());
Am I missing something? Was this left out for a reason or an
oversight?
Jens
You might make use of
On 22-Jun-12 12:08, Mehrdad wrote:
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
Pull request #221 and #585 both introduce modules for a new std.hash
package. As those already change API compared to the old std.crc32 and
std.md5 modules we should probably decide on a common interface for all
std.hash modules.
These are the imho most important questions:
Free function
On 22-Jun-12 13:11, Johannes Pfau wrote:
Pull request #221 and #585 both introduce modules for a new std.hash
package. As those already change API compared to the old std.crc32 and
std.md5 modules we should probably decide on a common interface for all
std.hash modules.
These are the imho most
On 6/21/2012 11:49 PM, Mehrdad wrote:
On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:
On 6/21/2012 11:07 PM, Mehrdad wrote:
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.
Where do you find
Put up or shut up? First question for a programmer (?) what is rape?
Is programming a rape job so no one will do it anymore.. one can only
hope..
what is rape? The Ameritech post-menapausal-bitch trying to scare me? What
was her name? I forget. Lucky for that ugly cunt.
Am Fri, 22 Jun 2012 13:33:41 +0400
schrieb Dmitry Olshansky dmitry.o...@gmail.com:
On 22-Jun-12 13:11, Johannes Pfau wrote:
Pull request #221 and #585 both introduce modules for a new std.hash
package. As those already change API compared to the old std.crc32
and std.md5 modules we should
On Fri, 22 Jun 2012 10:11:10 +0100, Johannes Pfau nos...@example.com
wrote:
Pull request #221 and #585 both introduce modules for a new std.hash
package. As those already change API compared to the old std.crc32 and
std.md5 modules we should probably decide on a common interface for all
On 22/06/12 10:08, Mehrdad wrote:
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
I like the way you change your name, like it fools anyone. Why on
earth troll a little humble NG like this? I know you're drunk and
emo, because of the shit you're posting (srsly, get over her, how
long has it been at this point? Years?), but I'm curious.
Bernard, 'feeding the troll'.
Am Fri, 22 Jun 2012 12:03:27 +0100
schrieb Regan Heath re...@netmail.co.nz:
It might help (or it might not) to have a glance at the design of
the hashing routines in Tango:
http://www.dsource.org/projects/tango/docs/current/
(see tango.util.digest etc)
I contributed some of the initial
On Friday, 22 June 2012 at 09:50:54 UTC, Walter Bright wrote:
On 6/21/2012 11:49 PM, Mehrdad wrote:
On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:
On 6/21/2012 11:07 PM, Mehrdad wrote:
Good luck getting the C-runtime part of the D runtime
right..
It's not that hard. But
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
On Friday, 22 June 2012 at 08:12:59 UTC, Jens Mueller wrote:
The last line throws a CSVException due to some conversion error
'Floating point conversion error for input .' for the
attached input.
If you change the input to
3.0
4.0
you get no exception but wrong a output of
[[4], [4]]
.
Yes,
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 from
Just replace all of symbols with abort stubs. Then implement the ones
you happen to actually need.
but
Jesse Phillips wrote:
On Friday, 22 June 2012 at 08:12:59 UTC, Jens Mueller wrote:
The last line throws a CSVException due to some conversion error
'Floating point conversion error for input .' for the attached
input.
If you change the input to
3.0
4.0
you get no exception but wrong a
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
On Friday, 22 June 2012 at 14:40:42 UTC, Dmitry Olshansky wrote:
I guess I'm not at your majesty's High Level yet? Thanks for
being so
helpful.
No problem.
Someone can't recognize sarcasm...
I meant actually low level. Like down to hardware/OS so it's
rather the opposite ;)
It's not like
Jens Mueller , dans le message (digitalmars.D:170448), a écrit :
Jesse Phillips wrote:
On Friday, 22 June 2012 at 08:12:59 UTC, Jens Mueller wrote:
The last line throws a CSVException due to some conversion error
'Floating point conversion error for input .' for the attached
input.
If you
On 06/22/2012 04:58 PM, Mehrdad wrote:
On Friday, 22 June 2012 at 14:40:42 UTC, Dmitry Olshansky wrote:
I guess I'm not at your majesty's High Level yet? Thanks for being so
helpful.
No problem.
Someone can't recognize sarcasm...
I meant actually low level. Like down to hardware/OS so
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
On Jun 21, 2012, at 10:56 AM, Paulo Pinto pj...@progtools.org wrote:
On Tuesday, 19 June 2012 at 20:06:28 UTC, Walter Bright wrote:
On 6/19/2012 11:28 AM, Alex Rønne Petersen wrote:
I think we need to be clear on this: Does DMD support Solaris? I would
expect
GDC and LDC to support it, but
Here's a first proposal for the API:
http://dl.dropbox.com/u/24218791/d/src/digest.html
One open question is:
What should we do if a too small buffer is passed to the finish
function (in the OOP API)?
Should we check for the length only in debug(assert) or in
debug+release mode (enforce) or
On 06/22/2012 05:21 PM, Mehrdad wrote:
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
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 quote
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
just saying I'm too stupid for this to help me anyway?
I
On Friday, 22 June 2012 at 15:37:16 UTC, Timon Gehr wrote:
You like blaming someone, or claiming someone has bad
intentions. Eg:
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
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
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:
On 6/21/2012 11:49 PM, Mehrdad wrote:
On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:
On 6/21/2012 11:07 PM, Mehrdad wrote:
Good luck getting the C-runtime part
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
On Fri, 22 Jun 2012 14:21:28 +0100, Johannes Pfau nos...@example.com
wrote:
Am Fri, 22 Jun 2012 12:03:27 +0100
schrieb Regan Heath re...@netmail.co.nz:
It might help (or it might not) to have a glance at the design of
the hashing routines in Tango:
On Fri, 22 Jun 2012 18:12:20 +0100, Regan Heath re...@netmail.co.nz
wrote:
people can always pass the result of finish string into the method
Aargh! ..people can always pass the result of finish STRAIGHT into the
method..
--
Using Opera's revolutionary email client:
On 6/22/2012 7:11 AM, Mehrdad wrote:
One way is to get the library source code for the C compiler and study it.
By get you mean buy, right?
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.
I find
On 6/22/2012 7:17 AM, Mehrdad wrote:
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
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
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
On Friday, 22 June 2012 at 15:11:14 UTC,
trav...@phare.normalesup.org (Christophe Travert) wrote:
Fixing this should not be very hard. Is there an issue
preventing to
make this change?
I'd say start by filing a bug that joiner does not work with
File.byLine()
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:
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
Am Fri, 22 Jun 2012 18:12:20 +0100
schrieb Regan Heath re...@netmail.co.nz:
Agreed. In fact I wouldn't bother with finishString either TBH,
people can always pass the result of finish string into the method
which produces the hex string representation.
In any case, we can probably have
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
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
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:
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
On Friday, June 22, 2012 19:33:39 Jesse Phillips wrote:
On Friday, 22 June 2012 at 15:11:14 UTC,
trav...@phare.normalesup.org (Christophe Travert) wrote:
Fixing this should not be very hard. Is there an issue
preventing to
make this change?
I'd say start by filing a bug that joiner
As was recently pointed out on the Phobos list (
http://forum.dlang.org/post/CAEnAdhZTcuOL50TeRwCCG=E99nCA_Gh=y=ttheugknueac0...@mail.gmail.com
), we technically have std.typelist (which I'd never heard of before that
post), which Bartosz Milewski put together a few years ago. However, it's
On 22-06-2012 20:06, Jonathan M Davis wrote:
As was recently pointed out on the Phobos list (
http://forum.dlang.org/post/CAEnAdhZTcuOL50TeRwCCG=E99nCA_Gh=y=ttheugknueac0...@mail.gmail.com
), we technically have std.typelist (which I'd never heard of before that
post), which Bartosz Milewski put
On Fri, 22 Jun 2012 20:06:10 +0200, Jonathan M Davis jmdavisp...@gmx.com
wrote:
As was recently pointed out on the Phobos list (
http://forum.dlang.org/post/CAEnAdhZTcuOL50TeRwCCG=E99nCA_Gh=y=ttheugknueac0...@mail.gmail.com
), we technically have std.typelist (which I'd never heard of before
Am 22.06.2012 19:23, schrieb Walter Bright:
On 6/22/2012 7:11 AM, Mehrdad wrote:
One way is to get the library source code for the C compiler and
study it.
By get you mean buy, right?
For Digital Mars C, yes you can buy it. For gcc, you can look at the C
library source code for free. I'm
On Friday, 22 June 2012 at 18:26:22 UTC, mta`chrono wrote:
Am 22.06.2012 19:23, schrieb Walter Bright:
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
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
On 22-Jun-12 20:08, Mehrdad wrote:
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
On 22-Jun-12 22:47, Walter Bright wrote:
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).
I believe SDK with compiler is a free download though I might be off on
this.
Did you mean Win64 version of dmc (not dmd)?
No.
Isn't this what a do-while loop is for, or am I missing
something?
Well, yes, but then you don't need the regular for loop either.
After all, isn't that what a while loop is for?
The big advantage of for is that you can see at a glance what
the initialisation, condition(s) and increments
Wow, I never noticed that this file exists, even though I'm
routinely doing metaprogramming-heavy stuff…
The obligatory references to other »meta« code:
[1]
https://github.com/sinfu/phobos-sandbox/blob/master/std/internal/meta/meta.d
[2]
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
On Jun 22, 2012, at 11:47 AM, Walter Bright wrote:
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).
I think there's a free version of VS.
I believe that auto has been redefined in C++11 as well. In
both, all it really
means is that the type is inferred.
That's what I seemed to remember as well. Originally it had
something to do with scope, but it was basically obsolete because
that was the default storage class anyway, so
On Fri, Jun 22, 2012 at 1:19 PM, Sean Kelly s...@invisibleduck.org wrote:
On Jun 22, 2012, at 11:47 AM, Walter Bright wrote:
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).
I think there's a free version of VS.
Yes,
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,
On 22-06-2012 21:13, David Nadlinger wrote:
Wow, I never noticed that this file exists, even though I'm routinely
doing metaprogramming-heavy stuff…
The obligatory references to other »meta« code:
[1]
https://github.com/sinfu/phobos-sandbox/blob/master/std/internal/meta/meta.d
[2]
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.
David
On Friday, 22 June 2012 at 18:56:48 UTC, Dmitry Olshansky wrote:
On 22-Jun-12 22:47, Walter Bright wrote:
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).
I believe SDK with compiler is a free download though I might
be
I believe that auto has been redefined in C++11 as well. In
both, all it really
means is that the type is inferred.
That's what I seemed to remember as well. Originally it had
something to do with scope, but it was basically obsolete because
that was the default anyway, so nobody was using it.
On 06/22/12 21:13, David Nadlinger wrote:
This is not to say that I don't find the std.typelist concept
interesting. We just should be very clear on how to go forward with
»meta« algorithms in Phobos before going forward with this. Developing
std.typelist and std.typetuple side by side, and
On 06/22/2012 08:57 PM, Michel Colman wrote:
Isn't this what a do-while loop is for, or am I missing something?
Well, yes, but then you don't need the regular for loop either. After
all, isn't that what a while loop is for?
The big advantage of for is that you can see at a glance what the
On Friday, 22 June 2012 at 19:52:37 UTC, Guillaume Chatelet wrote:
+1, I'd add std.typecons to this list ( std.typecons.Tuple in
particular ).
The boundaries of each of those modules are kind of blurry and
overlapping.
std.typecons.Tuple lives in the run-time (and CTFE, for that
matter)
import std.container;
struct A {};
void main()
{
Array!(A)* arr = new Array!(A);
}
yields
bug.d(7): Error: template std.container.Array!(A).Array.__ctor
does not match any function template declaration
/usr/include/d/std/container.d(1625): Error: template
Seems to me that you achieved the your first purpose. Do you
need more help?
Kenji Hara
I think i'm finished. Or have you any tip for me, related to the
code?
Well, maybe idup is a bit better then assumeuniqe.
I don't work anymore with that mutable array on the workerthread but
using idup is in all cases allowed and cannot cause subtle bugs like
me reusing a mutable array that I've casted to immutable and send over
to another thread.
It's a shame that
On Friday, June 22, 2012 11:09:13 maarten van damme wrote:
It looks a bit dirty to
convert to immutable and back to mutable simply to pass it over to
another thread...
It is, but casting to shared and back again is pretty much the same thing. So,
in most cases, you're going to end up doing
Bug or by design? (using dmd head)
import std.conv;
void main() {
to!(ubyte[])();
}
std/array.d(493): Attempting to fetch the front of an empty array of
immutable(char)
to(_d_assert_msg+0x45) [0x43700d]
to(@property dchar
Based to the current const discussions (once again) I wanted to
appease my curiosity and want to ask why the following code works
as described in the comments:
[code]
import std.stdio;
class Bar { }
class Foo {
private:
string _text;
Bar _b;
public:
On 06/22/2012 08:45 AM, Tobias Pankrath wrote:
import std.container;
struct A {};
void main()
{
Array!(A)* arr = new Array!(A);
}
yields
bug.d(7): Error: template std.container.Array!(A).Array.__ctor does not
match any function template declaration
/usr/include/d/std/container.d(1625):
I have this code:
http://codepad.org/vz17iZrm
And as long as i comment out the assert's in the constructor on
line 10 and the assert in the invariant on line 16 it works as i
want.
But otherwise the compiler prints stackoverflow and that's all.
Why and how is the stack overflowed with an
On 06/22/2012 11:21 AM, Namespace wrote:
Based to the current const discussions (once again) I wanted to appease
my curiosity and want to ask why the following code works as described
in the comments:
[code]
import std.stdio;
class Bar { }
class Foo {
private:
string _text;
Bar
As far as i know int is not immutable or const by default.
So, why work this code:
[code]
import std.stdio;
class Bar {
}
class Foo {
private:
int _id;
Bar _b;
public:
this(int id, Bar b) {
this._id = id;
On 22-06-2012 12:22, Namespace wrote:
I have this code:
http://codepad.org/vz17iZrm
And as long as i comment out the assert's in the constructor on line 10
and the assert in the invariant on line 16 it works as i want.
But otherwise the compiler prints stackoverflow and that's all.
Why and how
On 06/22/2012 12:22 PM, Namespace wrote:
I have this code:
http://codepad.org/vz17iZrm
And as long as i comment out the assert's in the constructor on line 10
and the assert in the invariant on line 16 it works as i want.
But otherwise the compiler prints stackoverflow and that's all.
Why and
On Friday, 22 June 2012 at 09:18:38 UTC, simendsjo wrote:
Bug or by design? (using dmd head)
import std.conv;
void main() {
to!(ubyte[])();
}
std/array.d(493): Attempting to fetch the front of an empty
array of immutable(char)
[snip]
It is design. With the conversion from string to
On 06/22/2012 12:25 PM, Namespace wrote:
As far as i know int is not immutable or const by default.
So, why work this code:
[code]
import std.stdio;
class Bar {
}
class Foo {
private:
int _id;
Bar _b;
public:
this(int id, Bar b) {
this._id = id;
this._b =
On my machine it is the compiler that crashes = compiler bug.
Presumably it is having trouble with the circular alias this.
My first try to avoid this circular bug work with opDispatch.
(As you can read here on my blog:
http://blog.rswhite.de/archives/741)
Now i had a new idea to save the
Is this expected and good?
void main() {
int[] array = [1, 2];
foreach (ref const(int) x; array) {} // OK
foreach (ref immutable(int) x; array) {} // error
}
DMD 2.060alpha:
temp.d(4): Error: argument type mismatch, int to ref
immutable(int)
Thank you,
bye,
bearophile
On Friday, 22 June 2012 at 10:19:13 UTC, Timon Gehr wrote:
On 06/22/2012 08:45 AM, Tobias Pankrath wrote:
import std.container;
struct A {};
void main()
{
Array!(A)* arr = new Array!(A);
}
yields
bug.d(7): Error: template std.container.Array!(A).Array.__ctor
does not
match any function
On Friday, 22 June 2012 at 11:07:14 UTC, bearophile wrote:
Is this expected and good?
void main() {
int[] array = [1, 2];
foreach (ref const(int) x; array) {} // OK
foreach (ref immutable(int) x; array) {} // error
}
DMD 2.060alpha:
temp.d(4): Error: argument type mismatch, int
Tobias Pankrath:
I think it's good. In this special case, the compiler can see
that you can't change array behind his back. That seems not to
be true in general.
But aren't int implicitly castable to immutable?
Bye,
bearophile
On 22-Jun-12 16:16, bearophile wrote:
Tobias Pankrath:
I think it's good. In this special case, the compiler can see that you
can't change array behind his back. That seems not to be true in general.
But aren't int implicitly castable to immutable?
then every array is implicitly castable
Dmitry Olshansky:
then every array is implicitly castable to tail immutable.
int[] array = [1, 2];
foreach (ref immutable(int) x; array) {
...
func(arr); // arr is mutable, thus func can change x
// so x can be at most const
}
I understand, thank you :-)
Am 22.06.2012 12:52, schrieb Namespace:
On my machine it is the compiler that crashes = compiler bug.
Presumably it is having trouble with the circular alias this.
My first try to avoid this circular bug work with opDispatch. (As you
can read here on my blog:
If you have a null object you get an Access Violation without
_any_ further information. That totally sucks.
And in my opinion a small Ref!Type is more informative for
others who use your code and you do not have to write assert(obj
!is null); any time in any method again.
And yes my program
On Fri, 22 Jun 2012 15:55:12 +0100, Namespace rswhi...@googlemail.com
wrote:
If you have a null object you get an Access Violation without _any_
further information. That totally sucks.
It doesn't have to be that way.
A debug executable contains all sort of debugging information and a
Am 22.06.2012 16:55, schrieb Namespace:
If you have a null object you get an Access Violation without _any_
further information. That totally sucks.
I don't know what you're doing or which debugger you use, gdb shows me
exactly what happened (line + stack + object).
And in my opinion a
On Friday, June 22, 2012 19:59:48 David wrote:
Am 22.06.2012 16:55, schrieb Namespace:
If you have a null object you get an Access Violation without _any_
further information. That totally sucks.
I don't know what you're doing or which debugger you use, gdb shows me
exactly what happened
I'm sorry, what I meant was how to interface to C code. Sorry
for writing it in a bad way.
Do I just declare the C code as extern and then link together
with the C .lib/.o/.so file? (I'm in Ubuntu)
What about the stuff that is in header files?
On Sunday, 17 June 2012 at 07:23:38 UTC, Russel Winder wrote:
On Sun, 2012-06-17 at 03:15 +0200, Henrik Valter Vogelius
Hansson wrote:
Hi again!
I have looked around a little with what D offers but don't
know really what I should use since D offers several ways to
use threads. Some more high
1 - 100 of 115 matches
Mail list logo