Re: Three people out of four dislike SDL

2015-11-30 Thread Gordon via Digitalmars-d
On Monday, 30 November 2015 at 23:00:16 UTC, Brad Anderson wrote: On Monday, 30 November 2015 at 22:59:04 UTC, retard wrote: Just voted at http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 - 140 votes, 75% are against SDL. That should count for something? Sonke? Stop. Why?

Re: I hate new DUB config format

2015-11-29 Thread Gordon via Digitalmars-d
On Sunday, 29 November 2015 at 13:21:33 UTC, Marc Schütz wrote: On Friday, 27 November 2015 at 22:05:05 UTC, terchestor wrote: On Friday, 27 November 2015 at 20:16:20 UTC, Minas Mina wrote: SDLang is fine. If someone wants to use D, it won't be SDLang that will stop him. Keep calm and use

Re: I hate new DUB config format

2015-11-28 Thread Gordon via Digitalmars-d
On Saturday, 28 November 2015 at 05:09:48 UTC, ChangLong wrote: On Wednesday, 25 November 2015 at 10:17:02 UTC, Suliman wrote: If SDL will stay by default I will prefer to move to any other build system or will downgrade to old version of DUB. JSON +1 JSON +1 Douchebot -∞

Re: I hate new DUB config format

2015-11-27 Thread Gordon via Digitalmars-d
On Thursday, 26 November 2015 at 20:56:04 UTC, Bruno Medeiros wrote: On 26/11/2015 12:53, Daniel Kozak via Digitalmars-d wrote: V Thu, 26 Nov 2015 12:43:52 + Chris via Digitalmars-d napsáno: On Thursday, 26 November 2015 at 12:29:55 UTC, Jacob Carlborg wrote:

Re: rvalue references

2015-06-12 Thread Stewart Gordon via Digitalmars-d
On 09/06/2015 13:14, Namespace wrote: snip What does this have to do with garbage-collected language? If I have a big struct, e.g. struct Matrix { float[16] values = [...]; } I always want to pass it by ref because a move or a copy would be too slow. That seems to me a matter

Re: setjmp / longjmp

2015-06-09 Thread Stewart Gordon via Digitalmars-d-learn
On 27/04/2015 10:41, ketmar wrote: snip i believe this has something to do with exception frames. but it needs further investigation. What is an exception frame, exactly? Moreover, are these frames applicable even in sections of code where no throwing or catching of exceptions takes place?

Re: rvalue references

2015-06-09 Thread Stewart Gordon via Digitalmars-d
Apologies if I've missed something - I haven't had much time to keep up with the discussions lately. What is the use case for rvalue references in a garbage-collected language? To me, it sounds like people want this feature for D purely because C++ has it. Stewart. -- My email address is

Re: Summer cleanup on https://issues.dlang.org

2015-06-09 Thread Stewart Gordon via Digitalmars-d-announce
On 09/06/2015 06:33, Andrei Alexandrescu wrote: snip * Consolidated D1 D2 issues under D2. It appears that you've changed everything to D2 indiscriminately, including issues that have nothing to do with the D language or compiler, let alone D2 (e.g. issues with the Bugzilla installation,

Re: setjmp / longjmp

2015-04-26 Thread Stewart Gordon via Digitalmars-d-learn
On 26/04/2015 06:56, ketmar wrote: snip you shouldn't use setjmp/longjmp in D. use exceptions instead. something like this: snip True in the general case. Still, there must be some reason that trying it in D causes an AV (even if I disable the GC). I remain curious about what that reason

Re: Updating ddoc to support modern HTML tags

2015-04-26 Thread Stewart Gordon via Digitalmars-d
On 26/04/2015 03:58, Andrei Alexandrescu wrote: On 4/25/15 5:41 PM, Stewart Gordon wrote: snip Even then, I wasn't able to do it perfectly. Has anybody tried to use Ddoc to generate (for example) LaTeX, RTF, XML or JSON output, for that matter? LaTeX is there. I also wrote text only

Re: Updating ddoc to support modern HTML tags

2015-04-25 Thread Stewart Gordon via Digitalmars-d
On 22/04/2015 08:47, Gary Willoughby wrote: On Tuesday, 21 April 2015 at 11:27:35 UTC, Jacob Carlborg wrote: snip I don't think you should use the style attribute at all. I think it's better to use classes, or similar. Yes it's always better to use classes and style them in a CSS file.

