Re: On 80 columns should (not) be enough for everyone

2011-01-31 Thread JMRyan
Walter Bright  wrote in
news:ii4an2$1npj$1...@digitalmars.com: 

> 80 columns came from how many characters would fit on a standard size
> 8.5*11 sheet of paper. Even punch cards followed this precedent.

This suggests (without exactly stating) one of my personal reasons for a
strict line length limit:  sometimes programmers like to print their
code.   Maybe I'm showing my age, but I find dead trees best for code
review.  One *can* use a smaller font (hard on the eyes) or print in
landscape (yuck--and even that is not enough for some code).

PS.  I knew about the punch card precident and have even used key punch
machines myself, but I didn't know that punch card length was based on
earlier precident.  Given the absurd length of line printer output of
the day, that surprises me.


Re: Patterns of Bugs

2011-01-06 Thread JMRyan
"Nick Sabalausky"  wrote in news:ig5860$231...@digitalmars.com:

> long-time hardcore fan of the classic book "Writing Solid Code", the 

Although the book is justifiably a classic, its subtitle is the very 
definition of the expression "unintentionally hilarious".


Re: [OT] Mozilla Thunderbird

2010-12-19 Thread JMRyan
torhu  wrote in news:iehd51$2gl...@digitalmars.com:

> On 16.12.2010 14:39, Justin Johansson wrote:
>> Just wondering how others rate Thunderbird as a decent newsreader.
>>
> I suppose the real problem is that almost noone cares about newsgroups, 
> so don't expect any improvements in this field to ever happen.  I'm a 
> Windows user, and Thunderbird is the newsreader I use.
> 
> Thunderbird is pretty buggy, but I haven't found a good replacement, at 
> least not yet.

For what it's worth, Xnews on a Windows is fairly decent.  I always found 
Thunderbird to be seriously ugly, but I haven't looked at it in years.  
Xnews is at http://xnews.newsguy.com/ .  Unfortunately, it is Windows 
only.

Someone suggested Claws-mail which I'll try when I get around to it.  It 
appears to have a Windows port as part of Gpg4win at 
http://www.gpg4win.org/ .



Re: How convince computer teacher

2010-12-13 Thread JMRyan
Austin Hastings  wrote in
news:ie64dv$uv...@digitalmars.com: 

> I don't see where D has anything to offer a computer teacher. There 
> isn't a convenient, trivially-installed IDE (Java, .NET).  

