Re: IDE Support for D

2012-04-07 Thread Jussi Jumppanen
On Friday, 6 April 2012 at 23:45:49 UTC, Manu wrote: Fair enough I guess, but I'm a customer. I work commercially, and I'd happily pay money for tools that work. On Windows, the Zeus editor/IDE has support for the D language: http://www.zeusedit.com/zforum/viewtopic.php?t=2645 Sadly, I

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Johannes Pfau
Am Fri, 06 Apr 2012 16:33:21 -0400 schrieb "Steven Schveighoffer" : > On Fri, 06 Apr 2012 15:03:39 -0400, Piotr Szturmaj > wrote: > > > Steven Schveighoffer wrote: > > >> What if I have 20 string attributes, I must define a new attribute > >> type for each one? This seems like unneeded bloat. >

Re: Mascot for D

2012-04-07 Thread BillWendt
Apparently, then, when you have no substance, the cure is to get a mascot? Good products "sell" themselves. If D lacks market share after being introduced 10 years ago, do you REALLY think a cutsie-tootsie graphic is going to help? Hello. That said, I would like to know HOW MANY is this group o

Re: Mascot for D

2012-04-07 Thread Timon Gehr
On 04/07/2012 10:35 AM, BillWendt wrote: Apparently, then, when you have no substance, the cure is to get a mascot? These are orthogonal concerns. Good products "sell" themselves. If D lacks market share after being introduced 10 years ago, 10 years ago, it was not a language I would have u

Re: Mono-D GSoC proposal, hopefully the last thread about it

2012-04-07 Thread alex
On Saturday, 7 April 2012 at 00:22:09 UTC, Adam Wilson wrote: Well, that was just the deadline for turning them in, you can still make changes. Now the mentor/student assignment process begins, i've listed myself on your proposal, I couldn't do that before today. :-) Ah ok, nice + thanks!

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread deadalnix
Le 07/04/2012 05:29, Kapps a écrit : I slightly prefer this function method over the struct method because: 1) No need to generate a custom struct for everything. Plenty of things are just a true or false, or a string. Saves a little bit of TypeInfo generation. If the type isn't used at runtime

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread deadalnix
Le 07/04/2012 05:29, Kapps a écrit : On the topic of type vs storage, it is useful to be able to apply attributes to a type, but this should /not/ change the type itself. It must be transparent to the user what attributes a type has unless they're actually accessing attributes. Then put the at

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread deadalnix
Le 07/04/2012 09:10, Johannes Pfau a écrit : But as long as you mark attribute structs in some special way (@attribute struct Author), this can also be guaranteed for structs. Afaik ignoring unused functions is currently done by the linker, but I think functions/structs only used for attributes s

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread deadalnix
Le 06/04/2012 22:46, Mafi a écrit : Also, if I see: @square(5) int foo(); How do I know that I have to use __traits(getAttribute, foo, Area)? Another possibility: @attribute Area area(int w, int h) { return Area(w, h);} @attribute Area area(Area a) { return a;} Area square(int a) { return Ar

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Manu
On 7 April 2012 06:29, Kapps wrote: > On Friday, 6 April 2012 at 13:23:03 UTC, Steven Schveighoffer wrote: > >> OK, so I woke up this morning to find a huge discussion on attributes, >> and I'd like to once again propose the idea of how to define and use an >> attribute. >> >> I do not like the i

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Kapps
On Saturday, 7 April 2012 at 11:13:54 UTC, deadalnix wrote: Le 07/04/2012 05:29, Kapps a écrit : I slightly prefer this function method over the struct method because: 1) No need to generate a custom struct for everything. Plenty of things are just a true or false, or a string. Saves a little b

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Kapps
On Saturday, 7 April 2012 at 11:25:15 UTC, Manu wrote: Generating a struct for an attribute is fine. It's not like you go on a custom attribute frenzy attributing everything with different stuff. You may have a few useful attributes, and those given by libs that you just use. Why can't you us

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Manu
On 7 April 2012 14:35, Kapps wrote: > On Saturday, 7 April 2012 at 11:25:15 UTC, Manu wrote: > >> >> Generating a struct for an attribute is fine. It's not like you go on >> a custom attribute frenzy attributing everything with different stuff. You >> may have a few useful attributes, and those g

