Re: reddit discussion about Go turns to D again

2011-05-14 Thread Russel Winder
On Sun, 2011-05-15 at 01:12 -0400, Nick Sabalausky wrote: [ . . . ] > Every time I look at Go^H^HIssue 9, I can't help wondering why there's > people out there who apparently assume that just because someone did > something significant 40 years ago somehow implies they have the Midas > touch. I

Re: reddit discussion about Go turns to D again

2011-05-14 Thread Paulo Pinto
You are to a certain extent right, but Go is appealing in a few ways. Many Go users are coming from C or scripting languages, so Go is an evolution for them, even if the language is a downgrade from major programming language features. Then many of the developers that are impressed by Go's multic

Re: [Newbie!!] can I embed a file in my ecutable?

2011-05-14 Thread Jimmy Cao
Write a .rc file, and compile it with rcc (from Digital Mars). That gives you a .res file. So, for example, let's say you want to embed yolk.zip into an exe. First, write yolk.rc with one line: 300 RCDATA "yolk.zip" Then run this: rcc yolk.rc Then do this: dmd egg.d yolk.res Then the egg.exe s

[Newbie!!] can I embed a file in my ecutable?

2011-05-14 Thread Digital Mars
Let's say I want to use to write a simple installer. Can I embed a Zip file inside my executable? If so, how? Thanks! :)

Re: reddit discussion about Go turns to D again

2011-05-14 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:iqmgq7$1fgn$1...@digitalmars.com... > http://www.reddit.com/r/programming/comments/hb6m8/google_io_2011_writing_web_apps_in_go/ > Heh, this is one of the best things I've read in quite some time: "This supports my guess that Google bought up a bunch o

Article Review: Migrating from std.date to std.datetime

2011-05-14 Thread Jonathan M Davis
It recently came to my attention that an article on converting code from using std.date to using std.datetime would be of value, so I wrote one up. Since it's an article, and it's within the time period set by Walter for the article contest, I guess that it's in the article contest, but I wrote

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 10:04, Andrei Alexandrescu wrote: > On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: > [snip] > > I updated my std.log draft. Added a lot of features including formatted > writing, delayed logging, and a variety of configuration options. > Replaced the redundant log.xyz with logXyz. The

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 5/14/11 7:13 PM, Brad Roberts wrote: On 5/14/2011 3:35 PM, Andrei Alexandrescu wrote: On 05/14/2011 04:56 PM, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 5/14/11 6:43 PM, Michel Fortin wrote: On 2011-05-14 18:35:32 -0400, Andrei Alexandrescu said: On 05/14/2011 04:56 PM, Michel Fortin wrote: I'll also question whether they should be written to files at all by default (as opposed to stdin and stderr). I'm aware initLogging's documentation sa

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 5/14/11 6:35 PM, Michel Fortin wrote: On 2011-05-14 13:04:54 -0400, Andrei Alexandrescu said: Documentation: http://d-programming-language.org/phobos-prerelease/std_log.html Source: https://github.com/andralex/phobos Feedback welcome. Shouldn't "everyMs" and "afterMs" accept any of co

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 16:35, Michel Fortin wrote: > On 2011-05-14 13:04:54 -0400, Andrei Alexandrescu > > said: > > Documentation: > > > > http://d-programming-language.org/phobos-prerelease/std_log.html > > > > Source: > > > > https://github.com/andralex/phobos > > > > Feedback welcome. > > Shouldn

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 15:33, Andrei Alexandrescu wrote: > On 05/14/2011 05:17 PM, Jonathan M Davis wrote: > > On 2011-05-14 14:56, Michel Fortin wrote: > >> On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: > >>> So, I do think that knowing which thread is logging what could be very > >>> important fo

Re: Implementing std.log

2011-05-14 Thread Brad Roberts
On 5/14/2011 3:35 PM, Andrei Alexandrescu wrote: > On 05/14/2011 04:56 PM, Michel Fortin wrote: >> On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: >> >>> So, I do think that knowing which thread is logging what could be very >>> important for some programs, but I don't think that separating t

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 06:36 PM, Michel Fortin wrote: On 2011-05-14 18:33:06 -0400, Andrei Alexandrescu said: On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: I'd even go further and question whether it makes sense to have info, warning, and errors be written

Re: Implementing std.log

2011-05-14 Thread Michel Fortin
On 2011-05-14 18:35:32 -0400, Andrei Alexandrescu said: On 05/14/2011 04:56 PM, Michel Fortin wrote: I'll also question whether they should be written to files at all by default (as opposed to stdin and stderr). I'm aware initLogging's documentation says: "If log­ging is ef­fected with­out ha

Re: reddit discussion about Go turns to D again

2011-05-14 Thread Adam Ruppe
Ugh, it annoys me so much that they do those long videos instead of some plain text! But, I watched parts of it, and I really wasn't impressed. They didn't use any interesting techniques - it was just a straight forward app using some uninteresting libraries. Even the HTTP server was incredibly pl

