Re: Byte Order Swapping Function

2011-07-16 Thread Jonathan M Davis
On Saturday 16 July 2011 23:31:09 Andrew Wiley wrote: > On Sat, Jul 16, 2011 at 2:51 PM, Jonathan M Davis wrote: > > On Saturday 16 July 2011 15:38:29 Andrei Alexandrescu wrote: > > > Just paste the code here. > > > > This is what I have at the moment: > > > > import core.bitop; > > > > /++ > >

Re: Byte Order Swapping Function

2011-07-16 Thread Andrew Wiley
On Sat, Jul 16, 2011 at 2:51 PM, Jonathan M Davis wrote: > On Saturday 16 July 2011 15:38:29 Andrei Alexandrescu wrote: > > Just paste the code here. > > This is what I have at the moment: > > import core.bitop; > > /++ >Swaps the endianness of the given value. Any integral value, >charact

Re: function literals cannot be class members

2011-07-16 Thread Mehrdad
On 7/16/2011 2:01 PM, Andrei Alexandrescu wrote: On 7/16/11 10:50 AM, d coder wrote: Sorry for bumping. Want to know if there is a solution to the situation I face often. I think this is a reasonable thing to want, but it's difficult to implement technically. You want a comparitor with state

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread Johann MacDonagh
On 7/16/2011 4:36 PM, Andrej Mitrovic wrote: On 7/16/11, Johann MacDonagh wrote: On 7/16/2011 3:25 PM, Robert Clipsham wrote: On 16/07/2011 20:14, Andrej Mitrovic wrote: On 7/16/11, Johann MacDonagh wrote: Web 2.0: Dumbing down society one idiot at a time. Hey, where's the Facebook Like b

Re: Why do template mixins have their own scope?

2011-07-16 Thread Trass3r
I know but what is so bad about issuing an error message and you rename one of the two. As I said it doesn't work out as soon as functions are involved.

Re: Why do template mixins have their own scope?

2011-07-16 Thread Trass3r
Am 16.07.2011, 20:41 Uhr, schrieb Timon Gehr : Trass3r wrote: I guess this is the cause for http://d.puremagic.com/issues/show_bug.cgi?id=3332 It makes it practically impossible to mixin constructors because overload resolution doesn't work. mixin template foo(){ immutable x = 1;

Re: Imperative templates

2011-07-16 Thread Timon Gehr
On Saturday 16 July 2011 16:58:25 Robert Clipsham wrote: > So in several presentations given about D that I've seen there's a list > of supported paradigms given which looks something like this: > > - Imperative > - Metal > - Object-oriented > - RAII > - Functional > - Generic > - Gen

Re: ID3 library wrapper (taglib, id3lib, anything)

2011-07-16 Thread Walter Strom
Huge thank you, Andrej! The fact that you even wrote a full readme made me want to write the previous sentence in all caps with a row exclamation marks. I see now where I went wrong with it, and it's a good learning. ...ah, hell with it... THANK YOU On 16 July 2011 23:26, Andrej Mitrovic wr

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread so
On Sat, 16 Jul 2011 23:32:18 +0300, Andrei Alexandrescu wrote: I think that's actually good feedback. People usually don't mention that because they consider it politically incorrect. I've considered taking some enunciation classes but a speech pathologist I talked to said there's not a

Re: Imperative templates

2011-07-16 Thread Jonathan M Davis
On Saturday 16 July 2011 16:58:25 Robert Clipsham wrote: > So in several presentations given about D that I've seen there's a list > of supported paradigms given which looks something like this: > > - Imperative > - Metal > - Object-oriented > - RAII > - Functional > - Generic > - Ge

Re: Byte Order Swapping Function

2011-07-16 Thread Jonathan M Davis
On Saturday 16 July 2011 15:38:29 Andrei Alexandrescu wrote: > Just paste the code here. This is what I have at the moment: import core.bitop; /++ Swaps the endianness of the given value. Any integral value, character, or floating point value is accepted. +/ T swapEndian(T)(T val)