Re: Custom attributes (again)

2012-04-07 Thread Jacob Carlborg
On 2012-04-06 15:48, Adam D. Ruppe wrote: On Friday, 6 April 2012 at 12:52:27 UTC, Jacob Carlborg wrote: Just as we have today with keywords and symbols, I don't see the problem. Things like safe aren't keywords though. They are just magic identifiers. Think of the implementation: switch(tok

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Jacob Carlborg
On 2012-04-06 19:37, Steven Schveighoffer wrote: On Fri, 06 Apr 2012 12:53:51 -0400, Piotr Szturmaj struct Author { string name = "empty"; } // struct Author { string name; } - this works too I think the point is, we should disallow: @Author int x; -Steve Why? -- /Jacob Carlborg

Re: Discussion on Go and D

2012-04-07 Thread Jacob Carlborg
On 2012-04-06 19:37, Rainer Schuetze wrote: GC issues like this are currently blocking development of Visual D (a Win32 project): when just adding spaces to a file, parsing the new file every other second often needs 10 or more parsings until an equal amount of memory is collected compared to th

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Jacob Carlborg
On 2012-04-06 19:36, Steven Schveighoffer wrote: so now I must define a type for every attribute? I'd rather just define a function. What if I have 20 string attributes, I must define a new attribute type for each one? This seems like unneeded bloat. If we want to be able to pass a key-value l

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Jacob Carlborg
On 2012-04-06 19:51, bls wrote: Why not being more flexible .. Likewise struct Annotation //Throw in all your annotations { Variant[] [string] map; Variant[] opDispatch(string key)() { return map[key]; } // Single value Variant[] opDispatch(string key, T) (T t ) if ( !isArray!T && !isTuple!T

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Jacob Carlborg
On 2012-04-06 20:52, Steven Schveighoffer wrote: Also, if I see: @square(5) int foo(); How do I know that I have to use __traits(getAttribute, foo, Area)? Isn't "square" the name of the attribute? In that case you would use: __traits(getAttribute, foo, square) -- /Jacob Carlborg

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Jacob Carlborg
On 2012-04-07 00:40, Piotr Szturmaj wrote: Ok, but it needs more work in the compiler, comparing to identifier search and remembering expression tuple of a symbol. Also, I just found a major drawback of this approach: consider parameterless attributes like @NotNull. What would you return from fu

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Piotr Szturmaj
Jacob Carlborg wrote: On 2012-04-07 00:40, Piotr Szturmaj wrote: Ok, but it needs more work in the compiler, comparing to identifier search and remembering expression tuple of a symbol. Also, I just found a major drawback of this approach: consider parameterless attributes like @NotNull. What w

Re: Discussion on Go and D

2012-04-07 Thread Rainer Schuetze
On 4/7/2012 12:44 AM, Manu wrote: On 7 April 2012 01:08, Rainer Schuetze mailto:r.sagita...@gmx.de>> wrote: I don't think there are many places in the code where these hints might apply. Are there known ways of hunting down false references? Still, my main concern are the slow col

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread deadalnix
Le 07/04/2012 13:32, Kapps a écrit : On Saturday, 7 April 2012 at 11:13:54 UTC, deadalnix wrote: Le 07/04/2012 05:29, Kapps a écrit : I slightly prefer this function method over the struct method because: 1) No need to generate a custom struct for everything. Plenty of things are just a true or

Re: Discussion on Go and D

2012-04-07 Thread Rainer Schuetze
On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: On 07.04.2012 2:08, Rainer Schuetze wrote: On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could give me some hints to avoid the memory bloat

Re: Discussion on Go and D

2012-04-07 Thread Manu
On 7 April 2012 17:03, Jacob Carlborg wrote: > On 2012-04-06 19:37, Rainer Schuetze wrote: > >> >> GC issues like this are currently blocking development of Visual D (a >> Win32 project): when just adding spaces to a file, parsing the new file >> every other second often needs 10 or more parsings

Re: Discussion on Go and D