Re: Implementing std.log

2011-05-14 Thread Michel Fortin
On 2011-05-14 13:04:54 -0400, Andrei Alexandrescu said: Documentation: http://d-programming-language.org/phobos-prerelease/std_log.html Source: https://github.com/andralex/phobos Feedback welcome. Shouldn't "everyMs" and "afterMs" accept any of core.time's duration types instead of bein

Re: Implementing std.log

2011-05-14 Thread Michel Fortin
On 2011-05-14 18:33:06 -0400, Andrei Alexandrescu said: On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: I'd even go further and question whether it makes sense to have info, warning, and errors be written to separate files. I'd definitely vote for

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 04:56 PM, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I don't think that separating the log files is necessarily a good idea. If you did, you'd lo

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 05:17 PM, Jonathan M Davis wrote: On 2011-05-14 14:56, Michel Fortin wrote: On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I don't think that separating the log files is

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 14:56, Michel Fortin wrote: > On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: > > So, I do think that knowing which thread is logging what could be very > > important for some programs, but I don't think that separating the log > > files is necessarily a good idea. If you did, y

Re: Implementing std.log

2011-05-14 Thread Andrej Mitrovic
Your post just went asian on me. http://i.imgur.com/solwD.png

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 14:50, Andrei Alexandrescu wrote: > On 05/14/2011 04:31 PM, Jonathan M Davis wrote: > > On 2011-05-14 12:36, Andrei Alexandrescu wrote: > >> On 05/14/2011 01:29 PM, dsimcha wrote: > >>> On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: > On 5/9/11 1:52 AM, Andrei Alexandrescu wrot

Re: Implementing std.log

