On Fri, Jun 07, 2013 at 01:01:54AM +0200, bearophile wrote:
> H. S. Teoh:
>
> >The way to improve your coding skills is just to write
> >lots and lots of code. The more you write, the better
> >you'll get at it.
>
> Doing lot of exercise is not nearly enough. You also must do them
> "smartly". An
H. S. Teoh:
The way to improve your coding skills is just to write
lots and lots of code. The more you write, the better
you'll get at it.
Doing lot of exercise is not nearly enough. You also must do them
"smartly". And it's far from obvious what that means. And most
schools, movies, TV and
On Thu, Jun 06, 2013 at 10:50:05PM +0200, Daemon wrote:
> Hi there. I am mesmerized by D and I would love to start using it to
> really learn programming. I've tried it a year ago but failed
> miserably and went back to C#. The problem I have is that I've been
> using C# and I feel it left me cripp
On 06/06/2013 01:50 PM, Daemon wrote:
> I am mesmerized by D and I would love to start using it to really learn
> programming.
I agree with bearophile. I think D is easier to learn than C++.
> I decided that it would probably be best to start learning C++ and then,
> when I have solid understan
just to be clear, this is what i get:
0 test_stacktrace_sigint 0x000102e2f69f
handleTermination + 35
1 libsystem_c.dylib 0x7fff919d794a _sigtramp + 26
2 ??? 0x0005 0x0 + 5
3 test_stacktrace_sigint
Great!
two issues (on OSX at least):
A)
it seems the top-most element of the call stack gets chopped off; eg in
your code, the main_module.main symbol will not appear in the stack trace.
Any idea why or how to fix that?
Is that some inlining issue ? I tried with dmd -g, or -gs or -gc.
This can be
Daemon:
Thanks for any responses
Let's see. Your post is not longwinded. You don't need to learn
C++ to learn D.
On the other hand C++ has more books and free documentation
around. But I think learning C++ is harder than D, because D is
meant to be cleaned up compared to C++.
Today if you k
Hi there. I am mesmerized by D and I would love to start using it
to really learn programming. I've tried it a year ago but failed
miserably and went back to C#. The problem I have is that I've
been using C# and I feel it left me crippled. I don't understand
a lot of the 'mechanical stuff', lik
On Thursday, 6 June 2013 at 17:50:08 UTC, Chris Williams wrote:
...
It will work if use "enum" instead of "auto" for storing
attribute tuple. If compile-time value is needed you almost
always want to store it in enum.
Here's how I do it:
enum Dump; // just a type, no value here
template Dumper(T) {
void dump() {
foreach (mem; __traits(allMembers, T)) {
// loop over the attrs instead of try to store them in a
var
foreach(attr; __traits(getAttributes, __traits(getMember,
T, mem)))
I decided to write up a little application to test using User
Defined Attributes and have one question. Here is a working
application that allows me to mark certain members of a function
to be dumped:
import std.stdio;
enum Dump = "Dump";
template Dumper(T) {
void dump() {
On Wednesday, 5 June 2013 at 21:05:53 UTC, Timothee Cour wrote:
how do i get a stacktrace inside handleTermination?
If not currently possible, could we have a compile flag that
would enable
this kind of feature? (making code slower would be OK, its an
opt in
feature)
Ideally we'd also be able
On Wednesday, 5 June 2013 at 18:09:30 UTC, Gary Willoughby wrote:
I've been using the -property compiler flag when i compile
programs and thought it was pretty cool but i've recently had a
conversation with someone who has informed me it's broken and a
bad idea.
Never, ever, ever use -propert
On 06/06/2013 04:05 PM, Joseph Rushton Wakeling wrote:
> real _max = real.min;
... should be tweaked to
real _max = real.min_normal;
according to the deprecation list:
http://dlang.org/deprecate.html#.min%20property%20for%20floating%20point%20types
Hi all,
In case it's useful to anyone, here's a little statistical aggregator I put
together (source file attached). This is for online calculation of statistical
quantities and incidentally offers an efficient way to calculate standard
deviation in a single pass over data, using the algorithm de
On Wed, 05 Jun 2013 17:36:11 -0400, Jonathan M Davis
wrote:
Strict property enforcement is as good as dead. -property is still there
for
the moment, but its days are numbered. Walter and Andrei pretty much
consider
@property to have been a failure and seem to want to get rid of
@property
On Wednesday, 5 June 2013 at 22:25:21 UTC, Adam D. Ruppe wrote:
3) prop += 5 and friends
This is the biggest deal for me. Being able to write all these
read-modify-write operators on properties would simplify writing
transparent wrapper types so much.
On Thursday, 6 June 2013 at 10:38:27 UTC, Martin Primer wrote:
What would be good is:
@property int foo {
get() {
_val = value;
}
set() {
value = _val;
}
}
usage:
foo = 12;
int bar = foo;
my 2 cents.
That's both much more limited and longer than the current
What would be good is:
@property int foo {
get() {
_val = value;
}
set() {
value = _val;
}
}
usage:
foo = 12;
int bar = foo;
my 2 cents.
On Thursday, 6 June 2013 at 00:56:22 UTC, Adam D. Ruppe wrote:
On Thursday, 6 June 2013 at 00:08:31 UTC, Jonathan M Davis
wrote:
Which is essentially the position of weak property enforcement.
Yes, though I wish we would stop calling it 'enforcement'
because nothing actually needs to be espec
You are passing a function pointer to a C library, where it
will be expected that the function uses the C calling
convention. So you have to declare the function as extern(C),
otherwise DMD will not compile it as such. That can cause
segfaults.
Right ok thanks.
21 matches
Mail list logo