Re: Antti-Ville Tuuainen Passes GSoC Final Evaluation

2012-08-24 Thread Jacob Carlborg
On 2012-08-23 16:38, Alex Rønne Petersen wrote: Yes, but parallelization of the mark phase is fairly trivial, and something we should probably look into. The GC will probably always be STW unless we get compiler support for inserting GC barriers. Would a thread local GC be possible, and

Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed

2012-08-24 Thread Jacob Carlborg
On 2012-08-24 01:18, alex wrote: Hi everyone, Right after the GSoC finished (I'm really sure I passed :)), I've just found more time to improve things drastically: By using a nice combination of storing AST children both sorted by name in a dictionary and in normal list, I was able to increase

Re: Walter charms the audience at Sioux

2012-08-24 Thread Jacob Carlborg
On 2012-08-24 06:11, Walter Bright wrote: On 8/23/2012 1:45 PM, Andrei Alexandrescu wrote: Voted hot! http://sioux.eu/en/hot-or-not/d-programming-language.html They charmed me, too. I have rarely been treated so nicely as I was by the folks at Sioux who put on the show, and the wonderful

Re: Walter charms the audience at Sioux

2012-08-24 Thread Walter Bright
On 8/23/2012 11:34 PM, Jacob Carlborg wrote: Will there be a video posted? If not by now, probably not.

Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed

2012-08-24 Thread Bernard Helyer
IIRC, I've had problems doing anything complex in a no-paren template parameter. I always figured if you're doing no-parens, it had to be a single token (Maybe I'm wrong?). Does it work if you do this?: A!(int.SubClass) primitive or identifier, iirc

Re: Walter charms the audience at Sioux

2012-08-24 Thread Bernard Helyer
On Friday, 24 August 2012 at 06:46:10 UTC, Walter Bright wrote: On 8/23/2012 11:34 PM, Jacob Carlborg wrote: Will there be a video posted? If not by now, probably not. Was the talk mostly the same as the other one you gave with the same slides? (forget where that was)

Re: Antti-Ville Tuuainen Passes GSoC Final Evaluation

2012-08-24 Thread renoX
On Thursday, 23 August 2012 at 14:38:19 UTC, Alex Rønne Petersen wrote: On 23-08-2012 15:21, Rory McGuire wrote: On Thu, Aug 23, 2012 at 2:51 PM, dsimcha dsim...@yahoo.com mailto:dsim...@yahoo.com wrote: Basically, the idea is to store information about what is and isn't a pointer at

Re: Antti-Ville Tuuainen Passes GSoC Final Evaluation

2012-08-24 Thread Simen Kjaeraas
On Fri, 24 Aug 2012 08:27:09 +0200, Jacob Carlborg d...@me.com wrote: On 2012-08-23 16:38, Alex Rønne Petersen wrote: Yes, but parallelization of the mark phase is fairly trivial, and something we should probably look into. The GC will probably always be STW unless we get compiler support

Re: Walter charms the audience at Sioux

2012-08-24 Thread Walter Bright
On 8/24/2012 12:00 AM, Bernard Helyer wrote: On Friday, 24 August 2012 at 06:46:10 UTC, Walter Bright wrote: On 8/23/2012 11:34 PM, Jacob Carlborg wrote: Will there be a video posted? If not by now, probably not. Was the talk mostly the same as the other one you gave with the same slides?

Article: D-style Mixins in C#

2012-08-24 Thread Michal Minich
http://blogs.jetbrains.com/dotnet/2012/08/resharper-sdk-adventures-part-5-%E2%80%94-d-style-mixins-in-c/

Language Interview Questions

2012-08-24 Thread Lena Singh
How to make a chat page in php in simple? For more PHP interview questions and answers visit http://www.coolinterview.com/type.asp?iType=110

Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed

2012-08-24 Thread alex
On Friday, 24 August 2012 at 00:10:03 UTC, Piotr Szturmaj wrote: F i L wrote: http://i3.kym-cdn.com/entries/icons/original/000/004/128/BRILLIANT_.jpg Great work as always, Alex :D Yes! This is really good project! :) Thanks :D

Re: Mono-D v0.4.1.2 - Heavily improved performance + Completion bugs removed

2012-08-24 Thread alex
On Friday, 24 August 2012 at 02:40:43 UTC, Nick Sabalausky wrote: On Fri, 24 Aug 2012 01:18:25 +0200 alex i...@alexanderbothe.com wrote: class D : C!(A!int.SubClass) { } // is not allowed, but A!int is -- why? IIRC, I've had problems doing anything complex in a no-paren template

Re: Walter charms the audience at Sioux

2012-08-24 Thread Peter Alexander
On Friday, 24 August 2012 at 02:23:04 UTC, F i L wrote: Jonathan M Davis wrote: Well, since it'll be years before we even consider creating D3, we're in trouble if we need D3 for D to be successful. D2 isn't perfect, but it's still a very solid language and outshines more entrenched languages

Re: Walter charms the audience at Sioux

2012-08-24 Thread deadalnix
Le 23/08/2012 22:45, Andrei Alexandrescu a écrit : Voted hot! http://sioux.eu/en/hot-or-not/d-programming-language.html Andrei Should I mention that thing about segfault ?

Re: Language Interview Questions

2012-08-24 Thread Paulo Pinto
On Friday, 24 August 2012 at 09:25:52 UTC, Rory McGuire wrote: SPAM How did this message get approved? On Fri, Aug 24, 2012 at 11:18 AM, Lena Singh lenasingh...@yahoo.com wrote: How to make a chat page in php in simple? For more PHP interview questions and answers visit

Re: Antti-Ville Tuuainen Passes GSoC Final Evaluation

2012-08-24 Thread Jacob Carlborg
On 2012-08-24 09:32, Simen Kjaeraas wrote: It certainly would be possible. But I believe it requires thread-local heaps, and some way of keeping track of when an object changes owning thread. Yeah, I was think about that. Are thread local heaps a problem? Perhaps a mark phase could run on

Re: Language Interview Questions

2012-08-24 Thread Rory McGuire
Oh, wow. My messages used to get blocked if I sent from the wrong address, perhaps it was a different list. Thanks, On Fri, Aug 24, 2012 at 1:43 PM, Paulo Pinto pj...@progtools.org wrote: On Friday, 24 August 2012 at 09:25:52 UTC, Rory McGuire wrote: SPAM How did this message get approved?

Re: Walter charms the audience at Sioux

2012-08-24 Thread F i L
Peter Alexander wrote: There's no such thing as a perfect language. Note the asterisks.

Re: Walter charms the audience at Sioux

2012-08-24 Thread Simen Kjaeraas
On Fri, 24 Aug 2012 13:52:04 +0200, F i L witte2...@gmail.com wrote: Peter Alexander wrote: There's no such thing as a perfect language. Note the asterisks. What I'm used to, *this* means bold. *Perfect* thus means absolutely perfect. Perfect*, on the other hand, would mean either 'more

Re: Walter charms the audience at Sioux

2012-08-24 Thread Regan Heath
On Fri, 24 Aug 2012 13:44:55 +0100, Simen Kjaeraas simen.kja...@gmail.com wrote: On Fri, 24 Aug 2012 13:52:04 +0200, F i L witte2...@gmail.com wrote: Peter Alexander wrote: There's no such thing as a perfect language. Note the asterisks. What I'm used to, *this* means bold. *Perfect*

Re: Walter charms the audience at Sioux

2012-08-24 Thread Andrei Alexandrescu
On 8/23/12 9:27 PM, F i L wrote: Jonathan M Davis wrote: You've been mistaken. @system is the default. If we could go back in time and redo things, we'd probably do stuff like make pure and @safe the default, but it's far too late now. Okay, thanks for the info. I have a feeling that D3 will

Re: Walter charms the audience at Sioux

2012-08-24 Thread Andrei Alexandrescu
On 8/24/12 4:09 AM, Walter Bright wrote: On 8/24/2012 12:00 AM, Bernard Helyer wrote: On Friday, 24 August 2012 at 06:46:10 UTC, Walter Bright wrote: On 8/23/2012 11:34 PM, Jacob Carlborg wrote: Will there be a video posted? If not by now, probably not. Was the talk mostly the same as the

Re: Walter charms the audience at Sioux

2012-08-24 Thread Andrei Alexandrescu
On 8/24/12 12:35 AM, bearophile wrote: Walter Bright: I like the plain jane look, and do not think it is unprofessional. A part of me thinks the outlook of those slides is not shiny-professional, just compare your slides with the first and last slides in that Pdf probably added by the

Re: Language Interview Questions

2012-08-24 Thread Jesse Phillips
On Friday, 24 August 2012 at 11:51:02 UTC, Rory McGuire wrote: Oh, wow. My messages used to get blocked if I sent from the wrong address, perhaps it was a different list. Thanks, The forum.dlang engine has some spam checking, but I don't know what it is and there are many other ways to post

Dmitry Olshansky Passes GSoC Final Evaluation

2012-08-24 Thread Andrei Alexandrescu
Hi everybody, I'm happy to announce that Dmitry has passed GSoC's final evaluation. Going forward he and I will focus on integrating his work within Phobos. This should have technically occurred during the allocated time itself, but it's not like Dmitry will run away with the money :o).

Re: Dmitry Olshansky Passes GSoC Final Evaluation

2012-08-24 Thread Simen Kjaeraas
On Fri, 24 Aug 2012 17:50:37 +0200, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Hi everybody, I'm happy to announce that Dmitry has passed GSoC's final evaluation. Going forward he and I will focus on integrating his work within Phobos. This should have technically occurred

Social Influence on Language Adoption

2012-08-24 Thread Andrei Alexandrescu
This good paper seems to be ignored on reddit. I think it's worth a look particularly for us in a non-mainstream language community. http://www.reddit.com/r/programming/comments/yon3i/social_influences_on_language_adoption_pdf/ Andrei

Re: Social Influence on Language Adoption

2012-08-24 Thread Adam D. Ruppe
It isn't surprising, but is still bizarre to me how many people correlated static types with some negative things like expressivity and enjoyment. Static types rok so much in every way.

Re: Antti-Ville Tuuainen Passes GSoC Final Evaluation

2012-08-24 Thread renoX
On Thursday, 23 August 2012 at 14:49:11 UTC, Alex Rønne Petersen wrote: On 23-08-2012 16:47, dsimcha wrote: On Thursday, 23 August 2012 at 14:38:19 UTC, Alex Rønne Petersen wrote: Yes, but parallelization of the mark phase is fairly trivial, and something we should probably look into.

Re: Article: D-style Mixins in C#

2012-08-24 Thread Adam Wilson
On Fri, 24 Aug 2012 01:40:27 -0700, Michal Minich michal.min...@gmail.com wrote: http://blogs.jetbrains.com/dotnet/2012/08/resharper-sdk-adventures-part-5-%E2%80%94-d-style-mixins-in-c/ This is pretty cool. The guys at JetBrains are well known in the C# community for the high-quality

Alexander Bothe Passes GSoC Finals

2012-08-24 Thread Adam Wilson
Despite an ambitious plan at the beginning of GSoC, Alex has made phenomenal progress on Mono-D and has pushed Mono-D to the point that I think that it can be considered a truly first-class IDE integration for D. Some of the new capabilities that Mono-D acquired during GSoC are: Template

Re: Dmitry Olshansky Passes GSoC Final Evaluation

2012-08-24 Thread Dmitry Olshansky
On 24-Aug-12 19:50, Andrei Alexandrescu wrote: Hi everybody, I'm happy to announce that Dmitry has passed GSoC's final evaluation. Going forward he and I will focus on integrating his work within Phobos. This should have technically occurred during the allocated time itself, but it's not like

Re: Alexander Bothe Passes GSoC Finals

2012-08-24 Thread nazriel
Congratulations Alexander, as always, you did a great job!

Re: Article: D-style Mixins in C#

2012-08-24 Thread Andrei Alexandrescu
On 8/24/12 2:06 PM, Adam Wilson wrote: On Fri, 24 Aug 2012 01:40:27 -0700, Michal Minich michal.min...@gmail.com wrote: http://blogs.jetbrains.com/dotnet/2012/08/resharper-sdk-adventures-part-5-%E2%80%94-d-style-mixins-in-c/ This is pretty cool. The guys at JetBrains are well known in the

Re: Dmitry Olshansky Passes GSoC Final Evaluation

2012-08-24 Thread Andrei Alexandrescu
On 8/24/12 2:44 PM, Dmitry Olshansky wrote: On 24-Aug-12 19:50, Andrei Alexandrescu wrote: Hi everybody, I'm happy to announce that Dmitry has passed GSoC's final evaluation. Going forward he and I will focus on integrating his work within Phobos. This should have technically occurred during

Re: Alexander Bothe Passes GSoC Finals

2012-08-24 Thread Rory McGuire
Excellent work. Congratulations! On Fri, Aug 24, 2012 at 8:40 PM, nazriel s...@dzfl.pl wrote: Congratulations Alexander, as always, you did a great job!

Re: Dmitry Olshansky Passes GSoC Final Evaluation

2012-08-24 Thread Alex Rønne Petersen
On 24-08-2012 20:49, Andrei Alexandrescu wrote: On 8/24/12 2:44 PM, Dmitry Olshansky wrote: On 24-Aug-12 19:50, Andrei Alexandrescu wrote: Hi everybody, I'm happy to announce that Dmitry has passed GSoC's final evaluation. Going forward he and I will focus on integrating his work within

Re: Alexander Bothe Passes GSoC Finals

2012-08-24 Thread Damian
Congrats Alex on all that hard work! MonoD has truly become a first class citizen at last!

Re: Walter charms the audience at Sioux

2012-08-24 Thread Nick Sabalausky
On Fri, 24 Aug 2012 11:49:02 +0200 Peter Alexander peter.alexander...@gmail.com wrote: There's no such thing as a perfect language. Well of course there isn't: D3 isn't made yet! ;)

Re: Social Influence on Language Adoption

2012-08-24 Thread Nick Sabalausky
On Fri, 24 Aug 2012 18:19:23 +0200 Adam D. Ruppe destructiona...@gmail.com wrote: It isn't surprising, but is still bizarre to me how many people correlated static types with some negative things like expressivity and enjoyment. I agree. C++ and Java have damaged many minds. Static

Re: Social Influence on Language Adoption

2012-08-24 Thread Kagamin
Still other of our results contradict common beliefs: we find significant developer unease with static type systems. Python/JS script kiddies?

Re: Social Influence on Language Adoption

2012-08-24 Thread Nick Sabalausky
On Fri, 24 Aug 2012 22:43:24 +0200 Kagamin s...@here.lot wrote: Still other of our results contradict common beliefs: we find significant developer unease with static type systems. Python/JS script kiddies? And PHP monkeys.

Re: Dpaste - online compiler and collaboration tool dedicated to D Programming Language.

2012-08-24 Thread nazriel
On Tuesday, 21 August 2012 at 23:17:42 UTC, bearophile wrote: nazriel: I would like to share with you, Beta version of http://dpaste.dzfl.pl/ At the moment gives a 403 error :-( Bye, bearophile Yeah, our hosting provider had migration and due to specification of dpaste, automatic

Re: Walter charms the audience at Sioux

2012-08-24 Thread Minas Mina
Really nice (and fun) presentation! I wish I could've been there! And what's the deal with D3(?) guys? Aren't you satisfied with D2? I think it rox baby!!

Re: Walter charms the audience at Sioux

2012-08-24 Thread Nick Sabalausky
On Fri, 24 Aug 2012 23:18:45 +0200 Minas Mina minas_mina1...@hotmail.co.uk wrote: Really nice (and fun) presentation! I wish I could've been there! And what's the deal with D3(?) guys? Purely hypothetical talk right now. No real plans for a D3 ATM. Aren't you satisfied with D2? One can

Re: Dpaste - online compiler and collaboration tool dedicated to D Programming Language.

2012-08-24 Thread bearophile
nazriel: But I moved it by hand, seems to be working good again. Thank you. I have seen that some times it loses the selections: if I select a certain Expiration or Others I'd like it to keep the same choice in my successive pastes in the same session. Bye, bearophile

Re: Walter charms the audience at Sioux

2012-08-24 Thread F i L
Andrei Alexandrescu wrote: On 8/23/12 9:27 PM, F i L wrote: Jonathan M Davis wrote: You've been mistaken. @system is the default. If we could go back in time and redo things, we'd probably do stuff like make pure and @safe the default, but it's far too late now. Okay, thanks for the info.

Re: Alexander Bothe Passes GSoC Finals

2012-08-24 Thread Pragma Tix
Am 24.08.2012 20:37, schrieb Adam Wilson: Despite an ambitious plan at the beginning of GSoC, Alex has made phenomenal progress on Mono-D and has pushed Mono-D to the point that I think that it can be considered a truly first-class IDE integration for D. Some of the new capabilities that Mono-D

Re: Dynamic loading, D all the way (dmd 64bit 2.060/Ubuntu 64bit 12.04/x86_64)

2012-08-24 Thread Jacob Carlborg
On 2012-08-24 00:26, Philip Daniels wrote: But wouldn't that require you to link everything together at, err, compile time? What I'm getting at is, would it be possible to port a DI/IoC tool such as StructureMap (http://docs.structuremap.net/index.html) or Spring to D? This can handle tasks

Re: More on vectorized comparisons

2012-08-24 Thread Don Clugston
On 24/08/12 00:13, bearophile wrote: Sean Cavanaugh: Well, right now the binary operators == != = = and are required to return bool instead of allowing a user defined type, which prevents a lot of the sugar you would want to make the code nice to write. The hypothetical D sugar I was

Re: Vote for the new std.hash (oops, std.digest)

2012-08-24 Thread Johannes Pfau
Am Thu, 23 Aug 2012 22:46:35 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: It says Digests do not work in CTFE. Just checked it for MD5. I do not know but I think this is just a current limitation of the CTFE implementation. It's possible to support CTFE, Piotr Szturmaj has some

Re: Vote for the new std.hash (oops, std.digest)

2012-08-24 Thread Jens Mueller
Johannes Pfau wrote: Am Thu, 23 Aug 2012 22:46:35 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: It says Digests do not work in CTFE. Just checked it for MD5. I do not know but I think this is just a current limitation of the CTFE implementation. It's possible to support CTFE,

Re: Vote for the new std.hash (oops, std.digest)

2012-08-24 Thread Sönke Ludwig
Yes

Re: Formatted read consumes input

2012-08-24 Thread Dmitry Olshansky
On Thursday, 23 August 2012 at 11:33:19 UTC, monarch_dodra wrote: As title implies: import std.stdio; import std.format; void main() { string s = 42; int v; formattedRead(s, %d, v); writefln([%s] [%s], s, v); } [] [42] Is this the expected behavior? Yes, both parse

Re: Formatted read consumes input

2012-08-24 Thread monarch_dodra
On Friday, 24 August 2012 at 11:18:55 UTC, Dmitry Olshansky wrote: On Thursday, 23 August 2012 at 11:33:19 UTC, monarch_dodra wrote: I've traced the root issue to formattedRead's signature, which is: uint formattedRead(R, Char, S...)(ref R r, const(Char)[] fmt, S args); As I explained

Re: Formatted read consumes input

2012-08-24 Thread Denis Shelomovskij
24.08.2012 16:16, monarch_dodra пишет: On Friday, 24 August 2012 at 11:18:55 UTC, Dmitry Olshansky wrote: On Thursday, 23 August 2012 at 11:33:19 UTC, monarch_dodra wrote: I've traced the root issue to formattedRead's signature, which is: uint formattedRead(R, Char, S...)(ref R r,

Re: Study: build times for D programs

2012-08-24 Thread Steven Schveighoffer
On Tue, 24 Jul 2012 10:34:57 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Hello, I was talking to Walter on how to define a good study of D's compilation speed. We figured that we clearly need a good baseline, otherwise numbers have little meaning. Might I draw

Re: Formatted read consumes input

2012-08-24 Thread Tove
On Friday, 24 August 2012 at 11:18:55 UTC, Dmitry Olshansky wrote: C's scanf is a poor argument as it uses pointers instead of ref (and it can't do ref as there is no ref in C :) ). Yet it doesn't allow to read things in a couple of calls AFAIK. In C scanf returns number of arguments

Re: Formatted read consumes input

2012-08-24 Thread monarch_dodra
On Friday, 24 August 2012 at 13:08:43 UTC, Denis Shelomovskij wrote: 24.08.2012 16:16, monarch_dodra пишет: On Friday, 24 August 2012 at 11:18:55 UTC, Dmitry Olshansky wrote: On Thursday, 23 August 2012 at 11:33:19 UTC, monarch_dodra wrote: I've traced the root issue to formattedRead's

Re: More on vectorized comparisons

2012-08-24 Thread bearophile
It's just syntax sugar for a very obscure operation, It's an operation included in Cilk Plus, I think Intel devs know enough what they are doing. And I think code like this is a common need: if (a[] 0) { // ... } and it's somewhat ambiguous -- is it allowed to use short-circuit

Re: interfaces and such

2012-08-24 Thread Steven Schveighoffer
On Fri, 27 Jul 2012 12:48:59 -0400, David Nadlinger s...@klickverbot.at wrote: On Friday, 27 July 2012 at 14:56:18 UTC, Gor Gyolchanyan wrote: I have a small question: why aren't interfaces implicitly convertible to Object? Not all interfaces »originate« from D objects, they can also be COM

Re: Null references

2012-08-24 Thread Nick Treleaven
On 23/08/2012 18:27, Namespace wrote: Is there any special reason why these functions doesn't get Maybe as (const) ref? void show(T)(Maybe!T m) bool opEquals(Maybe!T m) void opAssign(Maybe!T m) No special reason. The Maybe struct is usually pretty small so using ref didn't occur to me, but

Re: Null references

2012-08-24 Thread Nick Treleaven
On 22/08/2012 16:42, Philippe Sigaud wrote: Then, both Simen and you could code a generic algebraic datatype generator, with the associated matching functions (and probably mapping / reducing) Here come the whole Haskell / ML menagerie of types:) mixin(ADT( Tree(T): Leaf(T) |

Re: Vote for the new std.hash (oops, std.digest)

2012-08-24 Thread d_follower
On Friday, 24 August 2012 at 08:18:07 UTC, Johannes Pfau wrote: Am Thu, 23 Aug 2012 22:46:35 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: It says Digests do not work in CTFE. Just checked it for MD5. I do not know but I think this is just a current limitation of the CTFE

Re: Phobos unittest failure on single-core machines

2012-08-24 Thread dsimcha
On Friday, 24 August 2012 at 02:16:24 UTC, Ed McCardell wrote: When trying to run the phobos unittests on my 32- and 64-bit linux single-processor machines, I get this output: Testing generated/linux/debug/64/unittest/std/parallelism totalCPUs = 1

Re: Consistency, Templates, Constructors, and D3

2012-08-24 Thread Nick Treleaven
On 24/08/2012 06:14, F i L wrote: DISCLAIMER: This isn't a feature request or anything like that. It's ONLY intended to stir _constructive_ conversation and criticism of D's existing features, and how to improve them _in the future_ (note the 'D3' in the title). To start, let's look at:

Re: Formatted read consumes input

2012-08-24 Thread Dmitry Olshansky
On 24-Aug-12 17:43, Tove wrote: On Friday, 24 August 2012 at 11:18:55 UTC, Dmitry Olshansky wrote: C's scanf is a poor argument as it uses pointers instead of ref (and it can't do ref as there is no ref in C :) ). Yet it doesn't allow to read things in a couple of calls AFAIK. In C scanf

Re: Study: build times for D programs

2012-08-24 Thread d_follower
On Tuesday, 24 July 2012 at 14:34:58 UTC, Andrei Alexandrescu wrote: Hello, I was talking to Walter on how to define a good study of D's compilation speed. We figured that we clearly need a good baseline, otherwise numbers have little meaning. One idea would be to take a real, non-trivial

Re: More on vectorized comparisons

2012-08-24 Thread tn
On Thursday, 23 August 2012 at 00:19:39 UTC, bearophile wrote: At page 69 of those slides there is some code that looks interesting, I think this is a reduced version of part of it, that shows another way to use vectorized comparisons: void main() { double[] a = [1.0, 1.0, -1.0, 1.0,

Re: Consistency, Templates, Constructors, and D3

2012-08-24 Thread Nathan M. Swan
On Friday, 24 August 2012 at 05:14:39 UTC, F i L wrote: We replace it with special factory functions. Example: class Person { string name; uint age; this new(string n, uint a) { name = n; age = a; } } void main() { auto philip =

Re: Consistency, Templates, Constructors, and D3

2012-08-24 Thread Andrej Mitrovic
On 8/24/12, Nathan M. Swan nathanms...@gmail.com wrote: Class.new().method() vs. (new Class()).method() I prefer the latter because it's more explicit that you're throwing away an object after invocation (unless you do something funky in 'method' and store the 'this' reference globally).

Re: containers, iteration, and removal

2012-08-24 Thread Steven Schveighoffer
On Wed, 01 Aug 2012 03:44:47 -0400, Ellery Newcomer ellery-newco...@utulsa.edu wrote: Hello. Today I was thinking about Java. Specifically, java.util.Iterator and the pattern while(iter.hasNext()) { Object item = iter.next(); if(predicate(item)) {

Re: profiler issues: time overflows, conversion to seconds, gui/html output

2012-08-24 Thread timotheecour
Thanks, The trace code is in druntime/rt/trace.d. There you can see that the ticks/sec is just set to the shown constant value for anything but Windows, but RDTSC is used to read the processor cycles. So the values are probably off by a factor of 300 to 1000. So I'm still not sure how to

Re: profiler issues: time overflows, conversion to seconds, gui/html output

2012-08-24 Thread timotheecour
great! Is there a way to run it on a project build outside of visualD? I use a makefile instead of relying on visualD's build system. When I open the profiler window and open trace.log inside nothing is shown. Ideally all it should do is demangle symbols and convert to a table, so I'm

Re: Phobos unittest failure on single-core machines

2012-08-24 Thread Ed McCardell
On 08/24/12 12:27, dsimcha wrote: This looks to be a bug in a recently-added feature. I'll look at it in detail tonight, but I think I know what the problem is and it's pretty easy to fix. Can you please file a Bugzilla and note whether it always occurs or is non-deterministic? Filed as

Re: containers, iteration, and removal

2012-08-24 Thread JN
I feel kinda stupid here, what's wrong with C++ remove_if ( http://www.cplusplus.com/reference/algorithm/remove_if/ )?

Re: profiler issues: time overflows, conversion to seconds, gui/html output

2012-08-24 Thread Rainer Schuetze
On 24.08.2012 19:35, timotheecour wrote: Thanks, The trace code is in druntime/rt/trace.d. There you can see that the ticks/sec is just set to the shown constant value for anything but Windows, but RDTSC is used to read the processor cycles. So the values are probably off by a factor of 300

Re: [GSOC] New unicode module beta, with Grapheme support!

2012-08-24 Thread Dmitry Olshansky
On 23-Aug-12 10:34, Jacob Carlborg wrote: On 2012-08-22 23:31, Dmitry Olshansky wrote: Well, officially the final bell has rung, marking the end of GSOC. Cool. P.P.S. Volunteers who'd like to test x64 are welcome to run rdmd gen_uni.d and report back (maybe it's my local setup problem).

Re: Consistency, Templates, Constructors, and D3

2012-08-24 Thread David Nadlinger
On Friday, 24 August 2012 at 17:04:49 UTC, Andrej Mitrovic wrote: On 8/24/12, Nathan M. Swan nathanms...@gmail.com wrote: Class.new().method() vs. (new Class()).method() I prefer the latter because it's more explicit that you're throwing away an object after invocation I'm not sure if I

D-etractions A real world programmers view on D

2012-08-24 Thread Pragma Tix
was Andrew McKinlay is trying D for Suneido. http://thesoftwarelife.blogspot.fr/2012/08/d-etractions.html You do not necessarily have to agree with Andrew, but this is a pragmatic developer's view. Let me say that Andrew has created his own database system (Relational Algebra based) ,

Re: D-etractions A real world programmers view on D

2012-08-24 Thread Timon Gehr
On 08/25/2012 01:58 AM, Pragma Tix wrote: was Andrew McKinlay is trying D for Suneido. http://thesoftwarelife.blogspot.fr/2012/08/d-etractions.html You do not necessarily have to agree with Andrew, but this is a pragmatic developer's view. Let me say that Andrew has created his own

Re: D-etractions A real world programmers view on D

2012-08-24 Thread bearophile
Pragma Tix: IMO a voice, D core developers should listen to. Even assuming all the things he has said are true, what do you suggest D core developers to do? Example: how can D language devevelopers help D programmers better refactor D code? Maybe having some built-in refactoring features?

Re: Consistency, Templates, Constructors, and D3

2012-08-24 Thread F i L
Nathan M. Swan wrote: The constructor definition syntax doesn't seem to be an improvement: this new instead of the old this. well the reason they're named is because then you can multiple constructors under different names: class Model { string name; float x = 0, y =

Re: D-etractions A real world programmers view on D

2012-08-24 Thread Pragma Tix
Am 25.08.2012 02:22, schrieb bearophile: Even assuming all the things he has said are true, what do you suggest D core developers to do? Example: how can D language devevelopers help D programmers better refactor D code? Maybe having some built-in refactoring features? Probably some GC

Re: D-etractions A real world programmers view on D

2012-08-24 Thread bearophile
Pragma Tix: First of all --- I have just forwarded a link, 'cause I thought that this blog contains some interesting insights/views/opinions. Right, sorry :-) Bye, bearophile

Re: D-etractions A real world programmers view on D

2012-08-24 Thread Pragma Tix
Am 25.08.2012 02:20, schrieb Timon Gehr: His post comes down to: I like to have an IDE and I prefer Java because I already know Java. Not exactly. Seems that he likes pure and immutable ... (not really Java ) F.I. quote But when you can't put immutable values in a container without wrapping

Re: interfaces and such

2012-08-24 Thread Chris Nicholson-Sauls
On Friday, 24 August 2012 at 14:15:28 UTC, Steven Schveighoffer wrote: On Fri, 27 Jul 2012 12:48:59 -0400, David Nadlinger s...@klickverbot.at wrote: On Friday, 27 July 2012 at 14:56:18 UTC, Gor Gyolchanyan wrote: I have a small question: why aren't interfaces implicitly convertible to

Re: D-etractions A real world programmers view on D

2012-08-24 Thread bearophile
Pragma Tix: 'Cause the language is not yet stable, therefore the basic library is in flow. In a simulated annealing algorithm (http://en.wikipedia.org/wiki/Simulated_annealing ) you can't lower the temperature too much quickly, otherwise you get a bad solution. To reach a stable solution

Re: opDispatch with implicit receiver

2012-08-24 Thread Jacob Carlborg
On 2012-08-23 17:35, Ali Çehreli wrote: I don't know the actual decision that has been made at the time but I am happy that it works this way. Otherwise the compiler would not be able to flag silly typos in classes that define opDispatch. Yes, it is still possible to make typos after the

Re: call member function alias

2012-08-24 Thread Jacob Carlborg
On 2012-08-23 21:51, Ellery Newcomer wrote: if I have a member function alias and corresponding object and arguments, is there any way to turn them into a member function call? e.g. class X{ void a(); } auto profit(alias fn, T, Args...)(T t, Args args) { ??? } profit!(X.fn, X)(x);

Re: struct init property

2012-08-24 Thread nocide
Am 23.08.2012 19:15, schrieb nocide: struct has no default constructor and instances are initialized with the init property. Can I declare or override the init property for a custom defined struct? Ok, the initializer forks fine for me, but I've encounterd following situation: (simplified

types of ranges

2012-08-24 Thread Minas Mina
Is there n article that explains the different types of Ranges? (InputRange, ForwardRange, etc) and their usage?

Re: struct init property

2012-08-24 Thread Timon Gehr
On 08/24/2012 09:39 AM, nocide wrote: Am 23.08.2012 19:15, schrieb nocide: struct has no default constructor and instances are initialized with the init property. Can I declare or override the init property for a custom defined struct? Ok, the initializer forks fine for me, but I've

Re: types of ranges

2012-08-24 Thread Jesse Phillips
On Friday, 24 August 2012 at 10:44:28 UTC, Minas Mina wrote: Is there n article that explains the different types of Ranges? (InputRange, ForwardRange, etc) and their usage? There are the docs[1] and this chapter of Programming in D[2] 1. http://dlang.org/phobos/std_range.html 2.

Re: types of ranges

2012-08-24 Thread Ali Çehreli
On 08/24/2012 03:44 AM, Minas Mina wrote: Is there n article that explains the different types of Ranges? (InputRange, ForwardRange, etc) and their usage? This chapter tries to do that: http://ddili.org/ders/d.en/ranges.html It contains a link to an article by Andrei as well. Ali -- D

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-24 Thread Benjamin Thaut
Am 24.07.2012 20:38, schrieb David: I am writing a game engine, well I was using a float[] array to store my vertices, this worked well, but I have to send more and more uv coordinates (and other information) which needn't be stored as `float`'s so I moved from a float-Array to a Vertex Array:

Re: inout functions

2012-08-24 Thread Kagamin
Well, it may be also a way to ensure the function doesn't modify the struct.

Re: Link against MinGW libraries

2012-08-24 Thread Kagamin
If I remember it correctly, you should write a .def file and compile it with dlltool or something like that. It will create the import library.

Re: Link against MinGW libraries

2012-08-24 Thread Kagamin
There was also a switch for gcc or ld to generate an import library.

  1   2   >