Re: Next in Review Queue: The New std.path

2011-07-16 Thread Jonathan M Davis
On Saturday 16 July 2011 19:39:13 Lars T. Kyllingstad wrote: > On Fri, 15 Jul 2011 20:08:03 -0700, Jonathan M Davis wrote: > > Names > > --- > > dirSeparator: > > I'd love to see this as something much shorter like dirSep. I think that > > dirSeparator is overly long - particularly for some

Re: function literals cannot be class members

2011-07-16 Thread Andrei Alexandrescu
On 7/16/11 10:50 AM, d coder wrote: Sorry for bumping. Want to know if there is a solution to the situation I face often. I think this is a reasonable thing to want, but it's difficult to implement technically. You want a comparitor with state (which is fine), but at the same time the state m

Re: std.getopt

2011-07-16 Thread Andrei Alexandrescu
On 7/16/11 8:58 AM, Jens Mueller wrote: Trass3r wrote: Why doesn't std.getopt support standard unix style like 'make -j 4'? "uint timeout; getopt(args, "timeout|t",&timeout); To set timeout to 5, use either of the following: --timeout=5, --timeout 5, --t=5, --t 5, or -t5. Forms such as -t 5 and

Re: Byte Order Swapping Function

2011-07-16 Thread Andrei Alexandrescu
On 7/16/11 3:39 AM, Jonathan M Davis wrote: On Thursday 14 July 2011 06:27:47 Andrei Alexandrescu wrote: On 7/14/11 5:51 AM, Regan Heath wrote: That's my point. I need 8/16/32/64/128 bit versions and it really would be better if there were general variants. My version are less than optimal, but

Re: D Programming Language Specification ebook

2011-07-16 Thread Nick Sabalausky
"Johannes Pfau" wrote in message news:20110715100709.3974cfd3@jpf-Satellite-A100... > >Prices for european customers are different, as amazon already includes >the roaming fees. ("free international wireless delivery via Amazon >Whispernet" isn't actually free, it's included in the book >price.)

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread Andrej Mitrovic
On 7/16/11, Johann MacDonagh wrote: > On 7/16/2011 3:25 PM, Robert Clipsham wrote: >> On 16/07/2011 20:14, Andrej Mitrovic wrote: >>> On 7/16/11, Johann MacDonagh wrote: > Web 2.0: Dumbing down society one idiot at a time. Hey, where's the Facebook Like button so I can share this? >>

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread Andrei Alexandrescu
On 7/16/11 12:19 AM, Nick Sabalausky wrote: "Vladimir Panteleev" wrote in message news:op.vyoyfir2tuz...@cybershadow.mshome.net... On Sat, 16 Jul 2011 05:16:35 +0300, Andrei Alexandrescu wrote: A reader pointed me to this post on a Russian site: http://designsfor.ru/2011/07/16/three-cool-t

Re: ID3 library wrapper (taglib, id3lib, anything)

2011-07-16 Thread Andrej Mitrovic
You never said anything about what OS you're running, but I'll assume you're on Windows since you're mentioning C#. Ask and you shall receive: https://github.com/AndrejMitrovic/DTagLib It took about 30 minutes of work. The sample application works for me, here's an example: D:\dev\projects\DTagL

Re: Prototype buildsystem "Drake"

2011-07-16 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:ivrm1t$1f20$2...@digitalmars.com... > On 2011-07-16 00:11, Nick Sabalausky wrote: >> "Jacob Carlborg" wrote in message >>> Hehe. I actually started using names of fruits for my projects (I have >>> an >>> unreleased library named "lime"), don't really know

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread Nick Sabalausky
"Johann MacDonagh" wrote in message news:ivs9ea$2i0j$3...@digitalmars.com... >> Web 2.0: Dumbing down society one idiot at a time. > > Hey, where's the Facebook Like button so I can share this? > I know "LOL"'s considered cliche', but dammit, I LOLed my ass off :)

Re: D emitter for Haxe?

