Re: [due diligence] std.xml

2010-10-19 Thread div0
On 19/10/2010 20:37, Andrei Alexandrescu wrote: On 10/19/10 14:30 CDT, Denis Koroskin wrote: More detail about the design please? I browsed through the code and the main issue seems to be heavy reliance on granular delegates to do pretty much anything. Would fixing that improve usability? (It wo

Re: New slides about Go

2010-10-19 Thread div0
On 19/10/2010 21:24, Paulo Pinto wrote: Am 18.10.2010 22:49, schrieb bearophile: Nick Sabalausky: It's amazing how many software houses/departments don't do that. But of course, if they don't it's their own damn problem. They want low-salary programmers, so they will avoid languages that may

Re: [due diligence] std.xml

2010-10-19 Thread div0
On 19/10/2010 21:43, sybrandy wrote: Well one obvious problem is you have to read the document into memory first, which clearly isn't good enough for large documents. Nobody said anything about DOM, and the current std.xml doesn't in anyway support a DOM implementation. That's a whole 'n

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread div0
On 24/10/2010 18:19, Walter Bright wrote: Nick Sabalausky wrote: http://www.semitwist.com/goldiedocs/current/Docs/APIOver/StatVsDyn/ One question I have is how does it compare with Spirit? That would be its main counterpart in the C++ space. Spirit is a LL parser, so it's not really suitable

Visual studio project files

2010-11-07 Thread div0
I've created vs project files to build DMD and a patch for 2.049 You can grab them from: http://www.sstk.co.uk/d.php if anybody is interested. -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk

Re: Which compiler regressions are blocking people fom upgrading?

2010-11-09 Thread div0
On 09/11/2010 02:01, Don wrote: If anyone would like to use the latest compiler release, but cannot because of a compiler regression, please specify which bug is the blocker (and whether you are using D1 or D2). I'll try to get any such compiler regressions fixed in the next release. Well not

Hacking on DMD

2010-11-11 Thread div0
Is there an official guide to DMD source wiki page or mailing list? I've been mucking about w/ DMD the last few days and I'm breaking it in new and interesting ways. It would be nice not to let that effort go to waste; I've created VS project files, a UML-ish diagram to the source and there'

Re: Hacking on DMD

2010-11-12 Thread div0
On 12/11/2010 05:05, Nick Sabalausky wrote: "div0" wrote in message news:ibi2n1$7j...@digitalmars.com... Is there an official guide to DMD source wiki page or mailing list? I've been mucking about w/ DMD the last few days and I'm breaking it in new and interesting ways.

Re: Help for .h to D pain?

2010-11-12 Thread div0
On 12/11/2010 04:01, jfd wrote: Help, anyone? Thank you. The easiest way is to simply compile a one liner C module. Then you get all the necessary stuff included and all the irritating macros stripped out and converted to what they are actually supposed to be. You can then probably run htod

Re: Help for .h to D pain?

2010-11-12 Thread div0
On 12/11/2010 13:21, div0 wrote: On 12/11/2010 04:01, jfd wrote: Help, anyone? Thank you. The easiest way is to simply compile a one liner C module. Then you get all the necessary stuff included and all the irritating macros stripped out and converted to what they are actually supposed to be

Re: The D Scripting Language

2010-11-12 Thread div0
On 12/11/2010 19:42, sybrandy wrote: 2. Make Windows to open .d files with rdmd by default, so I could run them with simple double-click You should be able to do this yourself quite easily by right-clicking on the D file and associating it with rdmd. I'd give better instructions except I'm not

Re: One year of Go

2010-11-12 Thread div0
On 12/11/2010 21:42, Nick Sabalausky wrote: "uriel_follower" wrote in message People who find generics worthwhile *don't use Go*. So of course the remaining Go users aren't going to miss them. Because nobody ever reused any code in languages without generics! Sure they did. But they re-use

Re: Hacking on DMD

2010-11-13 Thread div0
On 13/11/2010 07:46, Matthias Pleh wrote: Am 13.11.2010 05:18, schrieb Nick Sabalausky: "div0" wrote in message news:ibjef2$60...@digitalmars.com... On 12/11/2010 05:05, Nick Sabalausky wrote: "div0" wrote in message news:ibi2n1$7j...@digitalmars.com... Is there an o

Re: What to do when the linker fails

2010-11-15 Thread div0
On 15/11/2010 11:55, Kagamin wrote: Benjamin Thaut Wrote: How does that help if the linker crashes? It can stop crashes. Also try without -g, some times OPTLINK will cope then. Of course then you can't debug your program though... -- My enormous talent is exceeded only by my outrageous laz

Re: Memory Mapped File Access

2010-05-29 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert wrote: > On 2010-05-28 23:41:46 +0200, Robert said: > >> 1. How can I expand the size of a MMF after it was created? > > Replying to myself: Simple, close the file, and re-open with new size. > Old content is kept. This should be added to the

Re: Static analysis at Mozilla

2010-06-10 Thread div0
On 10/06/2010 20:57, Steven Schveighoffer wrote: On Thu, 10 Jun 2010 15:55:18 -0400, Sean Kelly wrote: Ali Çehreli Wrote: Sean Kelly wrote: > bearophile Wrote: > >> C++ Static Analysis as done on the large Mozilla codebase: >> http://blog.ezyang.com/2010/06/static-analysis-mozilla/ >> It

Re: Signed word lengths and indexes

2010-06-14 Thread div0
On 14/06/2010 21:52, bearophile wrote: I have found a Reddit discussion few days old: http://www.reddit.com/r/programming/comments/cdwz5/the_perils_of_unsigned_iteration_in_cc/ It contains this, that I quote (I have no idea if it's true), plus follow-ups: At Google using uints of all kinds fo

Re: Improving std.regex(p)

2010-06-19 Thread div0
On 19/06/2010 20:39, Ben Hanson wrote: From memory (Joel did a PDF recently, but that is on my works machine) Joel has been developing Spirit for over ten years. The latest version is pretty sophisticated and has all kinds of clever stuff for directly parsing data in structures all inline etc. N

Re: String Literal Docs

2010-06-19 Thread div0
On 19/06/2010 22:16, Ellery Newcomer wrote: On 06/19/2010 03:12 PM, Alix Pexton wrote: I've been sketching some grammar diagrams for D2.0, a little like those on JSON.org, and of course I didn't get far before I ran into something odd. In the section of www.digitalmars.com/d/2.0/lex.html on str

Re: String Literal Docs

2010-06-19 Thread div0
On 19/06/2010 23:17, Ellery Newcomer wrote: All I can say is auto w = x"dead beef"w; results in Error: invalid UTF-8 sequence on dmd 2.047 Then you've found a bug, you know what to do: http://d.puremagic.com/issues/ -- My enormous talent is exceeded only by my outrageous laziness. http:/

Re: String Literal Docs

2010-06-20 Thread div0
On 20/06/2010 11:03, Alix Pexton wrote: On 20/06/2010 01:09, div0 wrote: On 19/06/2010 23:17, Ellery Newcomer wrote: All I can say is auto w = x"dead beef"w; results in Error: invalid UTF-8 sequence on dmd 2.047 Then you've found a bug, you know what to do: http://

Re: String Literal Docs

2010-06-20 Thread div0
On 20/06/2010 18:55, Nick Sabalausky wrote: "div0" wrote in message news:hvkrsc$2r5...@digitalmars.com... It says multiple of 2, not even number of digits. "multiple of 2" == "even number" "Even" as in "even vs odd" I also said 'To

Re: String Literal Docs

2010-06-22 Thread div0
On 20/06/2010 20:14, Nick Sabalausky wrote: "div0" wrote in message news:hvlok6$1rf...@digitalmars.com... On 20/06/2010 18:55, Nick Sabalausky wrote: "div0" wrote in message news:hvkrsc$2r5...@digitalmars.com... It says multiple of 2, not even number of digits. &quo

Re: @property

2010-06-24 Thread div0
On 24/06/2010 22:15, Pelle wrote: A benefit to the current situation is that fewer parentheses means less line noise, and prettier code. That's only in your opinion and this discussion has been done to far beyond death. For gods sake just stop. -- My enormous talent is exceeded only by my o

Re: Allocating structs with new?

2010-07-10 Thread div0
On 10/07/2010 07:31, Robert Jacques wrote: As for delete and clear, the deprecation/transition is still in progress. clear exists, but delete is not deprecated yet. So what are we going to use instead? I have uses for delete. -- My enormous talent is exceeded only by my outrageous laziness. h

Re: Allocating structs with new?

2010-07-10 Thread div0
On 10/07/2010 18:04, Robert Jacques wrote: On Sat, 10 Jul 2010 10:01:52 -0400, div0 wrote: On 10/07/2010 07:31, Robert Jacques wrote: As for delete and clear, the deprecation/transition is still in progress. clear exists, but delete is not deprecated yet. So what are we going to use

Re: Manual memory management in D2

2010-07-13 Thread div0
On 13/07/2010 22:58, Andrei Alexandrescu wrote: On 07/13/2010 04:42 PM, Vladimir Panteleev wrote: On Wed, 14 Jul 2010 00:33:20 +0300, bearophile wrote: Vladimir Panteleev: ARGHARGHARGH There is emplace() now. I don't know how much good it currently is. I know that I can do this manually

Re: D's treatment of values versus side-effect free nullary functions

2010-07-23 Thread div0
On 23/07/2010 21:54, Don wrote: I completely agree that there will always be opportunities for CTFE which will be missed unless you allow the compile time to become arbitrarily long. Which is why ultimately it should be up to the programmer to decide. There should be a way to force the compile

Re: D's treatment of values versus side-effect free nullary functions

2010-07-24 Thread div0
On 24/07/2010 12:46, Jim Balter wrote: "div0" wrote in message news:i2d2ek$179...@digitalmars.com... On 23/07/2010 21:54, Don wrote: I completely agree that there will always be opportunities for CTFE which will be missed unless you allow the compile time to become arbitrarily lon

Re: Phobos-compatible license on Google Code?

2010-07-31 Thread div0
On 31/07/2010 03:50, Justin Spahr-Summers wrote: Yes, thank you. I misworded my original question. I was hoping to host on Google Code, because it's been the most reliable and functional (free) project hosting I've found, and I'd love to entertain hopes of eventually submitting the code as a Pho

Re: Phobos-compatible license on Google Code?

2010-08-02 Thread div0
On 02/08/2010 05:14, Justin Spahr-Summers wrote: On Sat, 31 Jul 2010 17:06:26 +0100, div0 wrote: On 31/07/2010 03:50, Justin Spahr-Summers wrote: Yes, thank you. I misworded my original question. I was hoping to host on Google Code, because it's been the most reliable and functional

Re: Documentation generation

2010-08-07 Thread div0
On 08/08/2010 01:32, Bernard Helyer wrote: Nope. But it doesn't matter. It doesn't affect the code built or generated, and that's my focus -- at least for the foreseeable future. I'm writing a compiler, not a half-arsed documentation generator (because if I wrote the DDoc stuff, that's exactly w

Re: Unused variables, better as error or warning?

2010-08-20 Thread div0
On 20/08/2010 22:28, Jonathan M Davis wrote: On Friday, August 20, 2010 14:12:09 Walter Bright wrote: Warnings are good for things which you _should_ fix but don't have to immediately No they aren't. Warnings are good for exactly nothing. Warnings suck massive arse, hide geniune problems and

Re: [nomenclature] systems language

2010-10-16 Thread div0
On 14/10/2010 13:30, Justin Johansson wrote: Touted often around here is the term "systems language". May we please discuss a definition to be agreed upon for the usage this term (at least in this community) and also have some agreed upon examples of PLs that might also be members of the "set of

Re: [nomenclature] systems language

2010-10-16 Thread div0
On 16/10/2010 19:27, Paulo Pinto wrote: Would that make Smalltalk, Lisp, Oberon, Modula-3, Component Pascal, Ada, Mac Pascal system programming languages? All of them were used to write operating systems, in some of them the operating system and language are the same, kind of. Well true, but t

Re: How to use pure in D 2.0 question on Stack Overflow?

2009-06-18 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Walter Bright wrote: > BCS wrote: >> Reply to Jeroen, >> >>> Does anyone know the answer to this D related question on SO? >>> >>> http://stackoverflow.com/questions/1008803/how-to-use-pure-in-d-2-0/ >>> >> >> DMD can't tell that the method call is saf

Re: Creating ActiveX in D

2009-07-23 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 BLS wrote: > Hi, > Sergey G. ask (by accident ;) ) about : How to create an ActiveX control > in D. > Now, I am curious : Is it possible to create an ActiveX Control In D ? > > Something along : > class Component : IDispatch > { > } > > instead of :

Re: Memory allocation problem

2009-08-10 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://www.digitalmars.com/d/archives/digitalmars/D/OPTLINK_and_LARGEADDRESSAWARE_88061.html bearophile wrote: > In a small program on Windows XP I have to allocate a large chunk of RAM, > about 1847 MB of RAM. This PC has 2 GB RAM. So I use std.c.st

Re: T[new]

2009-08-10 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 bearophile wrote: > Walter Bright: > > I like this general proposal, it sounds like something that can improve D a > little. There are many other things that have to be improved in D, but baby > steps are enough to go somewhere :-) > >> Slices will