2011-05-14 Thread Michel Fortin
On 2011-05-14 17:31:30 -0400, Jonathan M Davis said: So, I do think that knowing which thread is logging what could be very important for some programs, but I don't think that separating the log files is necessarily a good idea. If you did, you'd lose timing information (unless the time is at t

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 04:31 PM, Jonathan M Davis wrote: On 2011-05-14 12:36, Andrei Alexandrescu wrote: On 05/14/2011 01:29 PM, dsimcha wrote: On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features incl

Re: Implementing std.log

2011-05-14 Thread Jonathan M Davis
On 2011-05-14 12:36, Andrei Alexandrescu wrote: > On 05/14/2011 01:29 PM, dsimcha wrote: > > On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: > >> On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: > >> [snip] > >> > >> I updated my std.log draft. Added a lot of features including formatted > >> writin

Re: reddit discussion about Go turns to D again

2011-05-14 Thread Paulo Pinto
On 14.05.2011 20:10, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/hb6m8/google_io_2011_writing_web_apps_in_go/ Andrei I have been playing lately with Go, and I must say that the language might be a good replacement for C usage with a more up to date language feature

Re: Implementing std.log

2011-05-14 Thread Robert Clipsham
On 14/05/2011 21:37, Andrei Alexandrescu wrote: On 05/14/2011 02:50 PM, Robert Clipsham wrote: On 14/05/2011 18:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging,

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 02:50 PM, Robert Clipsham wrote: On 14/05/2011 18:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced

Re: Phobos classes member declaration order

2011-05-14 Thread Andrej Mitrovic
I think you can use cscope or ctags for that (there's a plugin that can let you jump to definitions, not sure if it works for D since I forgot..). There's information on the wiki4d site. Search for "vim" and cscope/ctags.

Re: Implementing std.log

2011-05-14 Thread Robert Clipsham
On 14/05/2011 18:04, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implement

Re: Best build tool for D projects

2011-05-14 Thread Nick Sabalausky
"Robert Clipsham" wrote in message news:iqmkl7$1m4a$1...@digitalmars.com... > On 13/05/2011 22:56, Nick Sabalausky wrote: >> Xfbuild is abandoned (unless someone else has picked up the reins since >> the >> original author left), and it doesn't work for D2. > > xfbuild works perfectly well for D

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 05/14/2011 01:29 PM, dsimcha wrote: On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the red

Re: Best build tool for D projects

2011-05-14 Thread Robert Clipsham
On 13/05/2011 22:56, Nick Sabalausky wrote: Xfbuild is abandoned (unless someone else has picked up the reins since the original author left), and it doesn't work for D2. xfbuild works perfectly well for D2, it just requires D1/Tango to compile it. There are pre-compiled binaries available.

Re: Best build tool for D projects

2011-05-14 Thread Robert Clipsham
On 14/05/2011 20:16, Robert Clipsham wrote: I'm using redo to build my D stuff - https://github.com/apenwarr/redo. Ideally I'd port it to D then I could write my build scripts in D, I've not had chance though. To clarify, you can write build scripts in D using it as it is now - they just won't

Re: Builtin regex (Was: How to complex switch?)

2011-05-14 Thread Robert Clipsham
On 13/05/2011 17:52, Dmitry Olshansky wrote: When you've written a couple it doesn't take much to get it right in my experience. I don't find them hard to maintain personally, I guess that comes from experience though. What do you mean port? Literally code the same in another programming langua

Alias templates and anonymous delegates in pipe/map

2011-05-14 Thread Adrien Chauve
Hi, I've been playing with templates and I get some (really dumb) questions. By the way, I'm using dmd 2.053 64 bits on linux 64 bits. First, I didn't really get the difference between an alias template and a type template when they are both instanciated with a type. For example: File

Re: Implementing std.log

2011-05-14 Thread dsimcha
On 5/14/2011 1:04 PM, Andrei Alexandrescu wrote: On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implemen

reddit discussion about Go turns to D again

2011-05-14 Thread Andrei Alexandrescu
http://www.reddit.com/r/programming/comments/hb6m8/google_io_2011_writing_web_apps_in_go/ Andrei

Re: Implementing std.log

2011-05-14 Thread Andrei Alexandrescu
On 5/9/11 1:52 AM, Andrei Alexandrescu wrote: [snip] I updated my std.log draft. Added a lot of features including formatted writing, delayed logging, and a variety of configuration options. Replaced the redundant log.xyz with logXyz. The implementation is getting close to reviewable form. D

Re: Phobos classes member declaration order

2011-05-14 Thread Alexander
On 13.05.2011 23:48, Adam D. Ruppe wrote: > If you use vi or emacs I believe, you can use the % command to do > brace matching to jump right to the bottom. This requires that I've to position close to opening brace first, and this doesn't really help when declarations are in the middle, unfort

Re: Phobos classes member declaration order

2011-05-14 Thread Alexander
On 13.05.2011 23:51, Sean Kelly wrote: > I generally just declare the interface before implementation. Someone > inspecting the code should care more about what they can call than how it > works. This is true for someone who is not looking for how the code works and how it does things - whe

Re: Is alias equality inconsistent?

2011-05-14 Thread Timon Gehr
> Again, if you understand that value types are similar to immutable > references, it > makes sense. But I think that this behavior could as well be changed. Just realized that changing it would imply there would be no way to check for alias equality of two class reference references. It should r

Re: Is alias equality inconsistent?

2011-05-14 Thread Timon Gehr
> On 2011-05-13 17:28, Timon Gehr wrote: > > > The only value of is and static arrays that I can think of is if you can > > > use them to verify whether a dynamic array refers to a particular static > > > array. Other than that, what value do they add? If you're checking for > > > equality, then us

Re: Best build tool for D projects

2011-05-14 Thread Chris Molozian
Thanks for recommending Waf, I'll have a look at it. On 14/05/11 08:54, Russel Winder wrote: Chris, On Fri, 2011-05-13 at 18:38 +0100, Chris Molozian wrote: [ . . . ] * Jam (ftjam), cross-platform and platform independent build language. Lots of variants with the same name, the

Re: Best build tool for D projects

2011-05-14 Thread Chris Molozian
Thanks for the link to the project, I'll try it out. It's a shame there's no documentation for CDC but the Yage project is considerably more complex than my needs from a build tool, it's build script will be useful to read. On 13/05/11 21:11, Eric Poggel (JoeCoder) wrote: On 5/13/2011 1:38 PM

Re: Best build tool for D projects

2011-05-14 Thread Chris Molozian
Thanks for the update on xfBuild. On 13/05/11 21:28, Trass3r wrote: Am 13.05.2011, 19:38 Uhr, schrieb Chris Molozian : I'm not sure whether development on xfBuild is still going on. Well activity has certainly decreased lately but it still work

Re: Collateral exceptions seem to be broken

2011-05-14 Thread Rainer Schuetze
Stephan wrote: On 09.05.2011 20:05, Rainer Schuetze wrote: I suggest to even add debug symbols to the release build of phobos, as you also don't have debug info for non-template classes and structs declared inside phobos, even if your application is built with -g. Rainer That is a excellent

Re: Best build tool for D projects

2011-05-14 Thread Russel Winder
On Fri, 2011-05-13 at 17:56 -0400, Nick Sabalausky wrote: [ . . . ] > There are other good build systems that aren't targeted directly at D, like > Rake, SCons and A-A-P. But A-A-P's documentation is very difficult to > understand. Rake and SCons introduce a dependency on Ruby and Python, > resp

Re: Best build tool for D projects

2011-05-14 Thread Russel Winder
Chris, On Fri, 2011-05-13 at 18:38 +0100, Chris Molozian wrote: [ . . . ] > * Jam (ftjam), cross-platform and platform independent build > language. Lots of variants with the same name, therefore > finding it hard to find good tutorials and documentation. Everyone I know who