Michael Stover wrote:
This sort of reference count with cyclic dependency detector is how a
lot of scripting languages do it, or did it in the past. The problem
was that lazy generational GCs are believed to have better throughput in
general.
I'd like to say were proved rather than are
On 04/22/2011 10:18 PM, frostmind wrote:
Thank you for your response! Hopefully I've done it right.
Now when everything is within the same folder,
and I execute:
dmd test_d_client.d -L.
(so I'm telling to look for libs in current dir)
Response is now different:
ld: in ., can't map file,
== Quote from bearophile (bearophileh...@lycos.com)'s article
Iain Buclaw:
Variable length arrays are just sugary syntax for a call to alloca.
I have an enhancement request in Bugzilla on VLA, with longer discussions.
Just
two comments:
- It seems alloca() can be implemented with two
On 4/22/11 4:04 PM, Timon Gehr wrote:
[snip]
This is also the reason I think it is a bad idea to deprecate D's
'delete'.
The functionality is not going away.
Andrei
On 4/22/11 5:21 PM, Iain Buclaw wrote:
== Quote from bearophile (bearophileh...@lycos.com)'s article
Timon Gehr:
But, as pointed out by Linus, the prime performance problem is _not_ the GC, but
the mindset that comes with it. Most programmers that grew up in a managed
environment tend to use
On 4/23/2011 9:48 AM, Andrei Alexandrescu wrote:
On 4/22/11 5:21 PM, Iain Buclaw wrote:
== Quote from bearophile (bearophileh...@lycos.com)'s article
Timon Gehr:
But, as pointed out by Linus, the prime performance problem is _not_
the GC, but
the mindset that comes with it. Most programmers
I think this is a module (a standard command) of the Go standard library, it
formats Go code in a standard way:
http://golang.org/cmd/gofmt/
People use it, it's a way to enforce a shared coding style in the community
of programmers of a language. So they are able to share modules with each
Andrei:
Well in fairness they can be a fair amount more elaborate. The trouble
with alloca is that it's impossible to compose with. So in general you
need to write something like:
bool onStack = smallEnough(length * sizeof(T));
auto a = (cast(T*) (onStack ? alloca : malloc)(length *
dsimcha:
Right. This is exactly the kind of thing TempAlloc was meant to solve.
I think TempAlloc is meant for larger allocations. D-VLAs are meant to allocate
little arrays (like 1 KB or less) on the normal stack very quickly.
Bye,
bearophile
Andrei:
bool onStack = smallEnough(length * sizeof(T));
auto a = (cast(T*) (onStack ? alloca : malloc)(length * sizeof(T)));
scope(exit) if (!onStack) free(a.ptr);
initialize(enforce(a));
scope(exit) clear(a);
This block is difficult to factor out because of alloca.
As I have explained
http://golang.org/cmd/gofmt/
Oh my. Check this out:
Examples
To check files for unnecessary parentheses:
gofmt -r '(a) - a' -l *.go
To remove the parentheses:
What a scary example. What an AST considers unnecessary parenthesis
is probably very different from what I consider
On 4/23/2011 10:24 AM, bearophile wrote:
dsimcha:
Right. This is exactly the kind of thing TempAlloc was meant to solve.
I think TempAlloc is meant for larger allocations. D-VLAs are meant to allocate
little arrays (like 1 KB or less) on the normal stack very quickly.
Bye,
bearophile
On 4/23/11 8:57 AM, dsimcha wrote:
BTW, since when does the ternary operator work with functions, as
opposed to variables?
They are converted to pointers to functions. Not something I'd recommend
because it makes the call slower.
Andrei
On 4/22/11 4:04 PM, Timon Gehr wrote:
[snip]
This is also the reason I think it is a bad idea to deprecate D's
'delete'.
The functionality is not going away.
Andrei
Yes I realize that. It is a matter of syntax and aesthetics. Handling allocation
and deallocation non-uniformly renders the
On 4/23/11 11:33 AM, Timon Gehr wrote:
On 4/22/11 4:04 PM, Timon Gehr wrote:
[snip]
This is also the reason I think it is a bad idea to deprecate D's
'delete'.
The functionality is not going away.
Andrei
Yes I realize that. It is a matter of syntax and aesthetics. Handling allocation
and
dsimcha:
It's slightly slower than VLAs,
but the difference is negligible since it's still almost never a
threading bottleneck and you still have to do something with the array
you allocated.
I have to compare the performance of both for my use cases (fast allocations of
very small
Andrei Alexandrescu wrote:
Allocation and deallocation are not symmetric and as such handling them
in a uniform way would be a mistake that perpetuates a poor
understanding of the underlying realities of memory allocation and
object creation. I suggest you reconsider.
'char' is completely
On 4/22/2011 2:04 PM, Timon Gehr wrote:
The reason Java is garbage collected is _not_ performance, but primarily
reliability.
I believe a GC is required if one wishes to prove memory safety, which is
definitely a design goal of Java.
On 2011-04-22 01:54, Jonathan M Davis wrote:
Jonathan M Davis wrote:
I just checked. Exception _does_ take a default file and line number.
Huh, maybe my dmd is getting old.
Maybe we should revisit this after the next dmd release. Sounds like
one is coming pretty soon with a lot of yummy
Timon Gehr wrote:
Andrei Alexandrescu wrote:
Allocation and deallocation are not symmetric and as such handling them
in a uniform way would be a mistake that perpetuates a poor
understanding of the underlying realities of memory allocation and
object creation. I suggest you reconsider.
'char'
On 4/23/11 1:05 PM, Timon Gehr wrote:
Andrei Alexandrescu wrote:
Allocation and deallocation are not symmetric and as such handling them
in a uniform way would be a mistake that perpetuates a poor
understanding of the underlying realities of memory allocation and
object creation. I suggest you
On 2011-04-22 01:54, Jonathan M Davis wrote:
Jonathan M Davis wrote:
I just checked. Exception _does_ take a default file and line number.
Huh, maybe my dmd is getting old.
Maybe we should revisit this after the next dmd release. Sounds like
one is coming pretty soon with a lot of
I've re-read an old (1997-2000) article about Java. The author seems an expert
lisper. Of course some of those comments about Java are obsolete today:
http://www.jwz.org/doc/java.html
I don't remember if I have already shown this article here, I have found only
this, from 2001:
I've been curious for a while how close GDC2 and LDC2 are to being ready
for production use. Are the test suite results posted publicly for
either of these? Other than that, is there anything else other than
building and testing for myself that would give me a good idea of where
these
bearophile wrote:
Doing foo.x should be defined to be equivalent to foo.x(), with
lexical magic for foo.x = ... assignment.
[This is fixed/done in Scala language]
And in D: that's exactly how our properties are implemented right now.
[This last idea looks like C# extension methods]
And like
Hi,
I am trying to compile the code that was working with dmd 2.050 using
dmd 2.052.
The code compiles but it gives me errors with message when trying to run:
Cycle detected between modules with ctors/dtors
This was not happening earlier with 2.050. I am not able to produce a
smaller test
Hi,
I am trying to compile the code that was working with dmd 2.050 using
dmd 2.052.
The code compiles but it gives me errors with message when trying to run:
Cycle detected between modules with ctors/dtors
This was not happening earlier with 2.050. I am not able to produce a
I have created a stream from stdout by using the following method.
new CFile(stdout.getFP(), FileMode.Out)
It works but is this the correct way or is there a better way to achieve
this without FP.
Thanks Regards
Mandeep
On 04/23/2011 02:04 PM, Jonathan M Davis wrote:
Hi,
I am trying to compile the code that was working with dmd 2.050 using
dmd 2.052.
The code compiles but it gives me errors with message when trying to run:
Cycle detected between modules with ctors/dtors
This was not happening earlier with
On 04/23/2011 04:23 AM, Mandeep wrote:
I have created a stream from stdout by using the following method.
new CFile(stdout.getFP(), FileMode.Out)
It works but is this the correct way or is there a better way to achieve
this without FP.
Thanks Regards
Mandeep
Consider streams gone from D.
On 04/23/2011 04:23 AM, Mandeep wrote:
I have created a stream from stdout by using the following method.
new CFile(stdout.getFP(), FileMode.Out)
It works but is this the correct way or is there a better way to achieve
this without FP.
Thanks Regards
Mandeep
Consider
I'm in the same situation as the person who posted about this 5 years ago:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/thiscall_calling_convention_4943.html
This isn't so much relevant to COM as it is to this ASIO implementation. The
issue is that only Microsoft compilers can use
On 24/04/2011 02:23, Andrej Mitrovic wrote:
I'm in the same situation as the person who posted about this 5 years ago:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/thiscall_calling_convention_4943.html
This isn't so much relevant to COM as it is to this ASIO implementation. The
Then how come I can create an instance with CoCreateInstance without
the call failing and returning S_OK which means the call succeeded,
and I can also call void functions like IASIO.controlPanel() and get
back this:
http://imgur.com/v4Uct
And by calling IASIO.controlPanel(), I mean calling it on the instance.
E.g.:
class Foo
{
IASIO bar; // can call bar.controlPanel();
}
Ok, I was just making sure. I guess you would surely know about that.
I actually made a program that used date and time before your library.
Not nice. I guess I should go and revisit it. I use the program of mine
too, it boots with Windows.
On 04/23/2011 04:32 PM, Jonathan M Davis wrote:
On 04/23/2011 04:23 AM, Mandeep wrote:
I have created a stream from stdout by using the following method.
new CFile(stdout.getFP(), FileMode.Out)
It works but is this the correct way or is there a better way to
achieve
this without FP.
On 04/23/2011 04:32 PM, Jonathan M Davis wrote:
On 04/23/2011 04:23 AM, Mandeep wrote:
I have created a stream from stdout by using the following method.
new CFile(stdout.getFP(), FileMode.Out)
It works but is this the correct way or is there a better way to
achieve
http://d.puremagic.com/issues/show_bug.cgi?id=3334
kenn...@gmail.com changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5872
Summary: core.demangle, core.sys.*, core.stdc.* not documented
Product: D
Version: D2
Platform: All
URL: http://www.digitalmars.com/d/2.0/phobos/phobos.html
OS/Version: All
http://d.puremagic.com/issues/show_bug.cgi?id=5873
Summary: Cannot call iota() on long with step
Product: D
Version: D2
Platform: All
URL: https://github.com/D-Programming-Language/phobos/commi
t/3e6679b2#L3L3905
http://d.puremagic.com/issues/show_bug.cgi?id=2460
kenn...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5874
Summary: alloca should be pure
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority:
http://d.puremagic.com/issues/show_bug.cgi?id=5875
Summary: cannot implicitly convert delegate to const(delegate)
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=4460
Iain Buclaw ibuc...@ubuntu.com changed:
What|Removed |Added
Keywords||patch
http://d.puremagic.com/issues/show_bug.cgi?id=5675
Iain Buclaw ibuc...@ubuntu.com changed:
What|Removed |Added
CC||ibuc...@ubuntu.com
http://d.puremagic.com/issues/show_bug.cgi?id=5876
Summary: std.container doesn't work with delegates
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=3779
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=3792
--- Comment #8 from Walter Bright bugzi...@digitalmars.com 2011-04-23
15:50:37 PDT ---
D1 fix:
https://github.com/D-Programming-Language/dmd/commit/da0159d02d0e4ecb7ad1afa4bc6da402e677846f
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=5858
--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2011-04-23
15:51:12 PDT ---
https://github.com/D-Programming-Language/dmd/commit/da0159d02d0e4ecb7ad1afa4bc6da402e677846f
--
Configure issuemail:
50 matches
Mail list logo