2011-07-16 Thread Nick Sabalausky
"Byakkun" wrote in message news:op.vypl3jang1j16f@petru-pc... >On Sat, 16 Jul 2011 14:24:53 +0300, Byakkun wrote: >> On Sat, 16 Jul 2011 13:47:22 +0300, Robert M. Münch >> wrote: >> >>> Hi, has anyone ever thought about a D emitter for Haxe >>> (http://haxe.org)? >>> >>> I can imagine that th

Re: Next in Review Queue: The New std.path

2011-07-16 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 20:08:03 -0700, Jonathan M Davis wrote: > Names > --- > dirSeparator: > I'd love to see this as something much shorter like dirSep. I think that > dirSeparator is overly long - particularly for something which is likely > to be used primarily in longer expressions. > >

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread Johann MacDonagh
On 7/16/2011 3:25 PM, Robert Clipsham wrote: On 16/07/2011 20:14, Andrej Mitrovic wrote: On 7/16/11, Johann MacDonagh wrote: Web 2.0: Dumbing down society one idiot at a time. Hey, where's the Facebook Like button so I can share this? Don't you mean G+? :P [+1] :D With Andrei here I

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread Robert Clipsham
On 16/07/2011 20:14, Andrej Mitrovic wrote: On 7/16/11, Johann MacDonagh wrote: Web 2.0: Dumbing down society one idiot at a time. Hey, where's the Facebook Like button so I can share this? Don't you mean G+? :P [+1] :D -- Robert http://octarineparrot.com/

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread Andrej Mitrovic
On 7/16/11, Johann MacDonagh wrote: >> Web 2.0: Dumbing down society one idiot at a time. > > Hey, where's the Facebook Like button so I can share this? > > Don't you mean G+? :P

Re: Next in Review Queue: The New std.path

2011-07-16 Thread Andrej Mitrovic
I was quite fond of it being renamed to joinPath, because when I'm doing string processing on paths I import both std.algorithm/std.array and std.path, and so far I've always had conflicts with join() functions.

Re: Why do template mixins have their own scope?

2011-07-16 Thread Timon Gehr
Trass3r wrote: > I guess this is the cause for > http://d.puremagic.com/issues/show_bug.cgi?id=3332 > It makes it practically impossible to mixin constructors because overload > resolution doesn't work. mixin template foo(){ immutable x = 1; int bar(){return x;} } immutable x = 2; mixin

Why do template mixins have their own scope?

2011-07-16 Thread Trass3r
I guess this is the cause for http://d.puremagic.com/issues/show_bug.cgi?id=3332 It makes it practically impossible to mixin constructors because overload resolution doesn't work.

Re: Garbage collector throwing during collection

2011-07-16 Thread Sean Kelly
On Jul 14, 2011, at 7:21 AM, Robert Jacques wrote: > On Thu, 14 Jul 2011 08:39:06 -0400, Sean Kelly wrote: > >> On Jul 14, 2011, at 3:12 AM, Vladimir Panteleev wrote: >> >>> On Thu, 14 Jul 2011 09:58:09 +0300, Sönke Ludwig >>> wrote: >>> On DMD I got some strange out-of-memory errors wi

Re: Garbage collector throwing during collection

2011-07-16 Thread Sean Kelly
On Jul 14, 2011, at 7:05 AM, dsimcha wrote: > == Quote from Sean Kelly (s...@invisibleduck.org)'s article >> I started on the rewrite, but it's a pretty big change so I'm >> considering trying out Leandro's GC instead. It would require some work >> as well, but the code is cleaner and it already

Re: ID3 library wrapper (taglib, id3lib, anything)

2011-07-16 Thread Christian Manning
Walter Strom wrote: > There are no ID3 (audio tags, 'artist', 'title' et al editing) projects > for D. There was one called id3, but it was halted 3 years ago at alpha / > ID3v1. > > And there are mature Taglib & Id3lib, both written C++, but both with C > wrapper options. > > I've tried to make

ID3 library wrapper (taglib, id3lib, anything)

2011-07-16 Thread Walter Strom
There are no ID3 (audio tags, 'artist', 'title' et al editing) projects for D. There was one called id3, but it was halted 3 years ago at alpha / ID3v1. And there are mature Taglib & Id3lib, both written C++, but both with C wrapper options. I've tried to make a D wrapper around Taglib, but all i

Re: Coding Standards

2011-07-16 Thread Roman Ivanov
On 7/15/2011 12:46 PM, Walter Bright wrote: > On 7/15/2011 7:25 AM, Trass3r wrote: >> And there's lots of D code using that awkward >> if () { >> } >> >> style. Gross! > > I don't particularly like that style, either, but it's used in the ebook > because display size is extremely limited and it's

Re: Byte Order Swapping Function

2011-07-16 Thread Christian Manning
Andrew Wiley wrote: > On Sat, Jul 16, 2011 at 6:21 AM, Christian Manning > wrote: > >> Jonathan M Davis wrote: >> >> > On Thursday 14 July 2011 06:27:47 Andrei Alexandrescu wrote: >> >> On 7/14/11 5:51 AM, Regan Heath wrote: >> >> > That's my point. I need 8/16/32/64/128 bit versions and it reall

Imperative templates

2011-07-16 Thread Robert Clipsham
So in several presentations given about D that I've seen there's a list of supported paradigms given which looks something like this: - Imperative - Metal - Object-oriented - RAII - Functional - Generic - Generative - Concurrent (That list from http://assets.en.oreilly.com/1/event/45/T

Re: function literals cannot be class members

2011-07-16 Thread d coder
Sorry for bumping. Want to know if there is a solution to the situation I face often.

Re: A few comments on "Three Cool Things about D"

2011-07-16 Thread Johann MacDonagh
Web 2.0: Dumbing down society one idiot at a time. Hey, where's the Facebook Like button so I can share this?

Re: d-p-l.org statement.html

2011-07-16 Thread Johann MacDonagh
Easily. When it gives you a merge conflict, you just commit the file generated from the merge without dealing with the conflicts - or you do try and deal with the conflicts but you miss one. That sort of thing is caught very easily with code, because it's not going to compile with all of those

Re: d-p-l.org statement.html

2011-07-16 Thread Johann MacDonagh
Please report issues with the website at d.puremagic.com/issues Done. http://d.puremagic.com/issues/show_bug.cgi?id=6335

Re: Byte Order Swapping Function

2011-07-16 Thread Christian Manning
Andrew Wiley wrote: > On Sat, Jul 16, 2011 at 6:21 AM, Christian Manning > wrote: > >> Jonathan M Davis wrote: >> >> > On Thursday 14 July 2011 06:27:47 Andrei Alexandrescu wrote: >> >> On 7/14/11 5:51 AM, Regan Heath wrote: >> >> > That's my point. I need 8/16/32/64/128 bit versions and it reall

Re: Byte Order Swapping Function

2011-07-16 Thread Andrew Wiley
On Sat, Jul 16, 2011 at 6:21 AM, Christian Manning wrote: > Jonathan M Davis wrote: > > > On Thursday 14 July 2011 06:27:47 Andrei Alexandrescu wrote: > >> On 7/14/11 5:51 AM, Regan Heath wrote: > >> > That's my point. I need 8/16/32/64/128 bit versions and it really > would > >> > be better if th

Re: std.getopt

2011-07-16 Thread Jens Mueller
Trass3r wrote: > The following just came to my mind: > What about having getopt also generate a "Usage" string which you > can output if any cmdline argument parsing error occured? > Of course this would require adding a third field containing the > description. (which would also be self-documentin

Re: std.getopt

2011-07-16 Thread Jens Mueller
Trass3r wrote: > Why doesn't std.getopt support standard unix style like 'make -j 4'? > > "uint timeout; > getopt(args, "timeout|t", &timeout); > To set timeout to 5, use either of the following: --timeout=5, > --timeout 5, --t=5, --t 5, or -t5. Forms such as -t 5 and -timeout=5 > will be not acce

Re: Byte Order Swapping Function

2011-07-16 Thread Christian Manning
Jonathan M Davis wrote: > On Thursday 14 July 2011 06:27:47 Andrei Alexandrescu wrote: >> On 7/14/11 5:51 AM, Regan Heath wrote: >> > That's my point. I need 8/16/32/64/128 bit versions and it really would >> > be better if there were general variants. My version are less than >> > optimal, but do

Re: Prototype buildsystem "Drake"

2011-07-16 Thread Timon Gehr
Jacob Carlborg wrote: > On 2011-07-15 17:16, Andrei Alexandrescu wrote: >> On 7/15/11 7:58 AM, Jacob Carlborg wrote: >>> I'm not very familiar with Scala but I found this: >>> http://blog.darevay.com/2009/01/remedial-scala-interpreting-scala-from-scala/ >>> >> >> Interesting. What are the features

Re: std.getopt

2011-07-16 Thread Trass3r
The following just came to my mind: What about having getopt also generate a "Usage" string which you can output if any cmdline argument parsing error occured? Of course this would require adding a third field containing the description. (which would also be self-documenting)

Re: D emitter for Haxe?

2011-07-16 Thread Byakkun
On Sat, 16 Jul 2011 14:24:53 +0300, Byakkun wrote: On Sat, 16 Jul 2011 13:47:22 +0300, Robert M. Münch wrote: Hi, has anyone ever thought about a D emitter for Haxe (http://haxe.org)? I can imagine that this would be nice booster for D to get known to a bigger community and used in re

Re: D emitter for Haxe?

2011-07-16 Thread Byakkun
On Sat, 16 Jul 2011 13:47:22 +0300, Robert M. Münch wrote: Hi, has anyone ever thought about a D emitter for Haxe (http://haxe.org)? I can imagine that this would be nice booster for D to get known to a bigger community and used in real-life projects. I don't have any experience for Haxe

D emitter for Haxe?

2011-07-16 Thread Robert M. Münch
Hi, has anyone ever thought about a D emitter for Haxe (http://haxe.org)? I can imagine that this would be nice booster for D to get known to a bigger community and used in real-life projects. I don't have any experience for Haxe nor how to do emitter for it, but maybe someone already started

function literals cannot be class members

2011-07-16 Thread d coder
Greetings I have experienced that it becomes quite difficult to instantiate certain template structs/classes as members of another class/struct, when function/delegate need to be passed as a template parameter to the instantiated templates. For example if I wish to instantiate a binary heap, and I

Re: Prototype buildsystem "Drake"

2011-07-16 Thread Jacob Carlborg
On 2011-07-16 00:11, Nick Sabalausky wrote: "Jacob Carlborg" wrote in message Hehe. I actually started using names of fruits for my projects (I have an unreleased library named "lime"), don't really know why I chose Orbit. Fan of the Mango project? ;) Hehe, I've actually never used it. But

Re: Prototype buildsystem "Drake"

2011-07-16 Thread Jacob Carlborg
On 2011-07-16 00:07, Nick Sabalausky wrote: "Jacob Carlborg" wrote in message news:ivp0oa$3lq$1...@digitalmars.com... On 2011-07-14 21:15, Nick Sabalausky wrote: Ah, now I see. I'm hoping the user never needs to write import statements in the build script. It's just these little things that I

Re: Byte Order Swapping Function

2011-07-16 Thread Jonathan M Davis
On Thursday 14 July 2011 06:27:47 Andrei Alexandrescu wrote: > On 7/14/11 5:51 AM, Regan Heath wrote: > > That's my point. I need 8/16/32/64/128 bit versions and it really would > > be better if there were general variants. My version are less than > > optimal, but do use intrinsics where possible.

Re: Coding Standards

2011-07-16 Thread Andrew Wiley
On Fri, Jul 15, 2011 at 9:46 AM, Walter Bright wrote: > On 7/15/2011 7:25 AM, Trass3r wrote: > >> And there's lots of D code using that awkward >> if () { >> } >> >> style. Gross! >> > > I don't particularly like that style, either, but it's used in the ebook > because display size is extremely li