Partial specialisation is foobarred?!

2009-08-16 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've been poking around on the bug track and can't find a specific bug report, but it seems unlikely this hasn't been noticed before. This is w/ dmd 2.031 & 1.046 // import std.stdio; struct nil { } class D(T) { uint _l

Re: Partial specialisation is foobarred?!

2009-08-16 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason House wrote: > FWIW, I usually use static if instead of specialization. In D2, you can also > use if expressions as part of the template declaration. As far as your code > below, I think the declaration of M without using it is suspect. I don't

what happened to std.array.erase?

2009-09-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was using it. Is it going to come back any point soon or should I just rewrite my stuff? tia - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Com

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremie Pelletier wrote: Sweet. If dmd can compile w/ VS outa the box, I'll start poking around in it. Hey you can knock mirco-soft all you like, but VS is the nuts. - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk

Re: Error: mixin is not defined (dmd v2.032)

2009-09-06 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Denis Koroskin wrote: > On Sun, 06 Sep 2009 15:15:14 +0400, Tyro wrote: > >> the following appears on line 876 of control.d in the DFL package: >> mixin OpApplyAddIndex!(opApply, Control); >> >> Attempting to compile it results in the following error

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-06 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremie Pelletier wrote: > div0 Wrote: >> Jeremie Pelletier wrote: >> >> >> Sweet. If dmd can compile w/ VS outa the box, I'll start poking around >> in it. Hey you can knock mirco-soft all you like, but VS i