2012-04-07 Thread Manu
On 7 April 2012 17:38, Rainer Schuetze wrote: > > > On 4/7/2012 12:44 AM, Manu wrote: > >> On 7 April 2012 01:08, Rainer Schuetze > > wrote: >> >>I don't think there are many places in the code where these hints >>might apply. Are there known ways of hunting dow

Re: Discussion on Go and D

2012-04-07 Thread Dmitry Olshansky
On 07.04.2012 18:43, Rainer Schuetze wrote: On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: On 07.04.2012 2:08, Rainer Schuetze wrote: On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could

D and Heterogeneous Computing

2012-04-07 Thread Josh Klontz
Greetings! As someone with a research interest in software abstractions for image processing, the D programming language appears to offer unsurpassed language features for constructing beautiful and efficient programs. With that said, what would really get me to abandon C++ is if D supported a

Re: DIP16: Transparently substitute module with package

2012-04-07 Thread Jacob Carlborg
On 2012-04-07 02:25, Jonathan M Davis wrote: On Friday, April 06, 2012 08:09:28 Steven Schveighoffer wrote: I feel like most people will still import the main package module, and not the submodules. I don't think I ever wrote a piece of java code that didn't have: import java.io.*; Which is

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Jacob Carlborg
On 2012-04-07 05:29, Kapps wrote: I slightly prefer this function method over the struct method because: 1) No need to generate a custom struct for everything. Plenty of things are just a true or false, or a string. Saves a little bit of TypeInfo generation. But you still need to create a func

Re: Discussion on Go and D

2012-04-07 Thread Rainer Schuetze
On 4/6/2012 6:20 PM, deadalnix wrote: Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302 Andrei I did some measurement on that point for D lately : http://www.deadalnix.me/2012/03/0

Re: Discussion on Go and D

2012-04-07 Thread Manu
On 7 April 2012 19:04, Dmitry Olshansky wrote: > On 07.04.2012 18:43, Rainer Schuetze wrote: > >> >> >> On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: >> >>> On 07.04.2012 2:08, Rainer Schuetze wrote: >>> On 4/6/2012 8:01 PM, Walter Bright wrote: > On 4/6/2012 10:37 AM, Rain

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Jacob Carlborg
On 2012-04-07 13:32, Kapps wrote: This is not possible currently. The TypeInfo is required at runtime whether or not the type is used at compile-time, for reasons such as Object.factory. Object.factory can only create instances of classes. -- /Jacob Carlborg

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread Jacob Carlborg
On 2012-04-07 16:30, Piotr Szturmaj wrote: Jacob Carlborg wrote: On 2012-04-07 00:40, Piotr Szturmaj wrote: Ok, but it needs more work in the compiler, comparing to identifier search and remembering expression tuple of a symbol. Also, I just found a major drawback of this approach: consider pa

Re: Discussion on Go and D

2012-04-07 Thread Jacob Carlborg
On 2012-04-07 17:41, Manu wrote: On 7 April 2012 17:03, Jacob Carlborg mailto:d...@me.com>> wrote: On 2012-04-06 19:37, Rainer Schuetze wrote: GC issues like this are currently blocking development of Visual D (a Win32 project): when just adding spaces to a file, pa

Re: Discussion on Go and D