Re: Updating ddoc to support modern HTML tags

2015-04-25 Thread Stewart Gordon via Digitalmars-d
On 20/04/2015 20:42, Gary Willoughby wrote: snip Here's a list of the current ddoc symbols (and tag output) that IMHO would need updating: https://gist.github.com/nomad-software/333cd658ad88090dcb0a and here are some proposed substitutions:

Re: Trial migration of Dsource bindings project to Github

2015-04-24 Thread Stewart Gordon via Digitalmars-d-announce
On 24/04/2015 11:58, Kagamin wrote: On Tuesday, 21 April 2015 at 21:31:39 UTC, Stewart Gordon wrote: How does using SVN lead to fragmentation? I don't understand. See http://forum.dlang.org/post/mailman.3160.1418550079.9932.digitalmar...@puremagic.com ?? I've had a quick look, and can't

Re: dsource.org moved

2015-04-24 Thread Stewart Gordon via Digitalmars-d-announce
On 22/04/2015 08:20, Jacob Carlborg wrote: snip If you're forking a project on Github you get your own copy of the project. The projects are linked but the repositories are not. What I mean by that is on your fork you'll see that it is a fork with a link back to the original project. From the

Re: dsource.org moved

2015-04-21 Thread Stewart Gordon via Digitalmars-d-announce
On 21/04/2015 00:35, Vladimir Panteleev wrote: snip In the other thread I referred to this http://stackoverflow.com/questions/5010754/github-collaborators-have-commit-access which makes it sound as though it's possible to do the same thing in GitHub. Is that page wrong? This question

Re: Trial migration of Dsource bindings project to Github

2015-04-21 Thread Stewart Gordon via Digitalmars-d-announce
On 21/04/2015 00:42, Vladimir Panteleev wrote: snip Committing is a local (non-network) operation in git, so you must have pushed them afterwards, or your GUI has done this for you. I committed using TortoiseSVN. Would that auto-push? I never imagined so. snip The shared repository model

Re: Trial migration of Dsource bindings project to Github

2015-04-20 Thread Stewart Gordon via Digitalmars-d-announce
On 20/04/2015 00:37, Vladimir Panteleev wrote: On Sunday, 19 April 2015 at 23:14:13 UTC, Stewart Gordon wrote: For those of you who are still unfamiliar with GitHub, Stewart, I haven't seen an active D project that WASN'T hosted on GitHub for years now. That doesn't mean absolutely none

Re: dsource.org moved

2015-04-20 Thread Stewart Gordon via Digitalmars-d-announce
On 20/04/2015 00:25, Vladimir Panteleev wrote: snip Even if he had, what would be the point? It would greatly slow down the whole process. We have SVN repositories so that people can just put their updates straight in, Only those who have access can do that. Getting patches into the bindings

Re: dsource.org moved

2015-04-20 Thread Stewart Gordon via Digitalmars-d-announce
On 21/04/2015 00:19, Stewart Gordon wrote: snip ?? When I worked on the project on dsource, until it stopped working recently I generally had no trouble just committing my updates using SVN. I didn't have to create patches at all. As I understood it, neither did anybody else who helped out

Trial migration of Dsource bindings project to Github

2015-04-19 Thread Stewart Gordon via Digitalmars-d-announce
In the light of problems with SVN on dsource, the Bindings project has been migrated to GitHub on a trial basis. Apparently this is more or less the last active project on Dsource, so after a brief discussion on another thread I have decided to give it a try. So it's now at:

Re: dsource.org moved

2015-04-19 Thread Stewart Gordon via Digitalmars-d-announce
The wiki is terribly broken at the moment. I just edited a page http://www.dsource.org/projects/bindings/wiki/WikiStart and it changed every linebreak to the literal string `\r\n`. The page looks OK in preview, but then it breaks when you actually save it. Stewart. -- My email address is

Re: dsource.org moved

2015-04-16 Thread Stewart Gordon via Digitalmars-d-announce
On 16/04/2015 03:35, Rikki Cattermole wrote: On 16/04/2015 11:25 a.m., Stewart Gordon wrote: snip How would we go about committing updates to it when this is done? Let's say there is a new function in gdi.h added. You would look for the file: core/sys/windows/windows/gdi.d And add

Re: dsource.org moved

