Re: dmd 1.067 and 2.052 release

2011-02-22 Thread phobophile
dsimcha Wrote: == Quote from Don (nos...@nospam.com)'s article Walter Bright wrote: Now with 64 bit Linux support! (Though expect problems with it, it's brand new.) http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.067.zip

Re: dmd 1.067 and 2.052 release

2011-02-22 Thread Don
phobophile wrote: dsimcha Wrote: == Quote from Don (nos...@nospam.com)'s article Walter Bright wrote: Now with 64 bit Linux support! (Though expect problems with it, it's brand new.) http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.067.zip

Re: dmd 1.067 and 2.052 release

2011-02-22 Thread Extrawurst
On 21.02.2011 09:53, Stephan wrote: On 18.02.2011 11:18, Walter Bright wrote: Now with 64 bit Linux support! (Though expect problems with it, it's brand new.) http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.067.zip

Optlink 8.00.10

2011-02-22 Thread Walter Bright
This fixes a couple of crashers, 2436 and 3372, that were causing people lots of trouble: http://ftp.digitalmars.com/link.8.00.10.zip

Re: dmd 1.067 and 2.052 release

2011-02-22 Thread Jonathan M Davis
On Tuesday, February 22, 2011 16:17:39 Extrawurst wrote: On 21.02.2011 09:53, Stephan wrote: On 18.02.2011 11:18, Walter Bright wrote: Now with 64 bit Linux support! (Though expect problems with it, it's brand new.) http://www.digitalmars.com/d/1.0/changelog.html

Re: SWIG 2.0.2 with D support has been released

2011-02-22 Thread Gour
On Tue, 22 Feb 2011 02:54:02 +0100 David Nadlinger s...@klickverbot.at wrote: SWIG 2.0.2, the first version to come with support for D, has been released yesterday. For more detail, please refer to my blog: http://klickverbot.at/blog/2011/02/swig-2-0-2-with-d-support-released/ Thank you very

Re: about the GUI issue.

2011-02-22 Thread Kagamin
David Wang Wrote: So, I want to know that whether our D can use this GtkApplication or we can using D to produce the GUI level applications based on GTK+3.0 ? You can do both things if you have appropriate bindings.

Re: CMake for D2 ready for testers

2011-02-22 Thread Gour
On Mon, 21 Feb 2011 21:22:54 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: With CMakeD, you clone the repository, i.e. $ hg clone http://cmaked2.googlecode.com/hg/ cmaked2 and $ cd cmaked2/cmaked $ mkdir build $ cd build $ cmake .. $ make install to install it. That will copy the

Re: We need to rethink remove in std.container

2011-02-22 Thread Denis Koroskin
On Tue, 22 Feb 2011 05:55:20 +0300, Jonathan M Davis jmdavisp...@gmx.com wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary range from a container just plain

Re: CMake for D2 ready for testers

2011-02-22 Thread Gour
On Tue, 22 Feb 2011 09:42:46 +0100 Gour g...@atmarama.net wrote: I installed CMakeD from the archlinux package, then pulled from the repo and tried tests suite. Here is the result: Oops...forgot to run 'make test': [gour@atmarama build] make test Running tests... Test project

Re: float equality

2011-02-22 Thread Kagamin
bearophile Wrote: Andrei Alexandrescu: This is a long-standing myth. I worked on Wall Street and have friends who have been doing it for years. Everybody uses double. Unbrutal Python programmers are encouraged to avoid the float type to manage money values, and use decimal instead:

Re: We need to rethink remove in std.container

2011-02-22 Thread Lutger Blijdestijn
Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary range from a container just plain sucks. remove takes a range type which is the range type

Re: Linking COFF and OMF

2011-02-22 Thread Trass3r
I'm really glad that this issue is being looked into. I've literally wasted days (if not a few weeks) getting another to work instead of SNN.lib, and I think that the ultimate culprit that prevented things from working was _xi_a. What steps did you take? btw, I opened

Re: We need to rethink remove in std.container

2011-02-22 Thread Jonathan M Davis
On Tuesday 22 February 2011 01:04:48 Lutger Blijdestijn wrote: Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary range from a container just

Re: Linking COFF and OMF

2011-02-22 Thread %u
I'm really glad that this issue is being looked into. I've literally wasted days (if not a few weeks) getting another to work instead of SNN.lib, and I think that the ultimate culprit that prevented things from working was _xi_a. What steps did you take? btw, I opened

Re: CMake for D2 ready for testers

2011-02-22 Thread Gour
On Mon, 21 Feb 2011 21:22:54 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: They also wrote in what regard CMake didn't work out for them http://code.google.com/p/gyp/wiki/GypVsCMake I read it as well as http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/34829 thread, but nothing

Ranges and Algorithms -- Templates, Delegates, or Ranges?

2011-02-22 Thread %u
Having learned functional programming in Scheme a couple months ago, I tried my hand at using map(), reduce(), and filter() in D: int addend = 5; map(delegate int(int x) { return x + addend; }, iota(1, 5)); but it didn't work. It turned out that map() actually took the mapper as its

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Gour wrote: On Mon, 21 Feb 2011 21:22:54 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: With CMakeD, you clone the repository, i.e. $ hg clone http://cmaked2.googlecode.com/hg/ cmaked2 and $ cd cmaked2/cmaked $ mkdir build $ cd build $ cmake .. $ make install to install

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Gour wrote: On Tue, 22 Feb 2011 09:42:46 +0100 Gour g...@atmarama.net wrote: I installed CMakeD from the archlinux package, then pulled from the repo and tried tests suite. Here is the result: Oops...forgot to run 'make test': [gour@atmarama build] make test Running tests... Test

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Gour wrote: On Mon, 21 Feb 2011 12:40:11 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: Recently I've been a bit distracted from CMakeD development since I stumbled over Gyp http://code.google.com/p/gyp/ and Premake http://industriousone.com/premake Both address similar needs

Re: Ranges and Algorithms -- Templates, Delegates, or Ranges?

2011-02-22 Thread Mafi
Am 22.02.2011 11:29, schrieb %u: Having learned functional programming in Scheme a couple months ago, I tried my hand at using map(), reduce(), and filter() in D: int addend = 5; map(delegate int(int x) { return x + addend; }, iota(1, 5)); but it didn't work. It turned out that

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Gour wrote: On Tue, 22 Feb 2011 09:42:46 +0100 Gour g...@atmarama.net wrote: I installed CMakeD from the archlinux package, then pulled from the repo and tried tests suite. Here is the result: Oops...forgot to run 'make test': [gour@atmarama build] make test Running tests... Test

Re: We need to rethink remove in std.container

2011-02-22 Thread Lutger Blijdestijn
Jonathan M Davis wrote: On Tuesday 22 February 2011 01:04:48 Lutger Blijdestijn wrote: Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary

Re: CMake for D2 ready for testers

2011-02-22 Thread Gour
On Tue, 22 Feb 2011 12:10:08 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: Yeah. That looks good. I'd like to add your setup to http://code.google.com/p/cmaked2/wiki/TestedPlatforms Can please you leave a comment there? Done. Sincerely, Gour -- “In the material world, conceptions of

Re: [OT] Round 2: Webpage design and Name That Color!

2011-02-22 Thread Jacob Carlborg
On 2011-02-22 03:22, Nick Sabalausky wrote: Nick Sabalauskya@a.a wrote in message news:ijpvpl$2l8u$1...@digitalmars.com... I've been updating the docs for my Goldie project in preparation of a new release, and figured the they looked a bit...sterile, so I've tweaked the CSS a bit. And, well, I

Re: CMake for D2 ready for testers

2011-02-22 Thread Gour
On Tue, 22 Feb 2011 12:07:13 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: It does work for me most of the time. I work on Linux. There is one neat trick if you need to link against shared libraries which isn't supported by dmd yet. For these cases I rely on gcc. E.g.

Re: Ranges and Algorithms -- Templates, Delegates, or Ranges?

2011-02-22 Thread Lutger Blijdestijn
Mafi wrote: Am 22.02.2011 11:29, schrieb %u: Having learned functional programming in Scheme a couple months ago, I tried my hand at using map(), reduce(), and filter() in D: int addend = 5; map(delegate int(int x) { return x + addend; }, iota(1, 5)); but it didn't work. It

Re: CMake for D2 ready for testers

2011-02-22 Thread Russel Winder
On Mon, 2011-02-21 at 21:22 +0100, Jens Mueller wrote: [ . . . ] Can the code comprising the D support for CMake be packaged up so that it can be offerred to everyone direct from a DVCS repository? SCons and Waf have the tool concept to allow for this. CMake must have something

Re: We need to rethink remove in std.container

2011-02-22 Thread Jonathan M Davis
On Tuesday 22 February 2011 03:52:34 Lutger Blijdestijn wrote: Jonathan M Davis wrote: On Tuesday 22 February 2011 01:04:48 Lutger Blijdestijn wrote: Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty

Re: float equality

2011-02-22 Thread Mike James
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:ijuub9$tv5$1...@digitalmars.com... On 2/21/11 4:48 AM, Jonathan M Davis wrote: On Monday 21 February 2011 01:55:28 Walter Bright wrote: Kevin Bealer wrote: 1. To solve the basic problem the original poster was asking --

Re: We need to rethink remove in std.container

2011-02-22 Thread Andrei Alexandrescu
On 2/21/11 8:55 PM, Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary range from a container just plain sucks. remove takes a range type which is

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Russel Winder wrote: On Mon, 2011-02-21 at 21:22 +0100, Jens Mueller wrote: [ . . . ] With CMakeD, you clone the repository, i.e. $ hg clone http://cmaked2.googlecode.com/hg/ cmaked2 and $ cd cmaked2/cmaked $ mkdir build $ cd build $ cmake .. $ make install to install it.

Re: We need to rethink remove in std.container

2011-02-22 Thread Andrei Alexandrescu
On 2/21/11 11:27 PM, Jonathan M Davis wrote: The typical way to remove an element in the STL is to use find to find an element and then erase to remove it. remove in std.container is doing the same thing. The problem is that you can't give the result of find to remove, because instead of a

Re: We need to rethink remove in std.container

2011-02-22 Thread Andrei Alexandrescu
On 2/22/11 3:04 AM, Lutger Blijdestijn wrote: The table in the docs mention stableRemoveAny(v) which says Same as c.removeAny(v), but is guaranteed to not invalidate any iterators. Though c.removeAny(v) itself is not listed in the table nor implemented in RedBlackTree, isn't this the right

Re: Uh... destructors?

2011-02-22 Thread Simen Kjaeraas
%u Wrote: Well, the trouble is, pretty much all of these are invalid attributes: - static obviously makes no sense And here is where you're wrong. You have defined a static destructor, which is called with module destructor as the program goes out of scope, rather than when your struct or

Re: CMake for D2 ready for testers

2011-02-22 Thread Gour
On Tue, 22 Feb 2011 14:10:59 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: Hmm. I do it like this. Download CMake from the official site and install it to /path/to/myhome/local. Then I set PATH and LD_LIBRARY_PATH as needed. And if I configure CMakeD using my cmake it will install the files

Re: We need to rethink remove in std.container

2011-02-22 Thread Lutger Blijdestijn
Jonathan M Davis wrote: On Tuesday 22 February 2011 03:52:34 Lutger Blijdestijn wrote: Jonathan M Davis wrote: On Tuesday 22 February 2011 01:04:48 Lutger Blijdestijn wrote: Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like

Re: We need to rethink remove in std.container

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 03:43:25 -0500, Denis Koroskin 2kor...@gmail.com wrote: I believe remove operation is better expressed in terms of a Cursor (iterator in C++). It also doesn't make much sense (at least of me) for a find to return a subrange of the source range. While it does

Re: We need to rethink remove in std.container

2011-02-22 Thread Steven Schveighoffer
On Mon, 21 Feb 2011 21:55:20 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary range from a container just plain

Re: Ranges and Algorithms -- Templates, Delegates, or Ranges?

2011-02-22 Thread Andrei Alexandrescu
On 2/22/11 5:15 AM, Mafi wrote: Am 22.02.2011 11:29, schrieb %u: Having learned functional programming in Scheme a couple months ago, I tried my hand at using map(), reduce(), and filter() in D: int addend = 5; map(delegate int(int x) { return x + addend; }, iota(1, 5)); but it didn't work.

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Jens Mueller wrote: Gour wrote: On Tue, 22 Feb 2011 09:42:46 +0100 Gour g...@atmarama.net wrote: I installed CMakeD from the archlinux package, then pulled from the repo and tried tests suite. Here is the result: Oops...forgot to run 'make test': [gour@atmarama build] make

Re: We need to rethink remove in std.container

2011-02-22 Thread Lutger Blijdestijn
Andrei Alexandrescu wrote: On 2/22/11 3:04 AM, Lutger Blijdestijn wrote: The table in the docs mention stableRemoveAny(v) which says Same as c.removeAny(v), but is guaranteed to not invalidate any iterators. Though c.removeAny(v) itself is not listed in the table nor implemented in

Re: We need to rethink remove in std.container

2011-02-22 Thread Andrei Alexandrescu
On 2/22/11 7:58 AM, Steven Schveighoffer wrote: A cursor in dcollections is actually a zero or one element range. It can only reference exactly one element. Since it has no references to other elements, it is immune to operations that use the surrounding elements. At this exact point I had

Re: We need to rethink remove in std.container

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 08:01:24 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 2/21/11 8:55 PM, Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Gour wrote: On Tue, 22 Feb 2011 14:10:59 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: Hmm. I do it like this. Download CMake from the official site and install it to /path/to/myhome/local. Then I set PATH and LD_LIBRARY_PATH as needed. And if I configure CMakeD using my cmake it

Re: CMake for D2 ready for testers

2011-02-22 Thread David Nadlinger
On 2/22/11 1:32 PM, Russel Winder wrote: Lua and Python seem, between them, to have about a 100% monopoly on the dynamic language plugin market, at least in the media software arena. IIRC, Naughty Dog, the people behind the Uncharted series, are using something like PLT Scheme, i.e. LISP, for

Re: We need to rethink remove in std.container

2011-02-22 Thread Lutger Blijdestijn
Steven Schveighoffer wrote: On Mon, 21 Feb 2011 21:55:20 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary range

Re: We need to rethink remove in std.container

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 09:38:04 -0500, Lutger Blijdestijn lutger.blijdest...@gmail.com wrote: Steven Schveighoffer wrote: RedBlackTree supports the equalRange function, which gives you a range of elements equal to the value you give. oo how I missed that. When you are working on

Re: We need to rethink remove in std.container

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 09:23:00 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 2/22/11 7:58 AM, Steven Schveighoffer wrote: A cursor in dcollections is actually a zero or one element range. It can only reference exactly one element. Since it has no references to other

D3 plans

2011-02-22 Thread phobophile
A legitimate question - where are the D3 plans? Any language not in active development (no don't mean phobos, not toolchain) is dead. D2 has little potential without AST macros. I want to participate in D3 development. Maybe bearophile could lead the process this time?

Re: float equality

2011-02-22 Thread spir
On 02/21/2011 10:17 PM, so wrote: If one doesn't know what floating point is and insists on using it, it is his own responsibility to face the consequences. I don't buy this argument. Why not? A logical flaw on my part or the statement being somewhat harsh? Because i don't think it is the

Re: Linking COFF and OMF

2011-02-22 Thread Trass3r
Sounds like a lot of fun ;) I'm also sick of dmd's policy to mess everything up on Windows by completely depending on dmc and its friends while Linux users have a proper linker, libc and object format. I mean wouldn't it be the easiest way to use COFF + MinGW's ld and libc since it's very

Re: Uh... destructors?

2011-02-22 Thread Robert Jacques
On Tue, 22 Feb 2011 01:08:38 -0500, %u wfunct...@hotmail.com wrote: dmd is pretty lax about attributes which don't apply. It generally just ignores them. Personally, I think that it should error on invalid attributes, but for some reason, that's not how it works. Of course, there could be

Re: [OT] Round 2: Webpage design and Name That Color!

2011-02-22 Thread spir
On 02/22/2011 03:22 AM, Nick Sabalausky wrote: Nick Sabalauskya@a.a wrote in message news:ijpvpl$2l8u$1...@digitalmars.com... I've been updating the docs for my Goldie project in preparation of a new release, and figured the they looked a bit...sterile, so I've tweaked the CSS a bit. And,

Re: D3 plans

2011-02-22 Thread Andrei Alexandrescu
On 2/22/11 9:00 AM, phobophile wrote: A legitimate question - where are the D3 plans? Any language not in active development (no don't mean phobos, not toolchain) is dead. D2 has little potential without AST macros. I want to participate in D3 development. Maybe bearophile could lead the

Re: D3 plans

2011-02-22 Thread Trass3r
A legitimate question - where are the D3 plans? One step at a time. We just got x64 support on Linux, Windows is still far away from that. Shared libraries is the next big issue. Proper implementation of D2's features is also still ahead. Any language not in active development (no don't mean

Re: [OT] Round 2: Webpage design and Name That Color!

2011-02-22 Thread Andrej Mitrovic
IIRC there was a website where you could get two nicely matching colors for background+foreground by selecting just one color first. I've no idea where exactly I saw that though.

Re: D3 plans

2011-02-22 Thread Andrej Mitrovic
No need to feed the troll. :)

Re: D3 plans

2011-02-22 Thread Adam Ruppe
I say we can put out D3 about the time Linux puts out kernel 2.8.

Re: We need to rethink remove in std.container

2011-02-22 Thread spir
On 02/22/2011 03:13 PM, Steven Schveighoffer wrote: I wonder if there is a way we could generalize give me the implementation-specific representation of the first item *reference* If this means a generalisation of what D's builtin 'in' provides, then I think this would be great. Then, passing

Re: CMake for D2 ready for testers

2011-02-22 Thread Gour
On Tue, 22 Feb 2011 15:33:48 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: I mainly push it as far as I need it because writing CMake code is no fun for me (and I do it in my free time). Thank you. Further I have the impression that nobody really cares. I mean there _many_ viable ways to

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Gour wrote: On Tue, 22 Feb 2011 15:33:48 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: Further I have the impression that nobody really cares. I mean there _many_ viable ways to have better configuration/build support for D. Don't be discouraged...think about the future - having good

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
Jens Mueller wrote: Gour wrote: On Tue, 22 Feb 2011 15:33:48 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: Further I have the impression that nobody really cares. I mean there _many_ viable ways to have better configuration/build support for D. Don't be discouraged...think

Re: Ranges and Algorithms -- Templates, Delegates, or Ranges?

2011-02-22 Thread %u
Indeed. The solution to OP's problem is std.algorithm.map. Local instantiation should take care of aliases that refer to local symbols, so OP's original complaint about std.algorithm.map is invalid (albeit for a subtle reason). The following code compiles as expected: import std.algorithm,

Re: Uh... destructors?

2011-02-22 Thread %u
Well, the trouble is, pretty much all of these are invalid attributes: - static obviously makes no sense And here is where you're wrong. You have defined a static destructor, which is called with module destructor as the program goes out of scope, rather than when your struct or class is

Re: We need to rethink remove in std.container

2011-02-22 Thread Jonathan M Davis
On Tuesday, February 22, 2011 05:01:24 Andrei Alexandrescu wrote: On 2/21/11 8:55 PM, Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary range

Re: Uh... destructors?

2011-02-22 Thread Michel Fortin
On 2011-02-22 13:15:03 -0500, %u wfunct...@hotmail.com said: So okay, fine... 2 out of about 8. That still doesn't mean the rest of them should be allowed, though... think about how confusing code with a pure destructor would be. What's the problem with a pure destructor? It only means you

Re: CMake for D2 ready for testers

2011-02-22 Thread David Nadlinger
On 2/22/11 6:10 PM, Jens Mueller wrote: I also wanted to test it on Mac OS X but unfortunately I do not have access to a Mac. I don't have lots of time for experiments at the moment, but I'd be glad to help you out if you just need someone to run an existing set of tests on OS X or

Re: We need to rethink remove in std.container

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 08:58:04 -0500, Steven Schveighoffer schvei...@yahoo.com wrote: So essentially, your code would look like this in dcollections: auto arr = new ArrayList!int(1,2,3,4,5); auto cursor = arr.find(3); int[] before = arr[0..cursor]; int value = arr[cursor]; Actually, I

How to do Generic Programming in D?

2011-02-22 Thread Nick
Coming from Andrei's work in C++ Modern C++ Programming I wonder how to implement many of those patterns in D? In C++ I would work with type lists and use lots of multiple inheritance and templates to get the magic I need. D lacks MI, classes and delegates seem heavy (allocated on heap, with

Re: Linking COFF and OMF

2011-02-22 Thread Rainer Schuetze
%u wrote: What does _xi_a even do? Is it anything more than just a marker inside the executable? have you seen this page: http://wiki.osdev.org/C_PlusPlus#Visual_C.2B.2B ? I think dmc is pretty much in line with it. You can also find these sections in the map files generated when compiling

Re: Linking COFF and OMF

2011-02-22 Thread %u
What does _xi_a even do? Is it anything more than just a marker inside the executable? have you seen this page: http://wiki.osdev.org/C_PlusPlus#Visual_C.2B.2B ? I think dmc is pretty much in line with it. You can also find these sections in the map files generated when compiling a D file

Re: Uh... destructors?

2011-02-22 Thread %u
What's the problem with a pure destructor? It only means you can't access global variables. If the object holds a pointer to somewhere, you can still affect that somewhere. In fact, if your struct's destructor isn't pure, how can you use it as local variable inside of a pure function? The

Re: Uh... destructors?

2011-02-22 Thread %u
I just visited Wikipedia (savior of the day) and a quick look at this article: http://en.wikipedia.org/wiki/Pure_function yields the following requirements for a pure function: 1. The function always evaluates the same result value given the same argument value(s). The function result value

Re: Uh... destructors?

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 14:31:30 -0500, %u wfunct...@hotmail.com wrote: I just visited Wikipedia (savior of the day) and a quick look at this article: http://en.wikipedia.org/wiki/Pure_function yields the following requirements for a pure function: 1. The function always evaluates the same result

Re: How to do Generic Programming in D?

2011-02-22 Thread Nick Sabalausky
Nick n...@example.com wrote in message news:ik11ot$2fms$1...@digitalmars.com... Coming from Andrei's work in C++ Modern C++ Programming I wonder how to implement many of those patterns in D? In C++ I would work with type lists and use lots of multiple inheritance and templates to get the

Re: CMake for D2 ready for testers

2011-02-22 Thread Gour
On Tue, 22 Feb 2011 18:10:11 +0100 Jens Mueller jens.k.muel...@gmx.de wrote: Yeah. My point is just that I don't know whether CMake will be the way to go. I mean it works but there are more elegant build tools in the pipeline. That's why I push it only as far as it needs to be. Well, other,

Re: Uh... destructors?

2011-02-22 Thread %u
D pure functions are significantly different than this definition (as of recent times, when weak-pure was added). Essentially, a pure function cannot access global variables. However, it can access variables referred to via a member of the object instance. i.e. this is a valid pure function:

Re: Uh... destructors?

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 15:48:42 -0500, %u wfunct...@hotmail.com wrote: D pure functions are significantly different than this definition (as of recent times, when weak-pure was added). Essentially, a pure function cannot access global variables. However, it can access variables referred to via

Re: CMake for D2 ready for testers

2011-02-22 Thread Jens Mueller
David Nadlinger wrote: On 2/22/11 6:10 PM, Jens Mueller wrote: I also wanted to test it on Mac OS X but unfortunately I do not have access to a Mac. I don't have lots of time for experiments at the moment, but I'd be glad to help you out if you just need someone to run an existing set of

Re: We need to rethink remove in std.container

2011-02-22 Thread Philippe Sigaud
On Tue, Feb 22, 2011 at 15:23, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: auto singletonRange(T)(T element) {    static struct Result    {        private T _element;        private bool _done;        @property bool empty() { return _done; }        @property auto front() {

Re: Uh... destructors?

2011-02-22 Thread Jonathan M Davis
On Tuesday, February 22, 2011 12:48:42 %u wrote: D pure functions are significantly different than this definition (as of recent times, when weak-pure was added). Essentially, a pure function cannot access global variables. However, it can access variables referred to via a member of

Re: Uh... destructors?

2011-02-22 Thread bearophile
Steven Schveighoffer: Freeing and allocating memory is fair game for pure functions. Allocating arrays and objects is possible in pure D functions, despite the memory pointers they contain (like the ptr of a returned array) are different across different calls. This makes those function only

Re: How to do Generic Programming in D?

2011-02-22 Thread bearophile
Nick: Coming from Andrei's work in C++ Modern C++ Programming I wonder how to implement many of those patterns in D? Those code patterns come from many years of C++ practice from lot of C++ programmers. D2 is not so old and so used, so probably some of the idioms of D2 are yet to be

Re: How to do Generic Programming in D?

2011-02-22 Thread Jason House
Nick Wrote: Coming from Andrei's work in C++ Modern C++ Programming I wonder how to implement many of those patterns in D? In C++ I would work with type lists and use lots of multiple inheritance and templates to get the magic I need. I don't have the book, but I'm sure that if you

Re: We need to rethink remove in std.container

2011-02-22 Thread Andrei Alexandrescu
On 2/22/11 3:23 PM, Philippe Sigaud wrote: On Tue, Feb 22, 2011 at 15:23, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: auto singletonRange(T)(T element) { static struct Result { private T _element; private bool _done; @property bool empty() { return

Re: We need to rethink remove in std.container

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 16:55:29 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 2/22/11 3:23 PM, Philippe Sigaud wrote: Btw, is there a way to have an empty container and use an output range to fill it? I didn't look at std.container for quite some time. No, but this may be

Re: How to do Generic Programming in D?

2011-02-22 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message news:ik14sh$2lfi$1...@digitalmars.com... Nick n...@example.com wrote in message news:ik11ot$2fms$1...@digitalmars.com... Coming from Andrei's work in C++ Modern C++ Programming I wonder how to implement many of those patterns in D? In C++ I would

Re: Uh... destructors?

2011-02-22 Thread Steven Schveighoffer
On Tue, 22 Feb 2011 16:34:21 -0500, bearophile bearophileh...@lycos.com wrote: Steven Schveighoffer: Freeing and allocating memory is fair game for pure functions. Allocating arrays and objects is possible in pure D functions, despite the memory pointers they contain (like the ptr of a

Re: How to do Generic Programming in D?

2011-02-22 Thread Andrei Alexandrescu
On 2/22/11 1:04 PM, Nick wrote: Coming from Andrei's work in C++ Modern C++ Programming I wonder how to implement many of those patterns in D? In C++ I would work with type lists and use lots of multiple inheritance and templates to get the magic I need. D lacks MI, classes and delegates seem

dmd, x64 and Windows

2011-02-22 Thread Trass3r
While I'm delighted that we finally have a basic D2 x64 compiler I can't stop wondering how long it will take till I finally get my hands on it on Windows. God knows I'd have switched to gdc long ago if gcc wasn't such a PITA to compile on Windows! Several attempts over the past year failed.

Re: Uh... destructors?

2011-02-22 Thread bearophile
Steven Schveighoffer: I would think malloc and friends should be pure, as well as free. They can easily simply be marked pure, since they are C bindings. D even accepts strongly pure functions like: pure size_t foo() { auto a = new ubyte[1]; return cast(size_t)a.ptr; } For

Re: dmd, x64 and Windows

2011-02-22 Thread Trass3r
antiquated object format, linker and C runtime (that have caused enough despair and rage since the beginning of time.. er, D) Just count the occurrences of OPTLINK preceding the post Bye, D!: http://h3.gd/devlog/

Re: Uh... destructors?

2011-02-22 Thread bearophile
This is an idea to patch that hole a little, doing this inside pure functions: 1) Keep disallowing alloca()/malloc()/etc calls; 2) Disallow struct allocations; 3) Keep allowing object and dynamic array allocations; 4) Disallow read and write of the ptr fields of dynamic arrays; 5) Disallow

Re: How to do Generic Programming in D?

2011-02-22 Thread Adam D. Ruppe
Nick wrote: Of course, the basic question being: is D2 sufficient to support everything that is possible in C++? So far, everything I've tried has not only been possible, but quite a bit easier. Last weekend, I had to go back to C++ to do some quick work. I wanted to port a boxer function

Re: dmd, x64 and Windows

2011-02-22 Thread Andrej Mitrovic
I've been trying to compile GDC the last couple of days. I've ran into some issues, but I've put them in GDC tickets and it seems from the last comments that Iain Buclaw has managed to create a cross-compiler setup and working. This is all last-minute info so I don't know if we'll have GDC working

LDC2 Status

2011-02-22 Thread dsimcha
I tried LDC2 for Linux out last week and again last night. I didn't spend much time on it on either attempt, but so far I haven't been able to get even Hello, World to compile. It seems like the instructions for building druntime, etc. are horribly outdated, the patches bit rotted, etc. Has

Re: Uh... destructors?

2011-02-22 Thread bearophile
A safer idea comes from using the type system, but it's hard. The idea is introducing pure memory references. I think I have just invented the idea of referentially transparent pointers/references for D, a subtype of normal D pointers/references. Bye, bearophile

Re: How to do Generic Programming in D?

2011-02-22 Thread bearophile
Adam D. Ruppe: C++0x felt like a crippled, inelegant D. Yes, it has variadic templates, but without foreach, I had to use recursion to go over them. Without static if and template constraints, it was a mess of overloaded functions and what felt like horrible abuses of SFINAE. Is this enough

Frustratingly D

2011-02-22 Thread Nicholas
For about 2 months I've been sinking into D. I really enjoy it and I want to love it but I'm constantly annoyed by the presentation of information. Several times I've built things that were in the standard library because the website is poorly organized and doesn't contain sufficient examples.

  1   2   >