Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-02 Thread H. S. Teoh
On Thu, Mar 01, 2012 at 08:24:31PM -0600, Robert Jacques wrote: > On Wed, 29 Feb 2012 18:13:30 -0600, Richard van Scheijen > wrote: > > >When logging the severity level should convey a certain insight > >that the developer has about the code. This can be done with a 3 > >bit field. These are: kn

GSoC 2012 - already applied?

2012-03-02 Thread Jens Mueller
Hi, has D(igitalMars) already applied for GSoC 2012 (http://www.google-melange.com/gsoc/homepage/google/gsoc2012)? Deadline ends at 9th of March. I see there is already an ideas page at http://prowiki.org/wiki4d/wiki.cgi?GSOC_2012_Ideas. Some ideas can be migrated from the old page http://prowiki.

Re: Poll of the week: main OS and compiler

2012-03-02 Thread Manu
On 2 March 2012 09:47, Marco Leise wrote: > Am 01.03.2012, 21:26 Uhr, schrieb Jacob Carlborg : > > > On 2012-03-01 15:40, Marco Leise wrote: >> >>> Since everyone loves polls, and the question comes up now and then: What >>> is your main development platform for D ? >>> >>> http://www.easypolls.

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-02 Thread Brad Roberts
On 2/13/2012 7:50 AM, David Nadlinger wrote: > There are several modules in the review queue right now, and to get things > going, I have volunteered to manage the > review of Jose's std.log proposal. Barring any objections, the review period > starts now and ends in three weeks, on > March 6th,

Re: Poll of the week: main OS and compiler

2012-03-02 Thread Brad Roberts
On 3/2/2012 12:25 AM, Manu wrote: > But we knew that already, because most of the D devs are linux guys, and D > does not present a good experience to Windows > users. I can personally point to numerous friends/colleagues who tried out D > and turned away within a few hours because > the Windows

Re: Tuples citizenship

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 11:41:16 Dmitry Olshansky wrote: > On 02.03.2012 6:06, bearophile wrote: > > Jonathan M Davis: > >> Yes, but chaining functions is the issue. It doesn't work well with > >> tuples > >> unless the function you're passing the result to wants the tuple. If all > >> it > >> wa

Re: Poll of the week: main OS and compiler

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 01:09:37 Brad Roberts wrote: > On 3/2/2012 12:25 AM, Manu wrote: > > But we knew that already, because most of the D devs are linux guys, and D > > does not present a good experience to Windows users. I can personally > > point to numerous friends/colleagues who tried out

Re: dereferencing null

2012-03-02 Thread Peter Alexander
On Friday, 2 March 2012 at 04:53:02 UTC, Jonathan M Davis wrote: On Friday, March 02, 2012 05:37:46 Nathan M. Swan wrote: Am I correct that trying to use an Object null results in undefined behavior? Object o = null; o.opCmp(new Object); // segmentation fault on my OSX machine This

Re: Tuples citizenship

2012-03-02 Thread deadalnix
Le 02/03/2012 00:09, Jonathan M Davis a écrit : When you're looking to mutate existing variables in the caller, using out parameters results in cleaner code. I'd argue that not mutating parameter result in cleaner code most of the time. Tuples are inherently messier, because you have to de

Re: Tuples citizenship

2012-03-02 Thread kennytm
Jonathan M Davis wrote: > That's assuming that you're passing all of the pieces of the tuple to the > function. Often, that's not the case at all. Take the findSplit trio, for > instance. What are the odds that you're going to want to pass all of the > elements in the tuples that any of the re

Re: Tuples citizenship

2012-03-02 Thread deadalnix
Le 02/03/2012 03:06, bearophile a écrit : Jonathan M Davis: Yes, but chaining functions is the issue. It doesn't work well with tuples unless the function you're passing the result to wants the tuple. If all it wants is one piece of the tuple, then that doesn't work well at all. You're forced t

Re: Tuples citizenship

2012-03-02 Thread deadalnix
Le 02/03/2012 02:10, Jonathan M Davis a écrit : On Thursday, March 01, 2012 18:57:15 bearophile wrote: Jonathan M Davis: They also often do poorly when you need to use the functional programming, As you know functional languages use tuples all the time. Yes, but chaining functions is the is

Re: Tuples citizenship

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 09:31:14 kennytm wrote: > Jonathan M Davis wrote: > > That's assuming that you're passing all of the pieces of the tuple to the > > function. Often, that's not the case at all. Take the findSplit trio, for > > instance. What are the odds that you're going to want to pass

Re: Tuples citizenship

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 10:27:02 deadalnix wrote: > Le 02/03/2012 00:09, Jonathan M Davis a écrit : > > When you're looking to mutate existing variables in the caller, using out > > parameters results in cleaner code. > > I'd argue that not mutating parameter result in cleaner code most of the >

Re: Tuples citizenship

2012-03-02 Thread kennytm
Jonathan M Davis wrote: > On Friday, March 02, 2012 09:31:14 kennytm wrote: >> Jonathan M Davis wrote: >>> That's assuming that you're passing all of the pieces of the tuple to the >>> function. Often, that's not the case at all. Take the findSplit trio, for >>> instance. What are the odds that y

Re: dereferencing null

2012-03-02 Thread Daniel Murphy
"Peter Alexander" wrote in message news:vicaibqyaerogseqs...@forum.dlang.org... >> >> It's defined. The operating system protects you. You get a segfault on >> *nix and >> an access violation on Windows. > > False. > > [snip] > > You only get an error if there is a memory access involved (vtable

Re: Tuples citizenship

2012-03-02 Thread Don
On 01.03.2012 23:08, bearophile wrote: I think std.typecons.Tuples merit to be a little more citizens in D and Phobos. I think reducing the usage of "out" argument, and replacing them with a tuple result, will avoid mistakes and make the code look better. In std.math there are functions that ma

Re: Tuples citizenship

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 09:53:19 kennytm wrote: > You can just chain with > > return doSomething(findSplit(haystack, needle)[0]); > > if you just need the return value. Compare with 'out': > > R4 ignored; > R5 ignored2; > return doSomething(findSplit(haystack, needle, ignored,

Re: Poll of the week: main OS and compiler

2012-03-02 Thread Jacob Carlborg
On 2012-03-02 08:47, Marco Leise wrote: Am 01.03.2012, 21:26 Uhr, schrieb Jacob Carlborg : On 2012-03-01 15:40, Marco Leise wrote: Since everyone loves polls, and the question comes up now and then: What is your main development platform for D ? http://www.easypolls.net/poll.html?p=4f4f7d25c2

Re: Ideas from Clang

2012-03-02 Thread Don
On 19.02.2012 21:19, bearophile wrote: A belated comment on the GoingNative 2012 talk "Defending C++ fom Murphy's Million Monkeys" by Chandler Carruth: http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Clang-Defending-C-from-Murphy-s-Million-Monkeys The slides: http://ecn.channel9.ms

Re: Poll of the week: main OS and compiler

2012-03-02 Thread Martin Nowak
On Thu, 01 Mar 2012 15:40:38 +0100, Marco Leise wrote: Since everyone loves polls, and the question comes up now and then: What is your main development platform for D ? http://www.easypolls.net/poll.html?p=4f4f7d25c2e1b0e40b0ac494 Where's Emacs?

Re: dereferencing null

2012-03-02 Thread Jacob Carlborg
On 2012-03-02 10:22, Peter Alexander wrote: On Friday, 2 March 2012 at 04:53:02 UTC, Jonathan M Davis wrote: On Friday, March 02, 2012 05:37:46 Nathan M. Swan wrote: Am I correct that trying to use an Object null results in undefined behavior? Object o = null; o.opCmp(new Object); // segmentat

Re: dereferencing null

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 11:56:52 Jacob Carlborg wrote: > I never thought about that. It's the same in C++. I was quite surprised when I first ran into it. But as Daniel points out, the behavior is still defined, just less expected. If you actually use this (or any member variable, since that w

Re: Tuples citizenship

2012-03-02 Thread deadalnix
Le 02/03/2012 11:10, Jonathan M Davis a écrit : On Friday, March 02, 2012 09:53:19 kennytm wrote: You can just chain with return doSomething(findSplit(haystack, needle)[0]); if you just need the return value. Compare with 'out': R4 ignored; R5 ignored2; return doSomething(

Re: Poll of the week: main OS and compiler

2012-03-02 Thread Manu
On 2 March 2012 11:09, Brad Roberts wrote: > On 3/2/2012 12:25 AM, Manu wrote: > > But we knew that already, because most of the D devs are linux guys, and > D does not present a good experience to Windows > > users. I can personally point to numerous friends/colleagues who tried > out D and turn

Re: Conclusions of the exception discussion

2012-03-02 Thread Don
On 25.02.2012 06:53, Jonathan M Davis wrote: Okay, the "The Right Approach to Exceptions" thread is a huge, confusing mess at this point without a clear, definitive conclusion, and we need one. So, I'm posting here, in a new thread, what appears to me to be the conclusion that that thread comes t

Re: dereferencing null

2012-03-02 Thread Timon Gehr
On 03/02/2012 10:22 AM, Peter Alexander wrote: You only get an error if there is a memory access involved (vtable, member data etc.) In non-release mode you get an assertion failure.

Re: dereferencing null

2012-03-02 Thread David Nadlinger
On Friday, 2 March 2012 at 09:22:28 UTC, Peter Alexander wrote: You only get an error if there is a memory access involved (vtable, member data etc.) By the way, my favorite application of that in C++ is debug helper member functions (think: using DMD's toChar() in GDB), which don't crash whe

Julia: a language for technical computing

2012-03-02 Thread renoX
Hello, the thread about tuples reminded about Julia because it supports tuples natively and its syntax for (de)constructing tuples is simple: http://julialang.org/manual/functions/ It's a very different language from D, being dynamically typed (but with optionnal static typing and multiple d

Re: CORBA in D

2012-03-02 Thread Martin Nowak
On Fri, 02 Mar 2012 01:43:17 +0100, Geoffrey Biggs wrote: Morning all, In a project just starting, we want to use D (for its safety, amongst other things). However, we also need to connect to distributed objects that have CORBA interfaces. I did a search, and the most recent mention of

Re: dereferencing null

2012-03-02 Thread Jacob Carlborg
On 2012-03-02 12:05, Jonathan M Davis wrote: On Friday, March 02, 2012 11:56:52 Jacob Carlborg wrote: I never thought about that. It's the same in C++. I was quite surprised when I first ran into it. But as Daniel points out, the behavior is still defined, just less expected. If you actually u

Re: Tuples citizenship

2012-03-02 Thread kennytm
Jonathan M Davis wrote: > On Friday, March 02, 2012 09:53:19 kennytm wrote: >> You can just chain with >> >> return doSomething(findSplit(haystack, needle)[0]); >> >> if you just need the return value. Compare with 'out': >> >> R4 ignored; >> R5 ignored2; >> return doSomething(f

Re: dereferencing null

2012-03-02 Thread deadalnix
Le 02/03/2012 05:51, Jonathan M Davis a écrit : On Friday, March 02, 2012 05:37:46 Nathan M. Swan wrote: Am I correct that trying to use an Object null results in undefined behavior? Object o = null; o.opCmp(new Object); // segmentation fault on my OSX machine This seems a bit non-

Re: dereferencing null

2012-03-02 Thread deadalnix
Le 02/03/2012 11:56, Jacob Carlborg a écrit : False. --- import std.stdio; class Foo { final void bar() { writeln("I'm null!"); } } void main() { Foo foo; foo.bar(); } --- % dmd test.d -O -release -inline % ./test I'm null! % ---

Re: dereferencing null

2012-03-02 Thread Marco Leise
Am 02.03.2012, 05:37 Uhr, schrieb Nathan M. Swan : I spent a long time trying to find a bug that crashed the program before writeln-debugging statements could be flushed. Instead of writeln use stdout.writeln.

Re: Tuples citizenship

2012-03-02 Thread renoX
On Friday, 2 March 2012 at 10:13:17 UTC, Jonathan M Davis wrote: If the function uses out, then you can chain the return value without losing the values which were assigned to the out arguments, but if you have a tuple, and you select one of the elements in the tuple to chain, you lose the othe

My Issues with Slices and AAs

2012-03-02 Thread Kevin Cox
After learning and using D for a little while I have discovered some (in my opinion) problems with the slices and associative array built-ins (for now I will just say slice). The main issue I have is that there is no way to pass around something that looks like and acts like a slice. This is beca

Re: dereferencing null

2012-03-02 Thread Marco Leise
Am 02.03.2012, 14:01 Uhr, schrieb deadalnix : Le 02/03/2012 11:56, Jacob Carlborg a écrit : You only get an error if there is a memory access involved (vtable, member data etc.) I never thought about that. This is a common C++ interview question. Don't scare him! I only had interviews

Re: GSoC 2012 - already applied?

2012-03-02 Thread bioinfornatics
Le vendredi 02 mars 2012 à 09:24 +0100, Jens Mueller a écrit : > Hi, > > has D(igitalMars) already applied for GSoC 2012 > (http://www.google-melange.com/gsoc/homepage/google/gsoc2012)? > Deadline ends at 9th of March. > I see there is already an ideas page at > http://prowiki.org/wiki4d/wiki.cgi?

Re: My Issues with Slices and AAs

2012-03-02 Thread Jesse Phillips
On Friday, 2 March 2012 at 13:33:17 UTC, Kevin Cox wrote: After learning and using D for a little while I have discovered some (in my opinion) problems with the slices and associative array built-ins (for now I will just say slice). The main issue I have is that there is no way to pass around

Re: dereferencing null

2012-03-02 Thread deadalnix
Le 02/03/2012 14:30, Marco Leise a écrit : Am 02.03.2012, 14:01 Uhr, schrieb deadalnix : Le 02/03/2012 11:56, Jacob Carlborg a écrit : You only get an error if there is a memory access involved (vtable, member data etc.) I never thought about that. This is a common C++ interview questio

GC-safe memory copying for D

2012-03-02 Thread Denis Shelomovskij
Even `memcpy` is claimed dangerous at http://dlang.org/garbage.html (because of possibility of moving GC, I suppose) but it just creates false positives for GC. `memmove` can even temporary destroy pointers in some overlapping cases like Google answer on "Lucky" `memmove source code` request do

Re: dereferencing null

2012-03-02 Thread Jacob Carlborg
On 2012-03-02 14:00, deadalnix wrote: Le 02/03/2012 05:51, Jonathan M Davis a écrit : On Friday, March 02, 2012 05:37:46 Nathan M. Swan wrote: Am I correct that trying to use an Object null results in undefined behavior? Object o = null; o.opCmp(new Object); // segmentation fault on my OSX mac

Re: My Issues with Slices and AAs

2012-03-02 Thread Ali Çehreli
On 03/02/2012 06:03 AM, Jesse Phillips wrote: > On Friday, 2 March 2012 at 13:33:17 UTC, Kevin Cox wrote: >> After learning and using D for a little while I have discovered some >> (in my >> opinion) problems with the slices and associative array built-ins (for >> now >> I will just say slice). Th

D Wiki - Why is it in such shambles?

2012-03-02 Thread Robert Rouse
I'm relatively new to D, so I'm looking at everything I can. The D wiki linked from the D site has so much outdated information and entries that are more talk pages than actual entries (e.g. http://prowiki.org/wiki4d/wiki.cgi?ComingFrom/Ruby ) If that wiki is not the best place to go for infor

Re: dereferencing null

2012-03-02 Thread deadalnix
Le 02/03/2012 15:37, Jacob Carlborg a écrit : On 2012-03-02 14:00, deadalnix wrote: Le 02/03/2012 05:51, Jonathan M Davis a écrit : On Friday, March 02, 2012 05:37:46 Nathan M. Swan wrote: Am I correct that trying to use an Object null results in undefined behavior? Object o = null; o.opCmp(n

Re: My Issues with Slices and AAs

2012-03-02 Thread Andrei Alexandrescu
On 3/2/12 7:33 AM, Kevin Cox wrote: [snip] In, conclusion. (Tl:Dr) slices and AAs do not allow polymorphism and therefore are decreasing the power and flexibility of D. Slices are primitive, concrete components that are close to the metal and are best for implementing abstractions, not definin

Re: GC-safe memory copying for D

2012-03-02 Thread Alex Rønne Petersen
On 02-03-2012 16:25, Robert Jacques wrote: On Fri, 02 Mar 2012 08:13:00 -0600, Denis Shelomovskij wrote: Even `memcpy` is claimed dangerous at http://dlang.org/garbage.html (because of possibility of moving GC, I suppose) but it just creates false positives for GC. `memmove` can even temporary

Re: GC-safe memory copying for D

2012-03-02 Thread Robert Jacques
On Fri, 02 Mar 2012 08:13:00 -0600, Denis Shelomovskij wrote: Even `memcpy` is claimed dangerous at http://dlang.org/garbage.html (because of possibility of moving GC, I suppose) but it just creates false positives for GC. `memmove` can even temporary destroy pointers in some overlapping

Terribly slow rawWrite is a major problem

2012-03-02 Thread Denis Shelomovskij
Do you remember this: http://d.puremagic.com/issues/show_bug.cgi?id=7033 It should be solved and I'm volunteer to do it. But I need to know: 1. `_setmode` is only defined in version(DIGITAL_MARS_STDIO) which is defined in version(DigitalMars)version(Windows) but used in version(Windows) in raw

Re: GC-safe memory copying for D

2012-03-02 Thread Denis Shelomovskij
02.03.2012 19:29, Alex Rønne Petersen пишет: On 02-03-2012 16:25, Robert Jacques wrote: On Fri, 02 Mar 2012 08:13:00 -0600, Denis Shelomovskij wrote: Even `memcpy` is claimed dangerous at http://dlang.org/garbage.html (because of possibility of moving GC, I suppose) but it just creates false

Re: My Issues with Slices and AAs

2012-03-02 Thread Kevin Cox
On Mar 2, 2012 10:30 AM, "Andrei Alexandrescu" < seewebsiteforem...@erdani.org> wrote > > Slices are primitive, concrete components that are close to the metal and are best for implementing abstractions, not defining them. You can always build and use abstract interfaces (that may or may not use sl

Re: My Issues with Slices and AAs

2012-03-02 Thread Andrei Alexandrescu
On 3/2/12 10:24 AM, Kevin Cox wrote: Although if slices are still built-in but act as if they are part of an interface will that slow them down? And, if so where is the slowdown? Is it in the interfaces? Yes, a traditional interface (in the sense I gather you use it) uses indirection by defin

Re: D Wiki - Why is it in such shambles?

2012-03-02 Thread Nick Sabalausky
"Robert Rouse" wrote in message news:arfpdcbasynmuzzsf...@forum.dlang.org... > I'm relatively new to D, so I'm looking at everything I can. The D wiki > linked from the D site has so much outdated information and entries that > are more talk pages than actual entries (e.g. > http://prowiki.org

Re: dereferencing null

2012-03-02 Thread Nick Sabalausky
"Peter Alexander" wrote in message news:vicaibqyaerogseqs...@forum.dlang.org... > On Friday, 2 March 2012 at 04:53:02 UTC, Jonathan M Davis wrote: >> >> It's defined. The operating system protects you. You get a segfault on >> *nix and >> an access violation on Windows. > > False. > > --

dmd2059 ?!

2012-03-02 Thread Stephan
is it just me or is it irritating that http://dlang.org/changelog.html has a unreleased empty dmd2059 release on top ?!

Re: dmd2059 ?!

2012-03-02 Thread Brad Anderson
On Fri, Mar 2, 2012 at 10:17 AM, Stephan wrote: > is it just me or is it irritating that > http://dlang.org/changelog.**htmlhas a > unreleased empty dmd2059 release on top ?! > I'm not that bothered by it but I think it'd be better if that weren't the case. Th

Re: D Wiki - Why is it in such shambles?

2012-03-02 Thread Andrej Mitrovic
Well the quality and freshness of the wiki content really depends on volunteer effort. I suspect it's going to be kept more up-to-date as more contributors start coming in. I hope we get an even better wiki some day, e.g. something with better spam protection and nicer formatting and looks. We sho

Re: Poll of the week: main OS and compiler

2012-03-02 Thread H. S. Teoh
On Fri, Mar 02, 2012 at 11:37:26AM +0100, Martin Nowak wrote: > On Thu, 01 Mar 2012 15:40:38 +0100, Marco Leise wrote: > > >Since everyone loves polls, and the question comes up now and > >then: What is your main development platform for D ? > > > >http://www.easypolls.net/poll.html?p=4f4f7d25c2e

Re: dereferencing null

2012-03-02 Thread Martin Nowak
Technically speaking, there is no dereference of null occurring there. It *looks* like there is because of the "foo.bar" notation, but remember, calling a member function is not really dereferencing. It's just sugar for: foo.vtable[index_of_bar](foo); But usually there's an class invariant.

Re: GSoC 2012 - already applied?

2012-03-02 Thread Andrei Alexandrescu
On 3/2/12 2:24 AM, Jens Mueller wrote: Hi, has D(igitalMars) already applied for GSoC 2012 (http://www.google-melange.com/gsoc/homepage/google/gsoc2012)? Deadline ends at 9th of March. I see there is already an ideas page at http://prowiki.org/wiki4d/wiki.cgi?GSOC_2012_Ideas. Some ideas can be m

Mac Installer - Can't find druntime/import and phobos/src after install

2012-03-02 Thread bryan costanich
Hi all! I'm running MacOSX and i ran the mac DMD installer. However, it doesn't look like the /druntime/import and /phobos/src directories got installed anywhere. these are needed for the mono-d monodevlop add-in to work for D programming. couple questions: 1) am i just missing it, and they

Re: Tuples citizenship

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 12:59:43 kennytm wrote: > Jonathan M Davis wrote: > > On Friday, March 02, 2012 09:53:19 kennytm wrote: > >> You can just chain with > >> > >> return doSomething(findSplit(haystack, needle)[0]); > >> > >> if you just need the return value. Compare with 'out': > >> R4 ig

Re: Mac Installer - Can't find druntime/import and phobos/src after install

2012-03-02 Thread Robert Rouse
On Friday, 2 March 2012 at 18:08:03 UTC, bryan costanich wrote: Hi all! I'm running MacOSX and i ran the mac DMD installer. However, it doesn't look like the /druntime/import and /phobos/src directories got installed anywhere. these are needed for the mono-d monodevlop add-in to work for D pr

Re: Tuples citizenship

2012-03-02 Thread kennytm
"Jonathan M Davis" wrote: > It's not like using out is fantastic and tuple sucks. They both have pros and > cons. My point is that it's not the case that always returning tuples is > better, which seems to be the point that Bearophile is trying to push. There > _are_ downsides to returning tup

Re: D Wiki - Why is it in such shambles?

2012-03-02 Thread Vadim Goryunov
Should not at least library reference be automatically generated from code basing on D doc (similar to Javadoc)?

Re: Mac Installer - Can't find druntime/import and phobos/src after install

2012-03-02 Thread Jacob Carlborg
On Friday, 2 March 2012 at 18:08:03 UTC, bryan costanich wrote: Hi all! I'm running MacOSX and i ran the mac DMD installer. However, it doesn't look like the /druntime/import and /phobos/src directories got installed anywhere. these are needed for the mono-d monodevlop add-in to work for D pr

Re: D Wiki - Why is it in such shambles?

2012-03-02 Thread H. S. Teoh
On Fri, Mar 02, 2012 at 08:54:26PM +0100, Vadim Goryunov wrote: > Should not at least library reference be automatically generated > from code basing on D doc (similar to Javadoc)? AFAIK, the library docs on dlang.org are generated from ddocs in the source. T -- All problems are easy in retros

Re: Tuples citizenship

2012-03-02 Thread Andrej Mitrovic
Has anyone seen my recent thread about using the if+auto feature and opCast(bool)? It's not related to tuples but I thought it was a cool D feature. I admit I named the thread a pretty stupid name, but it was 6 AM when I posted it :) (http://forum.dlang.org/thread/mailman.195.1330399006.24984.digit

Re: Mac Installer - Can't find druntime/import and phobos/src after install

2012-03-02 Thread bryan costanich
Jacob: the compiler is installed in usr/local/bin. but that doesn't matter, that's not what i need to locate. :) Robert: no, i don't have homebrew. nor should users be expected to have it. the mac installer should install those support files. - this is what it comes down to, installing this

Re: D Wiki - Why is it in such shambles?

2012-03-02 Thread F i L
If that wiki is not the best place to go for information (besides the newsgroup), what is? I found the IRC to be a great help at times. #d on freenode

Extending UFCS to templates

2012-03-02 Thread Andrej Mitrovic
I thought I'd be cool if we could use UFCS for templates. For example instead of this: template isOneOf(X, T...) { static if (!T.length) enum bool isOneOf = false; else static if (is(Unqual!X == T[0])) enum bool isOneOf = true; else enum bool isOneOf = isOneOf!(

Re: Poll of the week: main OS and compiler

2012-03-02 Thread Bernard Helyer
On Friday, 2 March 2012 at 11:53:56 UTC, Manu wrote: Personally, I just want to be able to link like a normal windows developer. My code is C/C++, built with VC, and I want to link my D app against those libs using the VC linker, and debug with Visual Studio. This is the workflow I think the va

opBinary!"in" and opIndex for AA's (issue 5030)

2012-03-02 Thread H. S. Teoh
Hi All, I'm looking at issue 5030, and it seems that this is trivially fixable by defining opBinary!"in" and opIndex in struct AssociativeArray. Is there any reason why this isn't done (yet)? If not, I'll submit a pull request soon. :) T -- Once bitten, twice cry...

Re: dereferencing null

2012-03-02 Thread Peter Alexander
On Friday, 2 March 2012 at 10:01:32 UTC, Daniel Murphy wrote: "Peter Alexander" wrote in message news:vicaibqyaerogseqs...@forum.dlang.org... It's defined. The operating system protects you. You get a segfault on *nix and an access violation on Windows. False. [snip] You only get an err

Re: Mac Installer - Can't find druntime/import and phobos/src after install

2012-03-02 Thread bryan costanich
Jacob: the compiler is installed in usr/local/bin. but that doesn't matter, that's not what i need to locate. :) Robert: no, i don't have homebrew. nor should users be expected to have it. the mac installer should install those support files. - this is what it comes down to, installing this

Re: D Wiki - Why is it in such shambles?

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 12:00:39 Nick Sabalausky wrote: > "Robert Rouse" wrote in message > news:arfpdcbasynmuzzsf...@forum.dlang.org... > > > I'm relatively new to D, so I'm looking at everything I can. The D wiki > > linked from the D site has so much outdated information and entries that > >

Re: D Wiki - Why is it in such shambles?

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 12:41:55 H. S. Teoh wrote: > On Fri, Mar 02, 2012 at 08:54:26PM +0100, Vadim Goryunov wrote: > > Should not at least library reference be automatically generated > > from code basing on D doc (similar to Javadoc)? > > AFAIK, the library docs on dlang.org are generated fro

Re: Extending UFCS to templates

2012-03-02 Thread Kapps
On Friday, 2 March 2012 at 21:18:31 UTC, Andrej Mitrovic wrote: I thought I'd be cool if we could use UFCS for templates. For example instead of this: template isOneOf(X, T...) { static if (!T.length) enum bool isOneOf = false; else static if (is(Unqual!X == T[0])) enum

Re: dereferencing null

2012-03-02 Thread Jonathan M Davis
On Friday, March 02, 2012 16:19:13 deadalnix wrote: > Le 02/03/2012 15:37, Jacob Carlborg a écrit : > > On 2012-03-02 14:00, deadalnix wrote: > >> Le 02/03/2012 05:51, Jonathan M Davis a écrit : > >>> On Friday, March 02, 2012 05:37:46 Nathan M. Swan wrote: > Am I correct that trying to use an

Re: D Wiki - Why is it in such shambles?

2012-03-02 Thread Jesse Phillips
On Friday, 2 March 2012 at 14:49:54 UTC, Robert Rouse wrote: I'm relatively new to D, so I'm looking at everything I can. The D wiki linked from the D site has so much outdated information and entries that are more talk pages than actual entries (e.g. http://prowiki.org/wiki4d/wiki.cgi?ComingF

Re: GSoC 2012 - already applied?

2012-03-02 Thread Jonas Drewsen
On Friday, 2 March 2012 at 17:57:03 UTC, Andrei Alexandrescu wrote: ... I have completed the application. Please tune to http://dlang.org/gsoc2012.html for details. We are accepting mentor applications right now, please let me and Walter know if interested. I'll volunteer as mentor this yea

Re: dereferencing null

2012-03-02 Thread Walter Bright
On 3/1/2012 8:51 PM, Jonathan M Davis wrote: It's defined. The operating system protects you. Not exactly. It's a feature of the hardware. You get this for free, and your code runs at full speed. Adding in software checks for null pointers will dramatically slow things down.

Re: dereferencing null

2012-03-02 Thread Daniel Murphy
"Peter Alexander" wrote in message news:jxloisomieykanavm...@forum.dlang.org... > On Friday, 2 March 2012 at 10:01:32 UTC, Daniel Murphy wrote: >> "Peter Alexander" wrote in message >> news:vicaibqyaerogseqs...@forum.dlang.org... It's defined. The operating system protects you. You get

Re: My Issues with Slices and AAs

2012-03-02 Thread Kevin
On 03/02/2012 09:03 AM, Jesse Phillips wrote: D is not purely object oriented and must provide primitives the meet or exceed C. The style for D code also tends to templates and meta programming. Ranges[1] fit nicely to this and the idea of slicing. 1. http://dlang.org/phobos/std_range.html

Re: My Issues with Slices and AAs

2012-03-02 Thread Xinok
On Saturday, 3 March 2012 at 05:00:53 UTC, Kevin wrote: Is there something on ranges that is more of a write-up. Something to explain purpose, implementation, usage, ...? Or if not some code that makes good use of ranges? Thanks, Kevin http://ddili.org/ders/d.en/ranges.html

Whats up with the domains?

2012-03-02 Thread Kevin
I understand that this has been mentioned before but I think that it is important so I am going to bring it up again. I have been looking at the docs on dlang and d-programming-language.org and was wondering which is the "preferred" website. I have seen dlang.org on the fourms most of the time

Re: My Issues with Slices and AAs

2012-03-02 Thread Kevin Cox
On Sat, Mar 3, 2012 at 12:09 AM, Xinok wrote: > http://ddili.org/ders/d.en/**ranges.html > Thanks for the great link. And thanks everyone for your help. I can't believe I missed ranges as they are exactly what I wanted. Kevin

AssociativeArray.opIndex

2012-03-02 Thread H. S. Teoh
In attempting to fix issue 5030, I'm finding that defining AssociativeArray.opIndex gives an odd error when druntime is compiled: dmd: mtype.c:4411: StructDeclaration* TypeAArray::getImpl(): Assertion `impl' failed. This error only happens when opIndex is declared like this: Value opInd

Re: GSoC 2012 - already applied?

2012-03-02 Thread Andrei Alexandrescu
On 3/2/12 8:17 PM, Jonas Drewsen wrote: On Friday, 2 March 2012 at 17:57:03 UTC, Andrei Alexandrescu wrote: ... I have completed the application. Please tune to http://dlang.org/gsoc2012.html for details. We are accepting mentor applications right now, please let me and Walter know if intereste