2012-04-07 Thread Dmitry Olshansky
On 07.04.2012 20:51, Manu wrote: [snip] I totally understand this sentiment, and unless GC improves by an order of magnitude it is not going to work well with large to medium-scale apps. Particularly long running ones, I once had been running VisualD for about 16 hours straight (b

Re: Discussion on Go and D

2012-04-07 Thread Walter Bright
On 4/7/2012 7:43 AM, Rainer Schuetze wrote: I'm rather unhappy to sell D with the hint "Go back to manual memory management if you need more than 64MB of memory and want your application to be responsive." Sure, that's why I said it was a workaround, not a solution.

Re: DIP16: Transparently substitute module with package

2012-04-07 Thread Jonathan M Davis
On Saturday, April 07, 2012 18:45:15 Jacob Carlborg wrote: > On 2012-04-07 02:25, Jonathan M Davis wrote: > > On Friday, April 06, 2012 08:09:28 Steven Schveighoffer wrote: > >> I feel like most people will still import the main package module, and > >> not > >> the submodules. I don't think I eve

openssl example for D

2012-04-07 Thread lzzll
Prior work: 1. Download OpenSSL D interface from https://github.com/D-Programming-Deimos/openssl and extract 2. install openssl-static (or other package inclued /usr/lib/libssl.a and /usr/lib/libcrypto.a) 3. before compile, put your source file into D-Programming-Deimos-openssl-xxx or use -I/x

Re: openssl example for D

2012-04-07 Thread David Nadlinger
On Saturday, 7 April 2012 at 17:55:29 UTC, lzzll wrote: 2. PEM_read... are broken (ld error), the example use sha256 to verify certificate. What exactly are the error messages you get? David

Re: openssl example for D

2012-04-07 Thread lzzll
What exactly are the error messages you get? dmd test_client.d -w -L-lssl -L-lcrypto -L-ldl && ./test_client test_client.o: In function `_D11test_client10verifyCertFPS6deimos7openssl4x5097x509_stZb': test_client.d:(.text._D11test_client10verifyCertFPS6deimos7openssl4x5097x509_stZb+0x2e): undef

Re: Discussion on Go and D

2012-04-07 Thread Sean Kelly
On Apr 7, 2012, at 9:04 AM, Dmitry Olshansky wrote: > > I totally understand this sentiment, and unless GC improves by an order of > magnitude it is not going to work well with large to medium-scale apps. > Particularly long running ones, I once had been running VisualD for about 16 > hours st

Re: Discussion on Go and D

2012-04-07 Thread Sean Kelly
On Apr 7, 2012, at 9:45 AM, Rainer Schuetze wrote: > > > On 4/6/2012 6:20 PM, deadalnix wrote: >> Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : >>> A few more samples of people's perception of the two languages: >>> >>> http://news.ycombinator.com/item?id=3805302 >>> >>> >>> Andrei >>

Re: D and Heterogeneous Computing

2012-04-07 Thread Robert Jacques
On Sat, 07 Apr 2012 11:38:15 -0500, Josh Klontz wrote: Greetings! As someone with a research interest in software abstractions for image processing, the D programming language appears to offer unsurpassed language features for constructing beautiful and efficient programs. With that said, what

Re: Discussion on Go and D

2012-04-07 Thread Rainer Schuetze
On 4/7/2012 8:26 PM, Sean Kelly wrote: On Apr 7, 2012, at 9:45 AM, Rainer Schuetze wrote: On 4/6/2012 6:20 PM, deadalnix wrote: Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302

Re: uploading with curl

2012-04-07 Thread Jonas Drewsen
Answers below: On Friday, 6 April 2012 at 13:24:03 UTC, Gleb wrote: Hello guys, I'm trying to use curl library to satisfy my file transfer needs under Windows 7. I've spent all the day and the most of functionality I have already tried works like a charm. But I have a few issues with "upload"

Re: uploading with curl

2012-04-07 Thread Andrei Alexandrescu
On 4/7/12 3:14 PM, Jonas Drewsen wrote: I've created a pull requests to get it upstream. Merged: https://github.com/D-Programming-Language/phobos/pull/528 Andrei

TickDuration.to's second template parameter

2012-04-07 Thread Andrei Alexandrescu
Whenever I use TickDuration.to, I need to add the pesky second argument, e.g. TickDuration.to!("nsecs", uint). Would a default make sense there? Also, double doesn't work, although I sometimes could use that. Thoughts? Destroyers? Andrei

Re: Discussion on Go and D

2012-04-07 Thread Chad J
On 04/06/2012 02:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could give me some hints to avoid the memory bloat and the application stalls. A couple of things you can try (they are workarounds, not sol

Re: Discussion on Go and D

2012-04-07 Thread Andrei Alexandrescu
On 4/7/12 4:26 PM, Chad J wrote: I keep reading that 'delete' is going to go away. Is this even future-proof, or is code written in this fashion going to suffer a reckoning later on? Biggest confusions in the history of humankind: 1. Pyramids have been built by aliens; 2. Flying with a device

Re: Discussion on Go and D

2012-04-07 Thread Timon Gehr
On 04/07/2012 04:43 PM, Rainer Schuetze wrote: On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: On 07.04.2012 2:08, Rainer Schuetze wrote: On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you cou

Re: Precise GC

2012-04-07 Thread Andrei Alexandrescu
On 4/7/12 9:59 PM, Walter Bright wrote: On 4/7/2012 7:58 PM, Chad J wrote: Hey, that sounds awesome. I think I geeked out a bit. Would this make it any easier to reference count types that can be statically proven to have no cyclical references? It has nothing to do with reference counting t

Re: Discussion on Go and D

2012-04-07 Thread Chad J
On 04/07/2012 05:42 PM, Andrei Alexandrescu wrote: On 4/7/12 4:26 PM, Chad J wrote: I keep reading that 'delete' is going to go away. Is this even future-proof, or is code written in this fashion going to suffer a reckoning later on? Biggest confusions in the history of humankind: 1. Pyramids

More ddoc complaints

2012-04-07 Thread Adam D. Ruppe
I have a pull request up to remove the big misfeature of embedded html in ddoc, and it is pending action, from me, to answer some of Walter's concerns. But, I was updating the documentation for some of my code (using std.ddoc and my improveddoc post-processor to make it prettier and remove Javasc

a pretty exciting result for parallel D lang rmd following defrag by name

2012-04-07 Thread Jay Norwood
These are measured times to unzip and then delete a 2GB folder in Win7. Both are using the parallel rmd to remove the directory on a regular hard drive. The first measurement is for an unzip of the archive. The second is remove of the folder when no defrag has been done. The third is unzip o

Re: Precise GC

2012-04-07 Thread Andrei Alexandrescu
On 4/7/12 8:56 PM, Walter Bright wrote: [snip] I think this is an exciting idea, it will enable us to get a precise gc by enabling people to work on it in parallel rather than serially waiting for me. I'm also very excited about this design, and will make time to help with the library part of

Precise GC

2012-04-07 Thread Walter Bright
Of course, many of us have been thinking about this for a looong time, and what is the best way to go about it. The usual technique is for the compiler to emit some sort of table for each TypeInfo giving the layout of the object, i.e. where the pointers are. The general problem with these is t

Re: Precise GC

2012-04-07 Thread Walter Bright
On 4/7/2012 7:58 PM, Chad J wrote: Hey, that sounds awesome. I think I geeked out a bit. Would this make it any easier to reference count types that can be statically proven to have no cyclical references? It has nothing to do with reference counting that I can think of.

Re: DIP16: Transparently substitute module with package

2012-04-07 Thread Kapps
On Saturday, 7 April 2012 at 17:44:20 UTC, Jonathan M Davis wrote Like I said, some people do like to do it, but Eclipse doesn't like you to, and there are quite a few Java folks who argue that it's bad practice. I forget what the reasons were (maybe increased buld times due to pulling in mor

Re: Precise GC

2012-04-07 Thread Chad J
Hey, that sounds awesome. I think I geeked out a bit. Would this make it any easier to reference count types that can be statically proven to have no cyclical references?

Re: Precise GC

2012-04-07 Thread Andrei Alexandrescu
On 4/7/12 9:49 PM, Andrei Alexandrescu wrote: On 4/7/12 8:56 PM, Walter Bright wrote: [snip] I think this is an exciting idea, it will enable us to get a precise gc by enabling people to work on it in parallel rather than serially waiting for me. I'm also very excited about this design, and wi

Re: Precise GC

2012-04-07 Thread Froglegs
That sounds cool, perhaps people can have customizable GC for specific applications? Looking forward to D having a precise GC

Re: TickDuration.to's second template parameter

2012-04-07 Thread Kapps
On Saturday, 7 April 2012 at 20:59:48 UTC, Andrei Alexandrescu wrote: Whenever I use TickDuration.to, I need to add the pesky second argument, e.g. TickDuration.to!("nsecs", uint). Would a default make sense there? Also, double doesn't work, although I sometimes could use that. Thoughts? Des

std.benchmark ready for review. Manager sought after

2012-04-07 Thread Andrei Alexandrescu
Hello, I finally found the time to complete std.benchmark. I got to a very simple API design, starting where I like it: one line of code. Code is in the form of a pull request at https://github.com/D-Programming-Language/phobos/pull/529. (There's some noise in there caused by my git n00bine

Re: Discussion on Go and D

2012-04-07 Thread Sean Kelly
On Apr 7, 2012, at 12:37 PM, Rainer Schuetze wrote: > > > On 4/7/2012 8:26 PM, Sean Kelly wrote: >> On Apr 7, 2012, at 9:45 AM, Rainer Schuetze wrote: >> >>> >>> >>> On 4/6/2012 6:20 PM, deadalnix wrote: Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : > A few more samples of peo

Re: TickDuration.to's second template parameter

2012-04-07 Thread Jonathan M Davis
On Saturday, April 07, 2012 15:59:57 Andrei Alexandrescu wrote: > Whenever I use TickDuration.to, I need to add the pesky second argument, > e.g. TickDuration.to!("nsecs", uint). Would a default make sense there? Well TickDuration.nsecs is a wrapper for TickDuration.to!("nsecs", long"), TickDurat

Re: TickDuration.to's second template parameter

2012-04-07 Thread Jonathan M Davis
On Saturday, April 07, 2012 15:59:57 Andrei Alexandrescu wrote: > Whenever I use TickDuration.to, I need to add the pesky second argument, > e.g. TickDuration.to!("nsecs", uint). Would a default make sense there? > > Also, double doesn't work, although I sometimes could use that. > > > Thoughts?

Re: std.benchmark ready for review. Manager sought after

2012-04-07 Thread Vladimir Panteleev
On Sunday, 8 April 2012 at 03:25:16 UTC, Andrei Alexandrescu wrote: Hello, I finally found the time to complete std.benchmark. I got to a very simple API design, starting where I like it: one line of code. Nice, some comments: 1) Is it possible to do something about the "kilonanoseconds",

Re: TickDuration.to's second template parameter

2012-04-07 Thread Kapps
On Sunday, 8 April 2012 at 04:09:45 UTC, Jonathan M Davis wrote: As for double, it should work. SHOO had had functions similar to seconds, msecs, usecs, and nsecs which defaulted to real, but I removed them a while back, because it made it too confusing to keep them all straight. But to should

Re: TickDuration.to's second template parameter

2012-04-07 Thread Jonathan M Davis
On Sunday, April 08, 2012 06:45:20 Kapps wrote: > On Sunday, 8 April 2012 at 04:09:45 UTC, Jonathan M Davis wrote: > > As for double, it should work. SHOO had had functions similar > > to seconds, > > msecs, usecs, and nsecs which defaulted to real, but I removed > > them a while > > back, because

Re: std.benchmark ready for review. Manager sought after

2012-04-07 Thread Andrei Alexandrescu
On 4/7/12 11:45 PM, Vladimir Panteleev wrote: On Sunday, 8 April 2012 at 03:25:16 UTC, Andrei Alexandrescu wrote: Hello, I finally found the time to complete std.benchmark. I got to a very simple API design, starting where I like it: one line of code. Nice, some comments: 1) Is it possible

Small Buffer Optimization for string and friends

2012-04-07 Thread Andrei Alexandrescu
Walter and I discussed today about using the small string optimization in string and other arrays of immutable small objects. On 64 bit machines, string occupies 16 bytes. We could use the first byte as discriminator, which means that all strings under 16 chars need no memory allocation at all

Re: custom attribute proposal (yeah, another one)

2012-04-07 Thread foobar
After reading the thread my vote goes to the struct proposal. The two approaches functions vs. structs are functionally equivalent but conceptually structs are preferable. Attributes are meta _data_ which is conceptually associated with types whereas functions are conceptually associated with b

Re: Small Buffer Optimization for string and friends

2012-04-07 Thread Daniel Murphy
"Andrei Alexandrescu" wrote in message news:jlr9ak$28bv$1...@digitalmars.com... > Walter and I discussed today about using the small string optimization in > string and other arrays of immutable small objects. > > On 64 bit machines, string occupies 16 bytes. We could use the first byte > as di