Re: Anonymous function syntax

2011-09-21 Thread Max Klyga
Actually Scala doesn't need type declarations in labmda literals. Most of the time argument types are infered. It would be awesome if D infered argument types for labdas too. Also Java 8 adopted the same lambda syntax as Scala and C#. To add a few things to your list: Nemerle fun (x, y) { x

Re: __restrict, architecture intrinsics vs asm, consoles, and other

2011-09-21 Thread Don
On 22.09.2011 05:24, a wrote: How would one do something like this without intrinsics (the code is c++ using gcc vector extensions): [snip] At present, you can't do it without ultimately resorting to inline asm. But, what we've done is to move SIMD into the machine model: the D machine model

thoughts on immutability in D

2011-09-21 Thread Andrei Alexandrescu
The initial submission got junked so I resubmitted: http://www.reddit.com/r/programming/comments/knn5p/thoughts_on_immutability_in_d/ Andrei

Re: __restrict, architecture intrinsics vs asm, consoles, and other stuff

2011-09-21 Thread Benjamin Thaut
Am 22.09.2011 02:38, schrieb Walter Bright: nsightly vector classes in C++, but fortunately using vendor specific compiler intrinsics usually leads to decent code generation. I can currently imagine an equally ugly (possibly worse) hardware vector library in D, if it's even possible. But perhaps

Re: The Strange Loop conference

2011-09-21 Thread Don
On 21.09.2011 22:32, Sean Kelly wrote: On Sep 21, 2011, at 12:59 PM, Andrei Alexandrescu wrote: On 9/21/11 12:59 PM, bearophile wrote: Andrei Alexandrescu: which has enjoyed moderate audience and success. I uploaded the slides at http://erdani.com/d/generic-programming-galore.pdf and the vid

Re: __restrict, architecture intrinsics vs asm, consoles, and other stuff

2011-09-21 Thread Iain Buclaw
== Quote from Manu (turkey...@gmail.com)'s article > Hello D community. > I've been reading a lot about D lately. I have known it existed for > ages, but for some reason never even took a moment to look into it. > The more I looked into it, the more I realise, this is the language > I want. C(/C++)

Re: D User Group (DUG) in London - who would be interested in attending?

2011-09-21 Thread Iain Buclaw
== Quote from Moritz Warning (moritzwarn...@web.de)'s article > On Mon, 19 Sep 2011 11:21:04 +, Iain Buclaw wrote: > > Some of us Great British IRC users in #d have been discussing this for > > some time now, but now we'd like to see this organised and put into > > fruition. :) > > > What do yo

Re: __restrict, architecture intrinsics vs asm, consoles, and other