Re: XML ecosystem wrt D

2009-09-12 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michel Fortin wrote: > On 2009-09-12 11:07:38 -0400, Justin Johansson > said: > >> What's the current state of the nation with respect to the XML (W3C >> compliant) ecosystem for D? >> >> Last months D forum archive had some discussions about std.tex

Re: XML ecosystem wrt D

2009-09-13 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jarrett Billingsley wrote: > On Sat, Sep 12, 2009 at 8:34 PM, div0 wrote: >> It seems on causal thought that it ought to be possible to machine >> translate it into D, unless Java has under gone massive change since the >> last

Re: Writing a language parser in D

2009-09-14 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Justin Johansson wrote: > Can D people please recommend suitable tools for generating a parser (in D) > for an LL(1) grammar. There's bound to be much better parser generator tools > available nowadays, since my last foray into this area 10+ years a

Re: Writing a language parser in D

2009-09-15 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Baxter wrote: > On Mon, Sep 14, 2009 at 2:46 PM, div0 wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Justin Johansson wrote: >>> Can D people please recommend suitable tools for generat

Re: Writing a language parser in D

2009-09-15 Thread div0
ar directly in code. >> Which is either a plus or a minus depending on your point of view. > > Thanks for all replies, Ellery, div0, Bill et. al. > > There's 101 odd productions in EBNF so whatever is the easiest to plug these > directly into the tool or eng