No IDE?  My, my, how we coddle our students today!  The IDE for my first 
programming course, was a keypunch machine.  We carried our IBM punch cards 
2 miles through the snow to the local university and returned 3 days later 
to pick them up.  (Okay, okay, my high school math teacher drove the cards, 
but I'm not telling my kids that.)  The IDE for my first college 
programming course was vi.


Re: standardization ISO

2010-11-21 Thread JMRyan
bioinfornatics  wrote in
news:ic718b$1ke...@digitalmars.com: 

> hi, why D language doesn't have  a standardization (like iso)?
> http://en.wikipedia.org/wiki/International_Organization_for_Standardiza
> tion 
> 

Standards organizations very often don't get involved until there are 
incompatibilities between competing implementations. There are several 
implementations of D, but they are all based on the Digital Mars front end.  
There just aren't the incompatibilities out there that require a standards 
organization's involvement.

Incompatibilities aren't the only problems that standards organizations try 
to solve.  But they nonetheless exist to solve problems.  There are indeed 
problems with D (it still counts as a young language with kinks still to be 
worked out and with weak third party support), but those issues are not the 
kinds that fall under the purview of standards organizations.

Note that open source development of a language helps prevent the need for 
standards organization involvement.  This is at least partly why Perl, PHP, 
and Python don't have standards organization definition.  Since D's front 
end is open source, it may never need a standards organization definition.


Re: The Next Big Language

2010-10-18 Thread JMRyan
Andrei Alexandrescu  wrote in
news:i9f442$2b...@digitalmars.com: 

> Discusses a few languages including D: 
> http://www.reddit.com/r/programming/comments/dsdd6/the_next_big_languag
> e_2010_edition/ 
> 
> Andrei

Call me a curmudgeon, but I don't like Next Big Thing discussions.  The
problem is worse in applications than in programming languages, but I
have learned to detest all such discussions.  Software users, software
reviewers (they're the worst) and even programmers look at Lotus 123
with dollar signs in their eyes and assume that a world of hundreds of
millions of computers isn't big enough for any options other than The
One True Big Thing. 

I posted a little rant about this on some newsgroup during The Great
Browser Wars.  Complaining about the attitude that the world wasn't big
enough for two browsers, I noted that the world was plenty big enough
for quite a few makes and models of cars.  If the software reviewers of
the day had worked for a car mag, they would have written about what was
The One Best luxury/sports/enconobox/muscle/lots of cargo/lots of
passengers/off road use/etc. car.  I got two replies.  One said "But IE
is indeed better than Netscape" and the other asked "But what about the
[whatever car it was] that fits into all these categories".  I had to go
to the gym and spend some time on the heavy bag to work out my
frustrations. 

All of this strikes me as silly as wars over The One True Placement of
Curly Braces and The One Best Text Editor.  I just want D to be popular
enough to give a nice set of useful libraries to work with.


Re: [nomenclature] What is a bug?

2010-10-12 Thread JMRyan
"Simen kjaeraas"  wrote in 
news:op.vkgsmjr4vxi...@biotronic-pc.lan:

> Justin Johansson  wrote:
> 
>> Perhaps this topic could be posted as
>> "[challenge] Define just exactly what a bug is".
>>
>> I trust this topic will yield some interesting conversation.
> 
> Unwanted behavior? I guess that might be a tad simplistic.
> 

I suppose this means that my children are full of bugs. :-)


Re: What would you rewrite in D?

2010-10-06 Thread JMRyan
Andrei Alexandrescu  wrote in news:i8gpne
$2o9...@digitalmars.com:

> I wouldn't spend much time on rewriting classic utilities in D. There's 
> plenty to be done anew. One category of tools to be written in D are 
> utilities aimed at D itself (parsers, analyzers, Thrift bindings, 
> protocol buffers bindings, code for DB interface, etc.)
> 
> Andrei

If there are old standby's to be rewritten in D, my first choice would not 
be full programs (for the reasons you suggest).  But I might like to see 
some C++ or even Java libraries rewritten in D to make the more easily 
available or reliable.  wxWidgets, Qt, or SWT make for obvious choices.  
I'm not the only ones to whom these were obvious as the wxD, QtD, and DWT 
projects indicate.  Not that I want to take on such a project myself, but 
it's good to see others working on them.  (Well, wxD, and QtD are not 
translations, but oh well).


Re: Typography

2010-09-19 Thread JMRyan
"Nick Sabalausky"  wrote in news:i74ctp$2mq...@digitalmars.com:

 
> MORE LAWYERS NEED TO READ THIS PART, AND LAWMAKERS TOO:
> http://www.typographyforlawyers.com/?p=16

Especially those lawyers who write software licenses.


Re: A summary of D's design principles

2010-09-19 Thread JMRyan
One thing that seems to have been missed in this discussion:  minimize (or 
at least reduce from C++ levels) undefined behavior.  That's the reason for 
auto-initialized variables.  It's not to provide aconvenience for those 
times when the default values are what you want.  It's so that failure to 
initialize will cause your program to fail in consistent and predictable 
ways.  It is also the reason for providng clear() as an alternative to 
delete().  Dereferencing dangling pointers results in undefined behavior.  
Accessing a cleared object results in admittedly bad but at least defined 
behavior.


Re: A summary of D's design principles

2010-09-18 Thread JMRyan
Simen Kjaeraas  wrote in news:i6stke$o0v$1
@digitalmars.com:

> Here's a draft of something I'd like to see. I like having the ten
> commandments, with #0 not really counting. C&C welcome.
> 
>   == The D Manifesto ==
> 