2011-09-21 Thread a
How would one do something like this without intrinsics (the code is c++ using gcc vector extensions): template struct Fft { typedef typename V::T T; typedef typename V::vec vec; static const int VecSize = V::Size; ... template static NOINLINE void fft_pass_interleaved( vec *

Re: Why do we have transitive const, again?

2011-09-21 Thread Jesse Phillips
On Wed, 21 Sep 2011 10:15:31 -0700, Mehrdad wrote: > I can't find the thread, but I remember someone (bearophile?) mentioned > that the reason we have transitive const is to support purity. > > I don't think I understand why this is necessary, though -- could > someone please explain why we have

Re: Anonymous function syntax

2011-09-21 Thread Jesse Phillips
On Wed, 21 Sep 2011 18:29:34 -0400, bearophile wrote: > Walter Bright: > >> D >> (a,b) { return a + b; } > > In D to define a true lambda you need types too: auto f = (int a,int b){ > return a + b; }; This is true of C# too and I think is appropriate to mention, though it can take the des

Re: __restrict, architecture intrinsics vs asm, consoles, and other stuff

2011-09-21 Thread Walter Bright
On 9/21/2011 3:55 PM, Manu wrote: Pointer aliasing... C implementations uses a non-standard __restrict keyword to state that a given pointer will not be aliased by any other pointer. This is critical in some pieces of code to eliminate redundant loads and stores, particularly important on RISC ar

Re: __restrict, architecture intrinsics vs asm, consoles, and other stuff

2011-09-21 Thread Trass3r
I haven't seen any non-x86 examples of the D assembler, and I think it's fair to say that x86 is the single most unnecessary architecture to write inline assembly that exists. Are there PowerPC or ARM examples anywhere? Well DMD only supports x86 including inline asm so that's the only thing

Re: D on hackernews

2011-09-21 Thread Timon Gehr
On 09/22/2011 01:17 AM, Marco Leise wrote: Am 21.09.2011, 16:24 Uhr, schrieb Andrei Alexandrescu : On 9/21/11 8:52 AM, Timon Gehr wrote: On 09/21/2011 09:37 AM, bearophile wrote: Andrei Alexandrescu: http://hackerne.ws/item?id=3014861 Apparently we're still having a PR issue. I think the

Re: The Strange Loop conference

2011-09-21 Thread bearophile
Andrei Alexandrescu: > Feel free to spare the patronizing part, it won't be missed. I am sorry. I have full respect for Walter's and yours work. Bye, bearophile

Re: D on hackernews

2011-09-21 Thread Marco Leise
Am 21.09.2011, 16:24 Uhr, schrieb Andrei Alexandrescu : On 9/21/11 8:52 AM, Timon Gehr wrote: On 09/21/2011 09:37 AM, bearophile wrote: Andrei Alexandrescu: http://hackerne.ws/item?id=3014861 Apparently we're still having a PR issue. I think the Wikipedia D page needs to be rewritten, l

Re: Anonymous function syntax

2011-09-21 Thread Timon Gehr
On 09/22/2011 12:47 AM, deadalnix wrote: Le 22/09/2011 00:29, bearophile a écrit : Walter Bright: D (a,b) { return a + b; } In D to define a true lambda you need types too: auto f = (int a,int b){ return a + b; }; If you leave types away, you in fact create a function template literal. In

Re: Good publicity for D on heise/developer

2011-09-21 Thread Nick Sabalausky
"Tobias Pankrath" wrote in message news:j5d0ku$1b62$1...@digitalmars.com... > > C++0xb Hah, I see what you did there!

__restrict, architecture intrinsics vs asm, consoles, and other stuff

2011-09-21 Thread Manu
Hello D community. I've been reading a lot about D lately. I have known it existed for ages, but for some reason never even took a moment to look into it. The more I looked into it, the more I realise, this is the language I want. C(/C++) has been ruined, far beyond salvation. D seems to be the re

Re: Anonymous function syntax

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 5:29 PM, bearophile wrote: Walter Bright: D (a,b) { return a + b; } In D to define a true lambda you need types too: auto f = (int a,int b){ return a + b; }; No. Andrei

Re: The Strange Loop conference

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 5:22 PM, bearophile wrote: This is why I have asked for functions like amap/afilter in Phobos, because in many situations in D you need an array instead of a lazy range. I don't think that was being asked. Of course, if every function that accepts a range becomes a template then yo

Re: C compatibility module for phobos.

2011-09-21 Thread Jonathan M Davis
On Wednesday, September 21, 2011 11:59 Gor F. Gyolchanyan wrote: > Thanks! I never new that module existed! It's not mentioned in dpl.org. Very little of druntime has any documentation - particularly the stuff which is just C bindings. We should probably go through there and put empty ddoc comme

Re: Anonymous function syntax

2011-09-21 Thread Adam Ruppe
deadalnix wrote: > This makes Javascript's and D's closures the most readable for > somebody having this background. Indeed! I find most the proposed lambdas to look like random noise. D has it good just how it is.

Re: Anonymous function syntax

2011-09-21 Thread deadalnix
Le 22/09/2011 00:29, bearophile a écrit : Walter Bright: D (a,b) { return a + b; } In D to define a true lambda you need types too: auto f = (int a,int b){ return a + b; }; For D I think I'd like a syntax like: { int a, int b => a + b } That in some cases becomes just: { a,b => a + b

Re: The Strange Loop conference

2011-09-21 Thread Peter Alexander
On 21/09/11 10:11 PM, Andrei Alexandrescu wrote: On 9/21/11 3:34 PM, Peter Alexander wrote: The problem it's simply intractable to do lazy computation in D while maintaining the 'correct' static typing. For example, in Haskell, map (correctly) has the signature: map :: (a -> b) -> [a] -> [b]

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Jonathan M Davis
On Wednesday, September 21, 2011 14:08 Christophe wrote: > Jonathan M Davis , dans le message (digitalmars.D:144944), a écrit : > >> I never said there was a problem with drop. > > > > Yes you did. You said: > > > > "mini-quiz: what should std.range.drop(some_string, 1) do ? > > hint: what it act

Re: Anonymous function syntax

2011-09-21 Thread bearophile
Walter Bright: > D > (a,b) { return a + b; } In D to define a true lambda you need types too: auto f = (int a,int b){ return a + b; }; For D I think I'd like a syntax like: { int a, int b => a + b } That in some cases becomes just: { a,b => a + b } > Haskell > \a b -> a + b In Haske

Re: The Strange Loop conference

2011-09-21 Thread bearophile
Peter Alexander: > auto newrange = filter!"a<5"(map!"2*a"(range)); > > At least I think that works?? It works: import std.stdio, std.range, std.algorithm; void main() { auto r = iota(20); auto n = filter!q{ a < 5 }(map!q{ 2 * a }(r)); writeln(n); } > The problem it's simply intra

Anonymous function syntax

2011-09-21 Thread Walter Bright
I've collected a few from various languages for comparison: D (a,b) { return a + b; } Ruby ->(a,b) { a + b } C++0x [](int a, int b) { return a + b; } C# (a,b) => a + b Scala (a:Int, b:Int) => a + b Erlang fun(a, b) -> a + b end. Haskell \a b -> a + b Javascript

Re: Paradox about D's popularity.

2011-09-21 Thread Adam Ruppe
SWIG kinda scares me... doesn't it generate wrappers instead of direct calls into the C++? That could easily double the size of the library. There's a bugzilla entry with a thing to allow calling into more of C++'s functions with extern(C++). I'd like to see that pulled into the tree if it passes

Re: The Strange Loop conference

2011-09-21 Thread Timon Gehr
On 09/21/2011 11:11 PM, Andrei Alexandrescu wrote: On 9/21/11 3:34 PM, Peter Alexander wrote: What if foo is a virtual member function? Those can't be templates. Then it would need to take a dynamic Range as parameter, parameterized with the element type. Would it be a good idea to allow th

Re: Paradox about D's popularity.

2011-09-21 Thread maarten van damme
about interfacing to d: There was some kind of tool out there that is never mentioned on one of the d websites called swig. If you can make it extremely easy and get the bugs out of the way (maybe even write a decent tutorial on it which I really need) linking to c++ would be a breeze. as for prom

Re: The Strange Loop conference

2011-09-21 Thread Timon Gehr
On 09/21/2011 10:20 PM, Andrei Alexandrescu wrote: On 9/21/11 2:29 PM, Timon Gehr wrote: On 09/21/2011 06:55 PM, Andrei Alexandrescu wrote: I'm back from the Strange Loop conference. It's been an interesting experience. The audience was very diverse, with interest in everything functional (you'

Re: Paradox about D's popularity.

2011-09-21 Thread Dmitry Olshansky
On 22.09.2011 1:14, Gor F. Gyolchanyan wrote: I had an idea of a D library for including C headers for a while now. All i need is to make a compile-time C parser for that. This thing would literally remove any need for binding. Translating header file is a one-time job, as in sh-$: translate f

Re: The Strange Loop conference

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 3:34 PM, Peter Alexander wrote: The problem it's simply intractable to do lazy computation in D while maintaining the 'correct' static typing. For example, in Haskell, map (correctly) has the signature: map :: (a -> b) -> [a] -> [b] but in D, std.map has the signature (expressed in

Re: Paradox about D's popularity.

2011-09-21 Thread Gor F. Gyolchanyan
I had an idea of a D library for including C headers for a while now. All i need is to make a compile-time C parser for that. This thing would literally remove any need for binding. Doing the same for C++ would be much much harder, though.

Re: Paradox about D's popularity.

2011-09-21 Thread Jesse Phillips
Gor F. Gyolchanyan Wrote: > I'll look up any kind of programming language related sites and try to put D > put > there. One problem we have is that there are many that have heard of D, but they either don't hear it enough to consider it any good or know of some problem that may have already be

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Christophe
Jonathan M Davis , dans le message (digitalmars.D:144944), a écrit : >> I never said there was a problem with drop. > > Yes you did. You said: > > "mini-quiz: what should std.range.drop(some_string, 1) do ? > hint: what it actually does is not what the documentation of phobos

Re: Paradox about D's popularity.

2011-09-21 Thread Gor F. Gyolchanyan
You're right. I gotta apologize for my over-reaction to D's problems. It's just, that i want it to thrive. Maybe i care too much and i make too bit a deal out of this. :-)

Re: Paradox about D's popularity.

2011-09-21 Thread bearophile
Andrei Alexandrescu: > Different people work on different things. Firing shoemakers won't > produce more bakers. Right. The life of Open Source projects is not linear :-) Regarding the DMD pull requests in GitHut that are currently open (and the future ones that people will add), in my ignoran

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 3:26 PM, Christophe Travert wrote: Andrei Alexandrescu , dans le message (digitalmars.D:144936), a écrit : On 9/21/11 1:20 PM, Christophe Travert wrote: Dealing with utfencoded strings is less efficient, but there is a number of algorithms that can be optimized for utfencoded strings

Re: The Strange Loop conference

2011-09-21 Thread Sean Kelly
On Sep 21, 2011, at 12:59 PM, Andrei Alexandrescu wrote: > On 9/21/11 12:59 PM, bearophile wrote: >> Andrei Alexandrescu: >> >>> which has enjoyed moderate audience and success. I uploaded the >>> slides at http://erdani.com/d/generic-programming-galore.pdf and >>> the video may be available soon

Re: The Strange Loop conference

2011-09-21 Thread Peter Alexander
On 21/09/11 8:29 PM, Timon Gehr wrote: Where D still loses when compared to Scala is functional code syntax: val newcol = collection filter {x=>x<5} map {x=>2*x} or maybe val newcol = for(x<-collection if(x<5)) yield 2*x vs auto newrange = filter!((x){return x<5;})(map!((x){return 2*x;})(ran

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Christophe Travert
Andrei Alexandrescu , dans le message (digitalmars.D:144936), a écrit : > On 9/21/11 1:20 PM, Christophe Travert wrote: >> Dealing with utfencoded strings is less efficient, but there is a number >> of algorithms that can be optimized for utfencoded strings, like copying >> or finding an ascii char

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Jonathan M Davis
On Wednesday, September 21, 2011 19:56:47 Christophe wrote: > "Jonathan M Davis" , dans le message (digitalmars.D:144922), a écrit : > > 1. drop says nothing about slicing. > > 2. popFrontN (which drop calls) says that it slices for ranges that > > support slicing. Strings do not unless they're arr

Re: The Strange Loop conference

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 2:29 PM, Timon Gehr wrote: On 09/21/2011 06:55 PM, Andrei Alexandrescu wrote: I'm back from the Strange Loop conference. It's been an interesting experience. The audience was very diverse, with interest in everything functional (you'd only need to say "Haskell" or "monad" to get posit

Re: Paradox about D's popularity.

2011-09-21 Thread Gor F. Gyolchanyan
I was thinking more about baking shoes :-) Seriously, though, we could start off by making a precise plan for future work. Then we'll be able to gain a better control of overall work on DMD and phobos and the shoemakers would make the required shoes. Unless I'm missing something and a similar org

Re: Paradox about D's popularity.

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 2:23 PM, Gor F. Gyolchanyan wrote: As much as I'd like D to develop sweet language features like named function parameters, directing effort to increase compatibility of D with other languages (most notably, C++) would be a better idea, because if D gets cheaper and cheaper to use with

Re: isInputRange bug?

2011-09-21 Thread Jonas Drewsen
On 21/09/11 21.52, Timon Gehr wrote: On 09/21/2011 09:42 PM, Jonas Drewsen wrote: isInputRange!(immutable(void)[]) => false isInputRange!(immutable(char)[]) => true shouldn't both of them return true? /Jonas immutable(void)[] is not a range because you cannot get it's front element. I see.

Re: Paradox about D's popularity.

2011-09-21 Thread Jonathan M Davis
On Wednesday, September 21, 2011 19:23:32 Gor F. Gyolchanyan wrote: > As much as I'd like D to develop sweet language features like named function > parameters, directing effort to increase compatibility of D with other > languages (most notably, C++) would be a better idea, because if D gets > che

Re: Go and generic programming on reddit, also touches on D

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 1:49 PM, Don wrote: On 19.09.2011 18:12, Andrei Alexandrescu wrote: On 9/19/11 10:46 AM, Robert Jacques wrote: So, on balance, I'd say the two pointers representation is categorically worse than the fat pointer representation. Benchmark. A few of your assumptions don't hold. Andre

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 1:20 PM, Christophe Travert wrote: Dealing with utfencoded strings is less efficient, but there is a number of algorithms that can be optimized for utfencoded strings, like copying or finding an ascii char in a string. Unfortunately, there is no practical way to do this with the curren

Re: The Strange Loop conference

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 12:59 PM, bearophile wrote: Andrei Alexandrescu: which has enjoyed moderate audience and success. I uploaded the slides at http://erdani.com/d/generic-programming-galore.pdf and the video may be available soon. In future talks I suggest to show some downsides too, like explaining h

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Christophe
"Jonathan M Davis" , dans le message (digitalmars.D:144922), a écrit : > 1. drop says nothing about slicing. > 2. popFrontN (which drop calls) says that it slices for ranges that support > slicing. Strings do not unless they're arrays of dchar. > > Yes, hasSlicing should probably be clearer about

Re: The Strange Loop conference

2011-09-21 Thread Timon Gehr
On 09/21/2011 09:44 PM, Andrej Mitrovic wrote: What is the purpose of this ternary operator on slide 16? static if (is(typeof(1 ? T[0].init : T[1].init) U)) This does the bulk of the work to get the combined type of T[0] and T[1]. It basically just asks the compiler what the combined type shou

Re: Paradox about D's popularity.

2011-09-21 Thread Don
On 21.09.2011 21:23, Gor F. Gyolchanyan wrote: As much as I'd like D to develop sweet language features like named function parameters, directing effort to increase compatibility of D with other languages (most notably, C++) would be a better idea, because if D gets cheaper and cheaper to use wi

Re: isInputRange bug?

2011-09-21 Thread Timon Gehr
On 09/21/2011 09:42 PM, Jonas Drewsen wrote: isInputRange!(immutable(void)[]) => false isInputRange!(immutable(char)[]) => true shouldn't both of them return true? /Jonas immutable(void)[] is not a range because you cannot get it's front element.

isInputRange bug?

2011-09-21 Thread Jonas Drewsen
isInputRange!(immutable(void)[]) => false isInputRange!(immutable(char)[]) => true shouldn't both of them return true? /Jonas

Re: C compatibility module for phobos.

2011-09-21 Thread Gor F. Gyolchanyan
For that, there are a number of GC-related bugs to be fixed. If GC gets fully stable and predictable, C-managed memory could be integrated in concert with GC (like, making the GC call C-AI's custom free function on collection cycle).

Re: The Strange Loop conference

2011-09-21 Thread Andrej Mitrovic
What is the purpose of this ternary operator on slide 16? static if (is(typeof(1 ? T[0].init : T[1].init) U))

Re: C compatibility module for phobos.

2011-09-21 Thread Andrej Mitrovic
On 9/21/11, Gor Gyolchanyan wrote: > If we get a good enough C compatibility module, we'll be able to rapidly > bind all major and frequently-used libraries and include them in phobos. Type compatibility might be just the tip of the iceberg for wrapping a C library. For example you might also hav

Re: The Strange Loop conference

2011-09-21 Thread Timon Gehr
On 09/21/2011 06:55 PM, Andrei Alexandrescu wrote: I'm back from the Strange Loop conference. It's been an interesting experience. The audience was very diverse, with interest in everything functional (you'd only need to say "Haskell" or "monad" to get positive aahs), Web/cloud/tablet stuff, conc

Re: Paradox about D's popularity.

2011-09-21 Thread Gor F. Gyolchanyan
As much as I'd like D to develop sweet language features like named function parameters, directing effort to increase compatibility of D with other languages (most notably, C++) would be a better idea, because if D gets cheaper and cheaper to use with existing code base, more and more people will

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Christophe
"Simen Kjaeraas" , dans le message (digitalmars.D:144921), a écrit : > What you are thinking about is a code point. Yes, sorry. Then I disagree with "as long as char is a unicode code unit, that's the way that it goes", since myString.front should then return a code unit, whereas it actually ret

Re: Paradox about D's popularity.

2011-09-21 Thread Gor F. Gyolchanyan
I'll look up any kind of programming language related sites and try to put D put there. Another big downside, that i noticed in development of D and DMD is unpredictability. I think we should make schedules for regular releases of batches of bug-fixes and feature enhancements of DMD, so that peop

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Jonathan M Davis
On Wednesday, September 21, 2011 11:20 Christophe Travert wrote: > Jonathan M Davis , dans le message (digitalmars.D:144896), a écrit : > > On Wednesday, September 21, 2011 15:16:33 Christophe wrote: > >> Timon Gehr , dans le message (digitalmars.D:144889), a écrit : > >> > unicode natively. Yet th

Re: C compatibility module for phobos.

2011-09-21 Thread Gor F. Gyolchanyan
I didn't know about core.stdc package because it doesn't show u on dpl.org. The difference is, that some compilers make long 64 bit for 64-bit systems, and some leave the long 32-bit no matter what.

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Simen Kjaeraas
On Wed, 21 Sep 2011 20:20:55 +0200, Christophe Travert wrote: Yeah, well, as long as char is a unicode code unit, that's the way that it goes. They are not unicode units. void main() { char a = 'ä'; writeln(a); // outputs: \344 writeln('ä'); // outputs: ä } Obviouly, a code unit

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Peter Alexander
On 21/09/11 5:39 PM, Andrei Alexandrescu wrote: On 9/21/11 10:16 AM, Christophe wrote: Timon Gehr , dans le message (digitalmars.D:144889), a écrit : unicode natively. Yet the 'D strings are strange and confusing' argument comes up quite often on the web. Well, I think they are. The ptr+lengt

Re: C compatibility module for phobos.

2011-09-21 Thread Gor F. Gyolchanyan
Thanks! I never new that module existed! It's not mentioned in dpl.org.

Re: C compatibility module for phobos.

2011-09-21 Thread Gor F. Gyolchanyan
Will do! :-) Right after i take a look at the existing core.stdc.config module, that i never knew about before :-)

Re: C compatibility module for phobos.

2011-09-21 Thread Jesse Phillips
Gor Gyolchanyan Wrote: > Hello, my dear, beloved D community. > > I've been reading literally all discussions on D.puremagic.com for about a > month now and I'm deeply concerned with my favorite language and it's > reference compiler. > > So, for starters, i decided to add a very useful (in my o

Re: Go and generic programming on reddit, also touches on D

2011-09-21 Thread Don
On 19.09.2011 18:12, Andrei Alexandrescu wrote: On 9/19/11 10:46 AM, Robert Jacques wrote: So, on balance, I'd say the two pointers representation is categorically worse than the fat pointer representation. Benchmark. A few of your assumptions don't hold. Andrei Note that high-performance l

Re: C compatibility module for phobos.

2011-09-21 Thread Alex Rønne Petersen
On 21-09-2011 10:01, Gor Gyolchanyan wrote: Hello, my dear, beloved D community. I've been reading literally all discussions on D.puremagic.com for about a month now and I'm deeply concerned with my favorite language and it's reference compiler. So, for starters, i deci

Re: Why did D leave the programming language shootout and will it return?

2011-09-21 Thread Peter Alexander
On 21/09/11 12:58 AM, Timon Gehr wrote: On 09/21/2011 01:37 AM, Walter Bright wrote: (In contrast, C++ must invoke the copy constructor.) C++11 rvalue references manage to make that effect somewhat less painful though. Less expensive computationally, yes, but the cost to the programmer is hu

Re: Aligning data in memory

2011-09-21 Thread Peter Alexander
I could be wrong, but I think so. As I understand, align(N) only aligns it *within the structure*. If you are at 0 offset, you are aligned on all N already, so I don't see why it would add padding before the first member of a struct. On 21/09/11 11:22 AM, Rory McGuire wrote: Would that even

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Christophe Travert
Jonathan M Davis , dans le message (digitalmars.D:144896), a écrit : > On Wednesday, September 21, 2011 15:16:33 Christophe wrote: >> Timon Gehr , dans le message (digitalmars.D:144889), a écrit : >> > unicode natively. Yet the 'D strings are strange and confusing' argument >> > comes up quite ofte

Re: The Strange Loop conference

2011-09-21 Thread bearophile
Andrei Alexandrescu: > which has enjoyed moderate audience and success. I uploaded the slides > at http://erdani.com/d/generic-programming-galore.pdf and the video may > be available soon. In future talks I suggest to show some downsides too, like explaining how much memory uses the D RE engin

Re: Paradox about D's popularity.

2011-09-21 Thread bearophile
Gor Gyolchanyan: > I'm ready to donate money to sponsor an ad campaign. Advertising has to be done at the right time and rhythm. Too little and no one knows you, too much and you risk wasting the single opportunity certain persons will give you. D doesn't need too much advertising now. There is

Re: Paradox about D's popularity.

2011-09-21 Thread J Arrizza
All excellent points Gor. I'd like to point out that Java faced nearly the same issues (one difference is it had Sun backing it) and yet it overcame those hurdles. I believe it became as popular as it did because of the JDK, not because of the language itself. (I actually called v1.0 a "toy langu

Re: Paradox about D's popularity.

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 4:18 AM, Gor Gyolchanyan wrote: [snip] D is maintained by a group of volunteers (I've joined that group recently), with no commercial interest in it. Of course, that's good, but not too reassuring. I call upon all fellow D developers to help me put together a reasonable infrastructure

Why do we have transitive const, again?

2011-09-21 Thread Mehrdad
I can't find the thread, but I remember someone (bearophile?) mentioned that the reason we have transitive const is to support purity. I don't think I understand why this is necessary, though -- could someone please explain why we have transitive const, and what problems it fixes? Thanks!

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Graham Fawcett
On Wed, 21 Sep 2011 11:39:03 -0500, Andrei Alexandrescu wrote: > On 9/21/11 10:16 AM, Christophe wrote: >> Timon Gehr , dans le message (digitalmars.D:144889), a écrit : >>> unicode natively. Yet the 'D strings are strange and confusing' >>> argument comes up quite often on the web. >> >> Well, I

Re: C compatibility module for phobos.

2011-09-21 Thread Sean Kelly
You might want to look at core.stdc.config. It contains the essential compatibility stuff for interfacing with C. Sent from my iPhone On Sep 21, 2011, at 1:01 AM, Gor Gyolchanyan wrote: > Hello, my dear, beloved D community. > > I've been reading literally all discussions on D.puremagic.com

The Strange Loop conference

2011-09-21 Thread Andrei Alexandrescu
I'm back from the Strange Loop conference. It's been an interesting experience. The audience was very diverse, with interest in everything functional (you'd only need to say "Haskell" or "monad" to get positive aahs), Web/cloud/tablet stuff, concurrent and distributed systems. Mentioning C++ no

C compatibility module for phobos.

2011-09-21 Thread Gor Gyolchanyan
Hello, my dear, beloved D community. I've been reading literally all discussions on D.puremagic.com for about a month now and I'm deeply concerned with my favorite language and it's reference compiler. So, for starters, i decided to add a very useful (in my opinion) module to phobos: etc.c.compat

Paradox about D's popularity.

2011-09-21 Thread Gor Gyolchanyan
Preface: Back when i didn't know about D's existence, C++ was my favorite language. The reason for that was, that C++ allowed all the following simultaneously: * Allowed me to wrote very optimized and high-performance code (I'm a run-time performance paranoiac). * Allowed me to avoid const

Re: Is there a CPAN, CheeseShop, Hackage or NPM for D?

2011-09-21 Thread Jacob Carlborg
On 2011-09-20 13:37, Chris Dew wrote: Hi Jacob, It's great to see that someone's working on this. Will your design cope with the situation as follows: ModA 1.0.0 requires ModB>=1.0.0<2.0.0 and ModC>=1.0.0<2.0.0 ModB 1.0.0 requires ModD>=1.0.0<2.0.0 ModC 1.0.0 requires ModD>=2.0.0<3.0.0 ModD 1.

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 10:16 AM, Christophe wrote: Timon Gehr , dans le message (digitalmars.D:144889), a écrit : unicode natively. Yet the 'D strings are strange and confusing' argument comes up quite often on the web. Well, I think they are. The ptr+length stuff is amasing, but the behavior of strings i

Re: D on hackernews

2011-09-21 Thread Jacob Carlborg
On 2011-09-21 15:52, Timon Gehr wrote: On 09/21/2011 09:37 AM, bearophile wrote: Andrei Alexandrescu: http://hackerne.ws/item?id=3014861 Apparently we're still having a PR issue. I think the Wikipedia D page needs to be rewritten, leaving 80-90% of its space to D (meaning D2). Yes, that

Re: Good publicity for D on heise/developer

2011-09-21 Thread Andrej Mitrovic
And there's a German D1 e-book here (140 pages!): http://web.archive.org/web/20070930135319/http://www.steinmole.de/d/d_buch.pdf Pretty cool.

Re: D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Jonathan M Davis
On Wednesday, September 21, 2011 15:16:33 Christophe wrote: > Timon Gehr , dans le message (digitalmars.D:144889), a écrit : > > unicode natively. Yet the 'D strings are strange and confusing' argument > > comes up quite often on the web. > > Well, I think they are. The ptr+length stuff is amasing

Re: Good publicity for D on heise/developer

2011-09-21 Thread Andrej Mitrovic
Interesting, there's also this older (dated 2008) D-specific article: http://www.heise.de/developer/artikel/D-die-neue-Programmiersprache-mit-C-Wurzeln-227070.html Autotranslation isn't too good but it's bearable: http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layo

Good publicity for D on heise/developer

2011-09-21 Thread Tobias Pankrath
Heise is one of the biggest publisher for IT related magazines and news in Germany. Their branch heise Developer targets (nomen est omen) software engineers specifically. They published an article about C++0xb recently. You can find it here. http://www.heise.de/developer/artikel/C-11-auch-ein- S

D's confusing strings (was Re: D on hackernews)

2011-09-21 Thread Christophe
Timon Gehr , dans le message (digitalmars.D:144889), a écrit : > unicode natively. Yet the 'D strings are strange and confusing' argument > comes up quite often on the web. Well, I think they are. The ptr+length stuff is amasing, but the behavior of strings in phobos is weird. mini-quiz: what s

Re: D on hackernews

2011-09-21 Thread Timon Gehr
On 09/21/2011 03:52 PM, Timon Gehr wrote: On 09/21/2011 09:37 AM, bearophile wrote: Andrei Alexandrescu: http://hackerne.ws/item?id=3014861 Apparently we're still having a PR issue. I think the Wikipedia D page needs to be rewritten, leaving 80-90% of its space to D (meaning D2). Yes, th

Re: D on hackernews

2011-09-21 Thread Andrei Alexandrescu
On 9/21/11 8:52 AM, Timon Gehr wrote: On 09/21/2011 09:37 AM, bearophile wrote: Andrei Alexandrescu: http://hackerne.ws/item?id=3014861 Apparently we're still having a PR issue. I think the Wikipedia D page needs to be rewritten, leaving 80-90% of its space to D (meaning D2). Yes, that i

Re: D on hackernews

2011-09-21 Thread Timon Gehr
On 09/21/2011 06:38 AM, Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in message news:j5bpbf$1g2u$1...@digitalmars.com... http://hackerne.ws/item?id=3014861 Apparently we're still having a PR issue. I tried to chime in but I can't add a comment. Looks like hackernews must be be having

Re: D on hackernews

2011-09-21 Thread Timon Gehr
On 09/21/2011 09:37 AM, bearophile wrote: Andrei Alexandrescu: http://hackerne.ws/item?id=3014861 Apparently we're still having a PR issue. I think the Wikipedia D page needs to be rewritten, leaving 80-90% of its space to D (meaning D2). Yes, that is important. Wikipedia is usually the

Re: D on hackernews

2011-09-21 Thread Andrej Mitrovic
On 9/21/11, Andrei Alexandrescu wrote: > http://hackerne.ws/item?id=3014861 > > Apparently we're still having a PR issue. I really doubt this by now. We've mentioned a million times that there's no dual standard libraries. I think this argument seems to be re-introduced by trolls as far as I can

Lazy binding of modules through templates

2011-09-21 Thread Martin Nowak
Have you ever done something like this? struct AA(Key, Value) { import impl; impl.AA!(Key, Value) _impl; alias _impl this; } auto arrayOp(string exp, Oprnds...)(Oprnds oprnds) { import impl; return impl.arrayOp!(exp, Oprnds)(oprnds); } I think this could be useful in simplif

  1   2   >