Re: Use of first person in a book

2009-10-09 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrei Alexandrescu wrote: > Thanks to all who answered! I wish there was such consensus in other > matters as well :o). > > Allow me to put forth an excerpt from TDPL without any particular > reason: http://erdani.com/tdpl/excerpt.pdf > > > Andrei

Re: Phobos.testing

2009-10-10 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 dsimcha wrote: > I've noticed that it's somewhat difficult to get code into Phobos. This is > somewhat understandable--noone wants a standard library full of buggy code > that noone understands. On the other hand, it doesn't seem like there's a > ver

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 language_fan wrote: > The more I think about it, the > more I realize this language is not for me. I apologize my arrogance. Bye. That's the best news I've heard since that last tedious whiner buggered off. I really hope it's true. - -- My enormous

Re: Safety, undefined behavior, @safe, @trusted

2009-11-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 bearophile wrote: > > In C# you use something like: > > unsafe { > // lot of code > } > > I think that's a good solution. Things are meant as safe unless marked as > Unsafe. You can mark a whole block of code as unsafe putting it into > those brac

Re: Regarding compiler switches

2009-11-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nick Sabalausky wrote: > "Lars T. Kyllingstad" wrote in message > news:hcu5bc$at...@digitalmars.com... >> DMD has just a few switches that control how code is compiled, such >> as -safe, -release, -O and so on. In comparison, GCC has (and this is ju

Re: Semantics of toString

2009-11-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 dsimcha wrote: > > Why? You've said this several times w/o giving your reason. IMHO toString() > is a > great way to get a default string representation of something. And that's *exactly* what is wrong. There is *never* a good default for anythin

Re: Operator overloading and loop fusion

2009-11-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrei Alexandrescu wrote: > I wanted to discuss operator overloading a little bit. A good starting > point is Don's proposal > > http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP7 > Just read it and I hate it. Nobody is smart enough to

Re: Go: A new system programing language

2009-11-11 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Walter Bright wrote: > He said that IDEs for Java were necessary, and one reason why was > because with "one click" the IDE will automatically generate hundreds of > lines of boilerplate. That's the best short argument against Java I've heard so far.

Re: A Modest Proposal: Final class instances

2009-05-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Walter Bright wrote: > dsimcha wrote: >> == Quote from Walter Bright (newshou...@digitalmars.com)'s article >>> dsimcha wrote: A possible solution is, given a class: class Foo { // Actual implementation. } fi

Re: bmp/png libs?

2009-05-14 Thread div0
Nick Sabalausky wrote: > Can anyone suggest good up-to-date D libs or bindings for loading/saving bmp > and png files? > > http://www.ssTk.co.uk/png.php Import is for d2, but changing it for d1 would be trivial. -- My enormous talent is exceeded only by my outrageous laziness.

Re: bmp/png libs?

2009-05-14 Thread div0
Nick Sabalausky wrote: > "div0" wrote in message > news:guirpq$m7...@digitalmars.com... >> Nick Sabalausky wrote: >>> Can anyone suggest good up-to-date D libs or bindings for loading/saving >>> bmp >>> and png files? >>> >> http:

Re: bmp/png libs?

2009-05-14 Thread div0
Nick Sabalausky wrote: > "div0" wrote in message > news:guirpq$m7...@digitalmars.com... >> Nick Sabalausky wrote: >>> Can anyone suggest good up-to-date D libs or bindings for loading/saving >>> bmp >>> and png files? >>> >> http:

Re: bmp/png libs?

2009-05-16 Thread div0
Georg Wrede wrote: > Daniel Keep wrote: >> >> Andrei Alexandrescu wrote: >>> Nick Sabalausky wrote: >>>> "div0" wrote in message >>>> news:guirpq$m7...@digitalmars.com... >>>>> Nick Sabalausky wrote: >>>>&

Re: Eliminate the baroque floating-point operators a la !<>=

2009-05-17 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Denis Koroskin wrote: > On Sun, 17 May 2009 21:14:46 +0400, Andrei Alexandrescu > wrote: > >> Hello, >> >> >> I think the floating-point operators: >> >>a !<>= b >>a !<> b >>a <> b >>a <>= b >>a !> b >>a !>= b >>a !< b >>

Re: What a nice bug!

2009-05-18 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Denis Koroskin wrote: > Arrrgh! Nevermind! > > The minute I made a post I realized I forgot to recompile one of the > dependency libraries (win32 headers, moved out to a separate library). > Looks like that's what was a problem. > > Sorry for a buzz.

Re: "with" still sucks + removing features + adding features

2009-05-18 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 bearophile wrote: > Christopher Wright: >> The more common suggestion is: >> alias bar = foo; > > This is acceptable, thank you :-) > Now I'd like to know what others think about that. > > Bye, > bearophile That's rather nice. Would make coding afte