Please don't call it a manifesto.  A statement of design goals or design 
principles says, "This is what we want to do."  A manifesto says, "This is 
what everybody should want to do.  This is exactly why the Date/Darwen 
manifesto choose that word.  D is a good language.  (I am forced to use 
Visual dBase in my day job, so I find D to be a really, Really, REALLY good 
language).  There are other good languages out there. There is no reason 
that all systems/general purpose languages should have the same design 
goals or priorities.  The word "manifesto" suggests we think otherwise. C++ 
programmers already have an "if it is not The Next Big Thing in Programming 
Languages, then why bother" attitude toward D.  We don't want them to think 
of us as kooky zealots was well.


Re: New structs

2010-09-10 Thread JMRyan
"Steven Schveighoffer"  wrote in 
news:op.vitwqwoveav...@localhost.localdomain:

> I think it was a typo.  He meant
> 
> S1* c = new S1()
> 
> BTW, I filed a bug report on this a while back:
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=4247
> 
> -Steve

Yes, and the comment repeated the same typo.  The whole line
should have read:

S1* c = new S1();  // Works, D initializes c* with S1.init

I just voted for your bug report.


New structs

2010-09-10 Thread JMRyan
Consider this uninspiring pair structs:

struct S1 {int x};
struct S2 
{
int x
this(int i) {x = i}
};

Note that no default constructor is allowed so that S2.init can have a
consistent value computed at compile time.

Now:

S1 a = S1();   // Quintessinal case works fine
S2 b = S2();   // Also works, D initializes b with S2.init
S2* c = new S1();  // Works, D initializes c* with S2.init
S2* d = new S2();  // Doesn't work: no default consructor

Instead of the last, we need:

S2* d = cast(S2*) GC.malloc(S2.sizeof);
d = S2();  // or: d = S2.init;

Is there any good reason why "S2* d = new S2();"
shouldn't be allowed? If allowed, D could initialize d* with S2.init.

S2 really isn't needed since S1(3) and S2(3) have the same effect.
Also, a final class would at least usually be just as good as a struct 
here.  But still, disallowing "S2* d = new S2();" seems decidedly
unnecessary, especially since "S2 b = S2();" already works.


Re: this as lvalue?

2010-09-05 Thread JMRyan
Andrei Alexandrescu  wrote in
news:i5rovm$1q4...@digitalmars.com: 
> 
> For classes this must be an rvalue.
> 
> Andrei

I reported this as issue 4819.


this as lvalue?

2010-09-03 Thread JMRyan
I wouldn't have thought of "this" representing an lvalue.  However, the
following absurdity compiles and executes flawlessly.  Just don't
uncomment the assignment to y.i! 

class Yikes
{
int i;
this() { this = null; }
}


void main()
{
auto y = new Yikes();
// y.i = 0;
}

Is this a bug in the compiler (v.2.047)?  Am I missing something in 
thinking it shouldn't be?


Re: [OT] Dark Star (1974) - the platinum age of movies

2010-09-01 Thread JMRyan
Justin Johansson  wrote in news:i5lnr4$1cm...@digitalmars.com:

> I know this is completely off topic and surely shows my age,
> but I wonder if anyone else on this ng has seen this movie.

Perhaps of interest, a new DVD release is sceduled for late October.


Re: Marketing of D - article topic ideas?

2010-06-03 Thread JMRyan
"Nick Sabalausky"  wrote in news:hu9na8$2hh...@digitalmars.com:

> More of a long term-thing, but D needs a couple of "killer libs" (for 
> instance, a really good D version of something Rails-like). Then, of
> course, an article walking through the use of it to easily create
> something fancy. 

I think I've said this before, but D needs a two killer apps plus one
medical journal article.  One of the killer apps needs to be
commercial/proprietary so that people can see money being made with D. 
The other killer app needs to be open source so that contributors have
to use D to work on it.  The medical journal article needs to report
that contributing to the open source app cures erectile dysfunction
disorder.


Re: D gets a mention by Verity Stob

2009-12-13 Thread JMRyan
Andrei Alexandrescu  wrote in news:hg0d2f
$26j...@digitalmars.com:
> 
> Love the Stob. The factorial joke on page 3 is really funny :o).

As funny as the factorial joke is, it doesn't work because infinity - 1 = 
infinity (for the same reason infinity! = infinity).

JMRyan