2015-04-07 Thread Stewart Gordon via Digitalmars-d-announce
I haven't been active on the newsgroups lately, so lose track of what's going on. Has anything happened? Just now I tried to commit to the bindings project on dsource, but got an error POST request on '/projects/bindings/!svn/me' failed: 500 Internal Server Error Has it been doing this for a

Re: dsource.org moved

2015-04-07 Thread Stewart Gordon via Digitalmars-d-announce
On 07/04/2015 19:34, Vladimir Panteleev wrote: On Tuesday, 7 April 2015 at 16:33:37 UTC, Stewart Gordon wrote: I haven't been active on the newsgroups lately, so lose track of what's going on. Has anything happened? Just now I tried to commit to the bindings project on dsource, but got

Re: dsource.org moved

2015-04-07 Thread Stewart Gordon via Digitalmars-d-announce
On 07/04/2015 22:44, Stewart Gordon wrote: snip So I guess I'll have to try committing just a few at a time and see if that works. snip Oh dear, it seems even that doesn't. It isn't predictable at what point it will fail, but every single time it's failing somewhere. Even if I try

Re: multidimensional array

2014-09-28 Thread Stewart Gordon via Digitalmars-d-learn
On 28/09/2014 08:48, ketmar via Digitalmars-d-learn wrote: On Sun, 28 Sep 2014 04:24:19 + Joel via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: struct Spot { bool dot; } spots = new Spot[][](800,600); btw, does anybody know why i can do `new ubyte[256];` but not `new

Simulating I/O errors [was: assume, assert, enforce, @safe]

2014-08-01 Thread Assaf Gordon via Digitalmars-d
Sorry to hijack the thread, but: On 07/31/2014 09:27 PM, Walter Bright via Digitalmars-d wrote: If you're brave and want to have some fun, fill up your hard disk so it is nearly full. Now run your favorite programs that read and write files. Sit back and watch the crazy results (far too many

Build/install errors on Linux with LinuxBrew/HomeBrew

2014-03-11 Thread Assaf Gordon
installations. Thanks, -gordon The installation fails (brew install dmd), and it is caused by three separate issues: 1. For phobos 2.065.0, on linux 64bit, running: make install -f posix.max instead of make -f posix.max make install -f posix.max doesn't properly create the share objects

Re: Practical Problems with distribution D projects

2014-02-26 Thread Assaf Gordon
(and HomeBrew/LinuxBrew even easier), but the people I'm aiming for aren't using Arch or Gentoo... I do have high hopes for HomeBrew/LinuxBrew, as brew install dmd and brew install dub seems to work nicely on some linux systems. Best, -gordon

Re: Practical Problems with distribution D projects

2014-02-26 Thread Assaf Gordon
On 02/26/2014 12:34 PM, Adam D. Ruppe wrote: On Wednesday, 26 February 2014 at 17:08:38 UTC, Assaf Gordon wrote: In my first message in this thread, I wrote (item #3), that unless I'm missing something, there is no way to build a statically linked binary with D on Linux. They really aren't

Re: Practical Problems with distribution D projects

2014-02-25 Thread Assaf Gordon
). - To address some of the other responses: On 02/24/2014 09:09 PM, Adam D. Ruppe wrote: On Tuesday, 25 February 2014 at 01:21:03 UTC, Assaf Gordon wrote: dmd does not require root. The install instructions about copying stuff into /etc and such are ridiculously overcomplicated - dmd actually just

Re: Practical Problems with distribution D projects

2014-02-25 Thread Assaf Gordon
On 02/25/2014 10:06 AM, Dicebot wrote: On Tuesday, 25 February 2014 at 14:51:48 UTC, Assaf Gordon wrote: My target audience is not D developers - it is unix casual users (not even developers). I want to make it the easiest for them to use my program. If it's requires more than the standard

Re: Practical Problems with distribution D projects

2014-02-25 Thread Assaf Gordon
On 02/25/2014 11:17 AM, Adam D. Ruppe wrote: On Tuesday, 25 February 2014 at 16:04:56 UTC, Assaf Gordon wrote: Not sure what the windows attitude is, since I haven't developed software for windows in 12 years... The Windows attitude is expecting things to actually work for the end user

Practical Problems with distribution D projects

2014-02-24 Thread Assaf Gordon
is an optimal choice: even if my program is useful in theory, it's of no use if very few people can actually run it. Are there any suggestions how to deal with these issues ? Thanks, -gordon

Compile-type array of classes?

2014-02-23 Thread Gordon
suggestions are welcomed, -gordon

Re: Compile-type array of classes?

2014-02-23 Thread Gordon
On Sunday, 23 February 2014 at 20:52:58 UTC, anonymous wrote: On Sunday, 23 February 2014 at 20:34:07 UTC, Gordon wrote: Given one interface, and multiple implementation classes, I want to create a list of the classes (in compile time). import std.typetuple: TypeTuple; alias

Build Hash from Array in one statement ?

2014-02-22 Thread Gordon
be: %hash = map { $_ = 1 } @array; --- Or, put differently, is there a way to convert values in an array to keys of hash in one statement ? Thanks! -gordon

Re: Inherent code performance advantages of D over C?

2014-02-01 Thread Stewart Gordon
On 07/12/2013 17:29, Walter Bright wrote: On 12/7/2013 1:52 AM, Joseph Rushton Wakeling wrote: On 07/12/13 02:10, Walter Bright wrote: I know well that people used to C++ will likely do this. However, one can get in the habit of by default adding final: as the first line in a class definition,

Re: std.complex

2014-01-03 Thread Stewart Gordon
On 03/01/2014 00:03, Joseph Rushton Wakeling wrote: On 03/01/14 00:33, Stewart Gordon wrote: Please be specific. You know, I'm starting to find your tone irritating. You are the one who's asking for functionality that goes beyond any Complex implementation that I'm aware of in any other

Re: std.complex

2014-01-03 Thread Stewart Gordon
On 03/01/2014 17:04, Joseph Rushton Wakeling wrote: On 03/01/14 14:32, Stewart Gordon wrote: I wasn't asking for it to go beyond the existing complex implementation or any other. I was proposing that the arbitrary restriction be removed so that the implementation we already have would work

Re: std.complex

2014-01-02 Thread Stewart Gordon
On 01/01/2014 19:55, Joseph Rushton Wakeling wrote: snip There are binary operations on complex numbers where the only sensible outcome seems to be non-integral real and imaginary parts. Addition, subtraction and multiplication are OK with integral types, but division really seems unpleasant to

Re: std.complex

2014-01-02 Thread Stewart Gordon
On 01/01/2014 23:12, Lars T. Kyllingstad wrote: snip /* Makes Complex!(Complex!T) fold to Complex!T. The rationale for this is that just like the real line is a subspace of the complex plane, the complex plane is a subspace of itself. Example of usage: This doesn't seem to

Re: std.complex

2014-01-02 Thread Stewart Gordon
On 02/01/2014 15:38, Simen Kjærås wrote: On 2014-01-01 12:29, Stewart Gordon wrote: Or even more exotically, use Complex!(Complex!real) to implement hypercomplex numbers. For a more generic solution to this, see Cayley-Dickson construction[1] and my implementation of such: Hypercomplex

Re: std.complex

2014-01-02 Thread Stewart Gordon
On 02/01/2014 19:32, Joseph Rushton Wakeling wrote: On Thursday, 2 January 2014 at 18:12:56 UTC, Stewart Gordon wrote: Then why not just disable division if it's a non-float type, rather than preventing the whole complex template from being used with that type? This is like cutting off

Re: std.complex

2014-01-02 Thread Stewart Gordon
On 02/01/2014 21:10, Joseph Rushton Wakeling wrote: On Thursday, 2 January 2014 at 20:23:40 UTC, Stewart Gordon wrote: snip How would it complicate the implementation? Removing the undocumented rule whereby Complex!(Complex!T) folds to Complex!T would be a slight simplification. It would

Re: std.complex

2014-01-01 Thread Stewart Gordon
On 19/11/2013 02:03, Andrei Alexandrescu wrote: On 11/18/13 5:44 PM, Craig Dillabaugh wrote: snip Is there any reason why complex numbers in D's standard lib must be of non-integral types? I believe in C++ the type is optimized for floating point values, but allows other types. The simple

Re: readln() returns new line charater

2013-12-31 Thread Stewart Gordon
On 31/12/2013 14:45, Marco Leise wrote: snip I guess I just don't see what an immutable string buys you. The mutable part in a string is just a pointer and length pair. Just write: immutable s = readln()[0 .. $-1]; and you have an immutable string at no cost. What if the line is at EOF

Re: readln() returns new line charater

2013-12-31 Thread Stewart Gordon
On 28/12/2013 16:49, Jeroen Bollen wrote: Why is when you do readln() the newline character (\n) gets read too? Wouldn't it make more sense for that character to be stripped off? The newline character needs to be read - how else will it know when it's got to the end of the line? :) Of

Syntax question about inlined functions/delegates/lambdas

2013-12-30 Thread Gordon
= 42 === So I've learned that syntaxes in cases 2,4,6 are wrong, but they still compile. May question is - what do they do? what usage do they have (since they do not trigger a compilation warning)? Thanks, -gordon

Re: Reserving/Preallocating associative array?

2013-12-27 Thread Gordon
On Friday, 27 December 2013 at 09:37:09 UTC, Benjamin Thaut wrote: Am 25.12.2013 17:12, schrieb Gordon: So I was interrested how far you can take this. The version bearophile posted runs in 14 seconds (48420527 ticks) on my machine. ... At this point the profiler looked something like

Re: Reserving/Preallocating associative array?

2013-12-27 Thread Gordon
On Friday, 27 December 2013 at 17:26:42 UTC, Benjamin Thaut wrote: Also, gordon whats is keeping you from converting the textual representation to a binary one? I mean, if you need to read that file in often, you can easly preprocess it into a binary blob. You could even modify my hashmap

Re: Reserving/Preallocating associative array?

2013-12-26 Thread Gordon
loaded the SQL dump to a MySQL server, then used mysqldump --tab to export the tables I needed. HTH, -gordon

Modifing local variables with anonymous delegate?

2013-12-26 Thread Gordon
[1,2] and different kinds of closures [3], but I wasn't able to figure it out (I'm new to D). Thanks, -gordon [1] Anonymous Delegates(from 2008): http://forum.dlang.org/post/g36kpk$15rb$1...@digitalmars.com [2] Local vars in delegates(from 2009): http://forum.dlang.org/thread/hgshuk$1620$1

Re: Modifing local variables with anonymous delegate?

2013-12-26 Thread Gordon
On Thursday, 26 December 2013 at 23:52:09 UTC, Adam D. Ruppe wrote: On Thursday, 26 December 2013 at 23:23:02 UTC, Gordon wrote: But the b in main retains its original value of 42. Try printing the b in main again AFTER printing c. You should see the change. std.algorithm for the most part

Re: Reserving/Preallocating associative array?

2013-12-25 Thread Gordon
on, and populating the union the program took about 2m45s . 4. Adding GC.disable brought it down to 25s. HTH, -gordon

Re: Reserving/Preallocating associative array?

2013-12-25 Thread Gordon
. std.conv.ConvException@/usr/include/dmd/phobos/std/conv.d(2009): Unexpected 'H' when converting from type char[] to type ulong). Many thanks, -gordon

Re: Reserving/Preallocating associative array?

2013-12-25 Thread Gordon
On Wednesday, 25 December 2013 at 18:51:22 UTC, Andrei Alexandrescu wrote: On 12/25/13 10:25 AM, John Colvin wrote: Gordon, you may find this has better performance if you add () to sort. Also, can you share your data somewhere if it's not confidential? It will be related

formattedRead whitespace quirks (compared to scanf)

2013-12-25 Thread Gordon
Hello, Trying to use std.file.slurp as generic file loader, I encountered a quirk in the way formattedRead works compared to the (standard?) scanf. It seems using %s format does not stop at whitespace if the %s is the last item in the format string. A simple comparison would be: -- in C

Re: formattedRead whitespace quirks (compared to scanf)

2013-12-25 Thread Gordon
On Wednesday, 25 December 2013 at 21:06:46 UTC, Ali Çehreli wrote: On 12/25/2013 12:43 PM, Gordon wrote: In C, the variable a would contain only hello; In D, the variable a would contain hello world 42; That is by design. Since a string can contain space characters, the normal behavior

Re: formattedRead whitespace quirks (compared to scanf)

2013-12-25 Thread Gordon
-Programming-Language/phobos/pull/1812 Hope this is the right way to send patches... -gordon

Reserving/Preallocating associative array?

2013-12-24 Thread Gordon
before populating it? Or another trick? Many thanks, -gordon

Re: Reserving/Preallocating associative array?

2013-12-24 Thread Gordon
of text): You're just too fast for me... After incorporating your three suggestions, the entire file (11M lines) loads in just 25 seconds (down from 3.5 minutes). AMAZING! Many thanks, -gordon

Re: What endiannesses do D support?

2013-10-04 Thread Stewart Gordon
On 04/10/2013 11:59, Denis Shelomovskij wrote: Some of druntime/phobos code assumes it is one of little/big endianness others have `static assert(0)` for third case. Lets clear the situation and make a decision. Are you thinking of middle-endian orders such as 2,3,0,1? Or just wondering in

WindowsAPI - Problem with DECLARE_HANDLE definition

2013-09-08 Thread Stewart Gordon
It has just come to my attention that there's a problem with the DECLARE_HANDLE template in the Win32 bindings. This is the definition in MinGW: #define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n And this is the definition in our bindings: package template DECLARE_HANDLE(string

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-19 Thread Stewart Gordon
On 02/08/2013 06:51, Sönke Ludwig wrote: snip I would seriously take into consideration to just drop the A versions. D is unicode by nature, the W versions are supported by all NT systems (since Windows 95 using MSLU), and using an ANSI version of a function also just begs for bugs if typed as

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-19 Thread Stewart Gordon
On 01/08/2013 21:59, Stewart Gordon wrote: snip - Just use the D const pointer syntax where we need it, rather than this CPtr template that was made for D1 compatibility. Now implemented. - Declare all constants as enums, in order to force inlining. Now in the translation instructions

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Stewart Gordon
On 02/08/2013 09:47, Jonathan M Davis wrote: snip I'm not sure. Possibly. Given that we previously had code that checked the version of Windows and used the A functions if it was running on Windows 9x, there's probably a decent chance that something similar could be done with the Vista vs

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Stewart Gordon
On 02/08/2013 02:55, Mike Parker wrote: snip - Define a mixin template along the lines of __AW in newer versions of MinGW, so that version (Unicode) { alias QwertW Qwert; } else { alias QwertA Qwert; } can become simply mixin DECLARE_AW!(Qwert); I would be

Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Stewart Gordon
I've made some changes following recentish discussion. The changes are: - Do away with Windows 9x versioning, given that Windows 9x is no longer supported either by Microsoft or by DMD (implemented). - a DECLARE_HANDLE template to declare handle types (I think it's fully implemented, please

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Stewart Gordon
Moreover, while getting rid of Windows 9x has simplified the versioning, I was just thinking about how far back along the NT line we should go. At the moment, we go back to NT4. But it's now harder to verify whether it supports a given API since the MSDN docs now seem to start at Win2k (even

Re: Array void init

2013-05-17 Thread Stewart Gordon
On 27/04/2013 06:29, Steven Schveighoffer wrote: snip Have you considered what this does? Consider a standard [1.0, 2.0] call: In essence, it pushes 1.0 and 2.0 onto the stack, then calls a function to allocate the memory and use the given data. snip Does it? I would have thought it stores

Re: Official D Grammar

2013-04-23 Thread Stewart Gordon
On 02/04/2013 03:13, Walter Bright wrote: On 4/1/2013 4:18 PM, Brian Schott wrote: snip 1) Grammar defined in terms of things that aren't tokens. Take, for example, PropertyDeclaration. It's defined as an @ token followed by... what? safe? It's not a real token. It's an identifier. You can't

Re: Collections

2013-04-06 Thread Stewart Gordon
On 12/03/2013 11:57, ZILtoid1991 wrote: Is there any equaliaments of java collections in D? Different collections that are part of the Java API have different D equivalents. For lists, vectors and stacks, arrays (with their increased power over C, Java, etc. arrays) are more or less the D

Re: File compare/merge

2013-04-04 Thread Stewart Gordon
On 02/04/2013 19:32, Kagamin wrote: On Tuesday, 2 April 2013 at 10:44:05 UTC, Stewart Gordon wrote: the compare feature in Notepad++ Would *love* scintilla-based compare tool. Where's the feature? Can't find it. It's a plugin - I think whether it comes pre-installed depends on which Notepad

Re: File compare/merge

2013-04-02 Thread Stewart Gordon
On 01/04/2013 20:53, Walter Bright wrote: Life has gotten a lot easier for me trying to manage multiple branches of D since I've been using file compare/merge tools. I use winmerge for Windows, and meld for Linux. They are both free, and work great. What do you use? Nowadays, CSDiff, the

Re: Official D Grammar

2013-04-02 Thread Stewart Gordon
On 02/04/2013 00:18, Brian Schott wrote: snip I think that we need to be able to create a grammar description that: * Fits in to a single file, so that a tool implementer does not need to collect bits of the grammar from the various pages on dlang.org. * Can be verified to be correct by an

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-22 Thread Stewart Gordon
On 21/03/2013 07:51, Jonathan M Davis wrote: On Thursday, March 21, 2013 08:29:28 deadalnix wrote: Wouldn't that trigger bunch of false warning on legitimate overloaded opSomething ? I'm not sure that overriding a deprecated function triggers a deprecation warning, but regardless, for

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-19 Thread Stewart Gordon
On 19/03/2013 05:38, Jonathan M Davis wrote: snip Well, IIRC, if when you override a function, and you give it a different parameter type, it's a new overload rather than actually overriding anything (even if the type of the parameter in the derived type's function is a derived type of the type

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-18 Thread Stewart Gordon
On 18/03/2013 01:05, Jonathan M Davis wrote: On Monday, March 18, 2013 00:53:52 Stewart Gordon wrote: Why would some class want to implement these methods in a way that alters the object? Because const in D is physical const, not logical const. So, for instance, const prevents caching

Re: Policy on trackers in Bugzilla revisited

2013-03-18 Thread Stewart Gordon
On 18/03/2013 15:56, Don wrote: On Sunday, 17 March 2013 at 21:54:54 UTC, Stewart Gordon wrote: However, since that time, two or three people have been killing off random trackers, seemingly because they personally don't like the concept. No, because the bugs in question were junk. snip

Re: Policy on trackers in Bugzilla revisited

2013-03-18 Thread Stewart Gordon
On 18/03/2013 18:10, Jonathan M Davis wrote: snip Walter and Brad Roberts are both very much against them, favoring keywords for keeping track of related bugs. It was recently discussed in the druntime newsgroup: Uh, that doesn't seem to be a newsgroup for some obscure reason.

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-18 Thread Stewart Gordon
On 19/03/2013 00:19, Jakob Ovrum wrote: snip It's worth noting that including a standard interface (as in the interface keyword) for stuff like Comparable, Hashable etc. is a possibility that can be explored to enable runtime polymorphism akin to the current Object for programs that need it.

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-18 Thread Stewart Gordon
On 18/03/2013 23:06, Jonathan M Davis wrote: On Monday, March 18, 2013 22:11:49 Stewart Gordon wrote: snip Look up std.functional.memoize. It doesn't work with pure as it forces you to put state outside of the object, and it's only applicable to caching, not lazy initialization. Why can't

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-18 Thread Stewart Gordon
On 19/03/2013 00:46, Jonathan M Davis wrote: On Tuesday, March 19, 2013 00:26:40 Stewart Gordon wrote: snip Why can't it be used as a means of lazy initialization? Because if one of the member variables hasn't been initialized yet, then it can't be compared. You miss the whole point

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-18 Thread Stewart Gordon
On 19/03/2013 01:17, Peter Williams wrote: snip Am I right in thinking that removal of these methods from Object will mean that it will no longer be necessary for the the argument to be of type Object Yes, and that's indeed a potentially good reason to remove opCmp and opEquals from Object,

Policy on trackers in Bugzilla revisited

2013-03-17 Thread Stewart Gordon
There seems to be disagreement between various users on the propriety of trackers. These are bug reports that don't describe a single bug, nor a feature request, but are used to group together related issues. Trackers (also known as meta bugs or umbrella bugs) are used heavily on Mozilla's

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-17 Thread Stewart Gordon
On 17/03/2013 23:19, Peter Williams wrote: snip So my question is Why are the arguments to opEquals and opCmp (for Objects) not declared in or const?. Known bug. http://d.puremagic.com/issues/show_bug.cgi?id=1824 This was reported 5 years ago, and it's a serious issue, so I don't know why

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-17 Thread Stewart Gordon
On 18/03/2013 00:34, Jonathan M Davis wrote: On Monday, March 18, 2013 01:20:40 Timon Gehr wrote: So my question is Why are the arguments to opEquals and opCmp (for Objects) not declared in or const?. Because not all valid implementations can be. They shouldn't be in Object anyway. Yeah. It

Re: DDoc: possible to show inherited class members?

2013-03-10 Thread Stewart Gordon
On 09/03/2013 07:06, Kapps wrote: On Saturday, 9 March 2013 at 02:08:15 UTC, Steven Schveighoffer wrote: snip As far as I can tell, vibe.d's doc generation tool is doing this. http://vibed.org/temp/d-programming-language.org/phobos/std/stream/EndianStream.html -Steve It would be nice if

Re: std.stream replacement

2013-03-10 Thread Stewart Gordon
On 10/03/2013 15:48, Marco Leise wrote: snip For most binary formats you need to deal with endianness for short/int/long Endian conversion is really part of decoding the data, rather than of reading the file. As such, it should be a layer over the raw file I/O API/implementation. And

Re: std.stream replacement

2013-03-09 Thread Stewart Gordon
On 09/03/2013 02:30, Jonathan M Davis wrote: snip In general, ranges should work just fine for I/O as long as they have an efficient implementation which underneathbuffers (and preferably makes them forward ranges). Aside from how its implemented internally, there's no real difference between

Re: std.stream replacement

2013-03-08 Thread Stewart Gordon
On 07/03/2013 12:07, Steven Schveighoffer wrote: snip I don't really understand the need to make ranges into streams. snip Ask Walter - from what I recall it was his idea to have range-based file I/O to replace std.stream. Thikning about it now, a range-based interface might be good for

Re: std.stream replacement

2013-03-06 Thread Stewart Gordon
On 06/03/2013 16:36, Steven Schveighoffer wrote: On Tue, 05 Mar 2013 18:24:22 -0500, BLM768 blm...@gmail.com wrote: snip Create a range operation like r.takeArray(n). You can optimize it to take a slice of the buffer when possible. This is not a good idea. We want streams to be high

Re: Switch case falltrhough, regression or intended behavior ?

2013-02-25 Thread Stewart Gordon
On 25/02/2013 02:01, Jonathan M Davis wrote: snip There's a more important way in which it isn't quite treat warnings as errors: if you use an IsExpression to test the validity of a snippet of code, a pass with warnings must still be a pass. Otherwise, you'll get code that compiles with or

Re: Switch case falltrhough, regression or intended behavior ?

2013-02-24 Thread Stewart Gordon
On 18/02/2013 01:21, Stewart Gordon wrote: On 17/02/2013 21:46, Jonathan M Davis wrote: snip Probably because -w turns warnings into errors. That's its whole schtick. No, the whole schtick of -w is that it causes warnings to be emitted at all. It's a quirk of the way it was designed

Re: @property as proposed in various DIPs, my attempted use and what I think of it

2013-02-21 Thread Stewart Gordon
On 20/02/2013 20:32, Jonathan M Davis wrote: On Wednesday, February 20, 2013 20:41:24 Rob T wrote: The reality is that I often don't know if I'll be using one syntax over the other until usage experience is gained and the usage context determines the answer. I may even want to use both forms

Re: Switch case falltrhough, regression or intended behavior ?

2013-02-17 Thread Stewart Gordon
On 17/02/2013 16:10, deadalnix wrote: I have several instance of cases like this : switch(c) { case 'U', 'u' : case 'L', 'l' : // code . . . } dmd from master complains about it (Error: switch case fallthrough - use 'goto case;' if intended). It used to work. snip

Re: Switch case falltrhough, regression or intended behavior ?

2013-02-17 Thread Stewart Gordon
On 17/02/2013 20:07, Jonathan M Davis wrote: snip Implicit fall through shouldn't have been allowed from the beginning. It would appear that this has finally been banned. Implicit fallthrough is a warning when a case stament is non-empty, but if it's empty (as in the example), then there is

Re: Switch case falltrhough, regression or intended behavior ?

2013-02-17 Thread Stewart Gordon
On 17/02/2013 21:46, Jonathan M Davis wrote: snip Hmm, that brings up a different (though minor) issue: If it's a warning, why does it say Error? Probably because -w turns warnings into errors. That's its whole schtick. No, the whole schtick of -w is that it causes warnings to be emitted at

Re: Switch case falltrhough, regression or intended behavior ?

2013-02-17 Thread Stewart Gordon
On 18/02/2013 01:10, Andrej Mitrovic wrote: snip The grammar and spec are often broken. The OP sample is completely valid. The whole point of a spec is to define the language. So if the spec makes some code illegal, then (at least for the time being) it is illegal. Stewart.

  1   2   3   4   5   6   7   8   >