Re: "with" still sucks + removing features + adding features

2009-05-19 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 bearophile wrote: > Alexander Pánek: >> Same here. > > I too don't like .56, I add a zero when I see a literal like that in the > code. But what about Walter? :-) > > Bye, > bearophile I always use it, but I won't be bothered if it was outlawed.

Re: "with" still sucks + removing features + adding features

2009-05-19 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jarrett Billingsley wrote: > On Tue, May 19, 2009 at 4:47 PM, Jarrett Billingsley > wrote: >> On Tue, May 19, 2009 at 4:43 PM, Andrei Alexandrescu >>> It's an awful idea. It's a non-idea. If "idea" had an antonym, that would be >>> it. >>> >>> I can't

Re: D library projects

2009-11-14 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Walter Bright wrote: > For anyone looking for an easy, but valuable, contribution to D, take a > look at the go runtime library. > > There's a lot in there we could use in the D library: > > http://golang.org/pkg/ > > The library is licensed under t

Re: struct mixins

2009-11-16 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leandro Lucarella wrote: > struct inheritance never make it into D, for a good reason: structs are > not supposed to be polymorphic and inheritance is very tied to > polymorphism. But struct inheritance is sometimes very useful for > "composition", avo

Re: struct mixins

2009-11-17 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Baxter wrote: > On Mon, Nov 16, 2009 at 11:32 AM, div0 wrote: >>> >> vote++ >> >> I was going to suggest it when I finished my spirit port, but I was >> too lazy to in the end. >> >> It would

Re: string concatenation

2009-11-19 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Justin Johansson wrote: > Andrei Alexandrescu wrote: >> TDPL boasts the code: >> >> void main() >> { >> string a = "Hall\u00E5"; >> wstring b = ", "; >> dstring c = "V\u00E4rld"; >> auto d = b ~ c; // d has type wstring, same as b >>

Re: dynamic classes and duck typing

2009-11-28 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 dsimcha wrote: > == Quote from Walter Bright (newshou...@digitalmars.com)'s article >> dsimcha wrote: >>> Sometimes I feel like there should be a law similar to Greenspun's Law for > > Having never done it before, I really cannot imagine how people ge

Re: switch case for constants-only?

2009-12-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sean Kelly wrote: >> >> In fact, it's already semantically equivilent to that, except that x and y >> are currently required to be known at compile-time. > > D allows duplicate case values? I thought this was a compile error. It does; from the swit

Re: switch case for constants-only?

2009-12-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ellery Newcomer wrote: > On 12/05/2009 04:19 PM, Nick Sabalausky wrote: >> "Ellery Newcomer" wrote in message >>> >>> More so than remembering to type break after each case block? >> >> Good point, but that's really a separate issue. >> >> > > I don'

D gets a mention by Verity Stob

2009-12-12 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://www.theregister.co.uk/2009/12/10/verity_stob/ Considering her usual acerbic wit she must like D. - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Min

Re: D gets a mention by Verity Stob

2009-12-12 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrei Alexandrescu wrote: > div0 wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> http://www.theregister.co.uk/2009/12/10/verity_stob/ >> >> Considering her usual acerbic wit she must like D. &g

Re: Detecting inadvertent use of integer division

2009-12-14 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sean Kelly wrote: > Don Wrote: > >> Walter Bright wrote: >>> Don wrote: (This means that double y = int_val / 1; is OK, and also: double z = 90/3; would be OK. An alternative rule would be: "If an integer expression involves integer d

Re: Binary operation on typedefs

2009-12-15 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zarathustra wrote: > Do you think is it bug? > > typedef uint A; > typedef AB; > > const A a1 = cast(A)0x01; > const A a2 = cast(A)0x02; > > const B b1 = cast(B)0x04; > const B b2 = cast(B)0x04; > > const A a3 = a1 | a2; // great it's ok (a1, a

Re: Compiler: Size of generated executable file

2010-01-09 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 retard wrote: > E.g. if I link against some GUI lib, the hello world window+label grows > to 2..5 MB. In Java the same app using Swing is still only a few > kilobytes (label + window + procedure to close the app is 1.2 kB to be > precise). Yeah b

Re: "Consume", "Skip", "Eat", "Munch", "Bite", or...?

2010-02-20 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrei Alexandrescu wrote: > There are a few other functions like that: one version takes a range by > value, the other takes it by reference and alters it. > > The question is, what is a good naming convention for expressing that? > Other examples: f

Re: Is D a cult?

2010-03-06 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bane wrote: > Jane Doe Wrote: > >> Is D a cult? >> >> > > Compile Phobos backward to get the true message. lol. Brilliant. - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -BEGIN PGP SIGNATURE- Vers

Re: The D license

2010-03-10 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michiel Helvensteijn wrote: > Jesse Phillips wrote: > >> There is really nothing wrong with the opening of the license other than >> it being more direct than any other license. > > Yeah. > > "The Software was not designed to operate after December

Re: shouldn't override be obligatory?

2010-03-14 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Trass3r wrote: > so you don't accidentally override a base class method without knowing it. use -w: import std.stdio; class A { void foo() { writeln("A.foo"); } } class B : A { void foo() { writeln("B.foo"); } } void main() { A a = new

Re: shouldn't override be obligatory?

2010-03-15 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan M Davis wrote: > div0 wrote: > >> Strangely it doesn't give an error if A is an interface though. > > Interfaces aren't overridden; they're implemented. You're providing > functionality, not

Re: covariant final interface functions

2010-03-20 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steven Schveighoffer wrote: > In C++ this is not possible, because it does not consider that you can return > a pointer to > something that is both a C and a D at the same time. FYI, not true. C++ does support covariant returns. Even back as far as v

Re: @pinned classes

2010-04-01 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Justin Spahr-Summers wrote: > On Wed, 31 Mar 2010 22:59:08 -0400, bearophile >> >> Bye, >> bearophile > > I think the D2 spec puts restrictions on what you can do with GC- > allocated pointers (can't convert them to integers, can't perform > arithme

Re: @pinned classes

2010-04-01 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 bearophile wrote: > div0: >> The trouble with a moving garbage collector is that you have to be able >> to accurately scan the stacks of all threads. This is difficult to do >> with a language that can arbitrarily call into

Re: @pinned classes

2010-04-02 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer Deyke wrote: > On 4/1/2010 15:22, div0 wrote: >> You can't easily or reasonably find the bits of the stack used by D >> code, so you can't scan the stack, and therefore you can't move any object. > > You

Re: Things I Learned from ACCU 2010

2010-04-25 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Walter Bright wrote: > > For example, my TV set crashes every once in a while, and must be power > cycled :-( > > The old analog sets never did that! Yeah but your old telly didn't play youtube. How on earth we survived without an infinite number of

Re: Improving Compiler Error Messages

2010-05-03 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 bearophile wrote: > > My personal answer, is that I've written too many semicolons in > my programming life, I prefer languages where I can avoid semicolons > at the end of lines (if the language is well designed for this > and doesn't infer anything.

Re: complement to $

2010-05-14 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nick Sabalausky wrote: > > I think 0 makes perfect sense for any ordered container, or, really, > anything for which $ makes sense (plus some things for which $ doesn't make > sense, like an right-infinite range). However, the rest of your argument

Re: public import and bugs it causes

2010-05-14 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alex Makhotin wrote: > I think this is a bad design of the language. > Global variables are bad things. > C# doesn't have them. Actually C# does have global variables; any public static member of a class is a global variable. - -- My enormous talent

Re: public import and bugs it causes

2010-05-15 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simen kjaeraas wrote: > div0 wrote: > >> Actually C# does have global variables; >> any public static member of a class is a global variable. > > And here we are down to arguing semantics. Is a variable > global if it

Re: Poll: Primary D version

2010-05-20 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bane wrote: > OMG! I can't even spell OMG right! > >> OBG! I'm minority! (still stuck on 1.030) rofl. you tool. (i mean that in a good way) I'm surprised so many people who don't use D bother to read this news group and voted on the poll. Surely the

Re: Default argument values

2010-05-20 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adam Ruppe wrote: > On 5/20/10, bearophile wrote: >> A default argument may be an arbitrary expression. > > What I do in code where I want this kind of behaviour is something like this: > > void func(Whatever* options = null) { > if(options is n

Re: Poll: Primary D version

2010-05-22 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sean Kelly wrote: > retard Wrote: >> What is more interesting is that the majority of D users already use D2, >> which has a huge list of bugs. It just tells that most D users don't use >> D in serious / mission critical / money bringing projects, bu

Re: Poll: Primary D version

2010-05-23 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Walter Bright wrote: > div0 wrote: >> Well I'm still using 2.028. Every version I've tried since has had a >> compiler bug that's been a show stopper. However I'm in no major rush, >> there's enough momen