Re: Std Phobos 2 and logging library?

2009-04-10 Thread Frank Benoit
Andrei Alexandrescu schrieb: > Zz wrote: >> Hi, >> >> Are there any plans for a logging library in Std Phobos 2.0? >> >> Zz > > I wanted to add logging support for a while now but am undecided about > the API to use. Log4J is quite popular but quite complicated. There are > a number of simpler API

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Rioshin an'Harthen
"Leandro Lucarella" kirjoitti viestissä news:20090411030416.ga22...@homero.springfield.home... BTW, is there any real interest in adding some more power to the GC implementator to allow some kind of moving or generational collector? What I mostly want/need from the GC would be determinism. I w

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Don
dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article Leandro Lucarella wrote: Christopher Wright, el 10 de abril a las 16:18 me escribiste: BLS wrote: Zz wrote: Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz Why ask. Phobos is a o

weird behavior for machine epsilon in float, double and real

2009-04-10 Thread Andrew Spott
So, for the following code, I get something I think is a little off. I get the same value for all three variable types. I'm kind of new to this, but I would think that a 32 bit would give me a different "smallest value" than a 64 bit or 80 bit (if real even evaluates to 80 bit on my machine).

Re: Std Phobos 2 and logging library?

2009-04-10 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > Leandro Lucarella wrote: > > Christopher Wright, el 10 de abril a las 16:18 me escribiste: > >> BLS wrote: > >>> Zz wrote: > Hi, > > Are there any plans for a logging library in Std Phobos 2.0? > > >>>

Re: Std Phobos 2 and logging library?

2009-04-10 Thread dsimcha
== Quote from Leandro Lucarella (llu...@gmail.com)'s article > Andrei Alexandrescu, el 10 de abril a las 16:49 me escribiste: > > >And Braddr just made a documentation fix, and Walter only commits > > >portability stuff and an occasional bug fix now and then, so... > > >Yes, it really looks like a

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Robert Jacques
On Fri, 10 Apr 2009 23:04:16 -0400, Leandro Lucarella wrote: I hope I can come up with something useful with my thesis (improving D's GC) and I can contribute that. Right now all my energies are focused on that, and I'm very close to the point to finally start playing with alternate implementat

Re: demangle tool

2009-04-10 Thread Andrei Alexandrescu
Michel Fortin wrote: On 2009-04-10 17:25:30 -0400, Andrei Alexandrescu said: Curiously, I didn't find a need for them in std.algorithm so far. I only defined sameHead, and that's only to help a little improvement in the bringToFront algorithm. I've written a few parsers where I repeat this

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Andrei Alexandrescu
Leandro Lucarella wrote: BTW, is there any real interest in adding some more power to the GC implementator to allow some kind of moving or generational collector? That would be awesome! Here are some good starting points on how to allow better GC support in D: http://d.puremagic.com/issues/sh

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Leandro Lucarella
Andrei Alexandrescu, el 10 de abril a las 16:49 me escribiste: > >And Braddr just made a documentation fix, and Walter only commits > >portability stuff and an occasional bug fix now and then, so... > >Yes, it really looks like a five-person show =) > >I think most work in Phobos now it's done by A

Re: demangle tool

2009-04-10 Thread Michel Fortin
On 2009-04-10 17:25:30 -0400, Andrei Alexandrescu said: Curiously, I didn't find a need for them in std.algorithm so far. I only defined sameHead, and that's only to help a little improvement in the bringToFront algorithm. I've written a few parsers where I repeat this pattern a lot:

Re: The new, new phobos sneak preview

2009-04-10 Thread Andrei Alexandrescu
bearophile wrote: Andrei Alexandrescu: Then please vote up my comment which shows a solution that is simple *and* efficient :o). Does it work with (the keys of) an AA too? For example: int[double] aa = [3.0:0, 4:0, 7:0, 11:0, 3:0, 2:0, 5:0]; auto r = reduce!(min, max)(aa); No, AAs are poorly

Re: The new, new phobos sneak preview

2009-04-10 Thread Andrei Alexandrescu
bearophile wrote: Andrei Alexandrescu: Then please vote up my comment which shows a solution that is simple *and* efficient :o). I am not registered there, so I can't vote, I guess. Generally I don't like reduce() HOF, because it generally leads to less readable code (and often people use it

Re: demangle tool

2009-04-10 Thread Andrei Alexandrescu
Jason House wrote: It looks useful, especially when using rdmd. Why does rdmd require that the file end in .d? That seems limiting, especially when I want to make an executable file that looks like other executables in linux... aka no extension at all. Andrei Alexandrescu wrote: I wrote

Re: The new, new phobos sneak preview

2009-04-10 Thread bearophile
Andrei Alexandrescu: > Then please vote up my comment which shows a solution that is simple > *and* efficient :o). Does it work with (the keys of) an AA too? For example: int[double] aa = [3.0:0, 4:0, 7:0, 11:0, 3:0, 2:0, 5:0]; auto r = reduce!(min, max)(aa); Bye, bearophile

Re: The new, new phobos sneak preview

2009-04-10 Thread bearophile
Andrei Alexandrescu: > Then please vote up my comment which shows a solution that is simple > *and* efficient :o). I am not registered there, so I can't vote, I guess. Generally I don't like reduce() HOF, because it generally leads to less readable code (and often people use it only to compute

Re: demangle tool

2009-04-10 Thread Jason House
It looks useful, especially when using rdmd. Why does rdmd require that the file end in .d? That seems limiting, especially when I want to make an executable file that looks like other executables in linux... aka no extension at all. Andrei Alexandrescu wrote: > I wrote a simple utility (at

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Andrei Alexandrescu
Leandro Lucarella wrote: Christopher Wright, el 10 de abril a las 16:18 me escribiste: BLS wrote: Zz wrote: Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz Why ask. Phobos is a one man show. In other word, Phobos is an ego-lib. In case that you want something special, as

Re: The new, new phobos sneak preview

2009-04-10 Thread Andrei Alexandrescu
bearophile wrote: For even bigger data you may use muds: "On the Complexity of Processing Massive, Unordered, Distributed Data", by Jon Feldman, S. Muthukrishnan, Anastasios Sidiropoulos, Cliff Stein, Zoya Svitkina: http://arxiv.org/abs/cs.CC/0611108 I've developed a skepticism towards arxiv.o

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Leandro Lucarella
Christopher Wright, el 10 de abril a las 16:18 me escribiste: > BLS wrote: > >Zz wrote: > >>Hi, > >> > >>Are there any plans for a logging library in Std Phobos 2.0? > >> > >>Zz > >Why ask. Phobos is a one man show. In other word, Phobos is an ego-lib. > >In case that you want something special, as

Re: The new, new phobos sneak preview

2009-04-10 Thread Andrei Alexandrescu
bearophile wrote: Walter Bright: This C++0x article is relevant for comparison: http://www.reddit.com/r/programming/comments/8bijk/gcc_c0x_features_exploration/ "Advanced" features have to be used only if they improve the code. I don't like that little article and the following discussion.

Re: The new, new phobos sneak preview

2009-04-10 Thread bearophile
For even bigger data you may use muds: "On the Complexity of Processing Massive, Unordered, Distributed Data", by Jon Feldman, S. Muthukrishnan, Anastasios Sidiropoulos, Cliff Stein, Zoya Svitkina: http://arxiv.org/abs/cs.CC/0611108 Bye, bearophile

Re: Stack tracing on Linux ?

2009-04-10 Thread Georg Wrede
Fawzi Mohamed wrote: On 2009-04-03 19:24:25 +0200, Christopher Wright said: Georg Wrede wrote: Fawzi Mohamed wrote: Well inlined functions will have no frame, also last call optimization (tail optimization) removes the frame. If I were to write a compiler, then using "-g -debug", etc. woul

Re: The new, new phobos sneak preview

2009-04-10 Thread bearophile
Walter Bright: > This C++0x article is relevant for comparison: > http://www.reddit.com/r/programming/comments/8bijk/gcc_c0x_features_exploration/ "Advanced" features have to be used only if they improve the code. I don't like that little article and the following discussion. The following D1 co

Re: The new, new phobos sneak preview

2009-04-10 Thread Walter Bright
This C++0x article is relevant for comparison: http://www.reddit.com/r/programming/comments/8bijk/gcc_c0x_features_exploration/

0.8967502 Look In Here Now ... 0.8901139

2009-04-10 Thread iwantsex
0.633 Look In Here Now ... 0.3814552 0.8967502 Now Visit Tobacco Is Drugs 0.8901139

Re: demangle tool

2009-04-10 Thread Andrei Alexandrescu
Sergey Gromov wrote: Thu, 09 Apr 2009 13:40:36 -0700, Andrei Alexandrescu wrote: The line wraps are all garbled, but you get the idea: all symbols quoted `like this' have been demangled appropriately. Below is the source of the demangle script: #!/home/andrei/bin/rdmd import std.algorithm, s

Re: demangle tool

2009-04-10 Thread Sergey Gromov
Thu, 09 Apr 2009 13:40:36 -0700, Andrei Alexandrescu wrote: > The line wraps are all garbled, but you get the idea: all symbols quoted > `like this' have been demangled appropriately. Below is the source of > the demangle script: > > #!/home/andrei/bin/rdmd > import std.algorithm, std.demangle,

Re: bindings/win32, RAS, error 632

2009-04-10 Thread Leonid Krashenko
That said, on re-reading your original post, I can guess what you're doing wrong: trying to work around the missing extern (C) attributes in ras.d instead of fixing them. And consequently, merely renaming the functions and not actually fixing the calling convention. I got it to link by fi

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Christopher Wright
BLS wrote: Zz wrote: Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz Why ask. Phobos is a one man show. In other word, Phobos is an ego-lib. In case that you want something special, ask the tango folks. ( beside, logging is avail. there for quite a while) Björn It's a

Re: Proposal: fixing the 'pure' floating point problem.

2009-04-10 Thread Philip Miess
Don wrote: Philip Miess wrote: Walter Bright wrote: Don wrote: That's true, but if you're in a floatingpoint module, and you call a non-floatingpoint module, it's your responsibility to make sure that the rounding mode is back to normal. You're saying that you don't care about the status fla

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Sean Kelly
== Quote from BLS (windev...@hotmail.de)'s article > Zz wrote: > > Hi, > > > > Are there any plans for a logging library in Std Phobos 2.0? > > > Why ask. Phobos is a one man show. Phobos has never been a one-man show. Either way, you're guaranteed not to get what you want if you don't even bothe

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Steven Schveighoffer
On Fri, 10 Apr 2009 12:20:46 -0400, Andrei Alexandrescu wrote: Zz wrote: Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz I wanted to add logging support for a while now but am undecided about the API to use. Log4J is quite popular but quite complicated. There are

Re: Proposal: fixing the 'pure' floating point problem.

2009-04-10 Thread Philip Miess
Denis Koroskin wrote: On Sat, 04 Apr 2009 15:19:46 +0400, Philip Miess wrote: of course my example makes no sense try pure float square(float x, invariant roundingMode round = default) { return x*x; } in case that helps Phil I don't see roundingMode used anywhere in your example.

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Leandro Lucarella
Andrei Alexandrescu, el 10 de abril a las 09:20 me escribiste: > Zz wrote: > >Hi, > >Are there any plans for a logging library in Std Phobos 2.0? > >Zz > > I wanted to add logging support for a while now but am undecided about the > API > to use. Log4J is quite popular but quite complicated. The

Re: bindings/win32, RAS, error 632

2009-04-10 Thread Stewart Gordon
Leonid Krashenko wrote: What value are you actually getting for RASENTRYNAME.sizeof? And does buf.sizeof give the same value as buf.length*RASENTRYNAME.sizeof, as it should? Yes, it does; RASENTRYNAME size = 532 WINVER = 0x501 (-version=WindowsXP) Which agrees with my calculation. Delph

Re: Latest news

2009-04-10 Thread Frits van Bommel
Vincent Richomme wrote: Hi, I am really sorry but I was following the newsgroups for a long time then I stopped 4 months ago and now there a too many news to read. So could someone tell me : 1) Have you merged the two libs tango and phobos, I mean does it use a common base ? Phobos for D2

Re: what are the most common bugs in your D apps?

2009-04-10 Thread dsimcha
== Quote from davidl (dav...@126.com)'s article > Actually I'm not sure about what kind of bugs my d apps usually have. But > I notice that the harmonia project(I now make it uptodate) gets the > problem of integer overlapping(actually I find it quite hard to detect and > fix). > What's your opinio

Latest news

2009-04-10 Thread Vincent Richomme
Hi, I am really sorry but I was following the newsgroups for a long time then I stopped 4 months ago and now there a too many news to read. So could someone tell me : 1) Have you merged the two libs tango and phobos, I mean does it use a common base ? 2) What is the status of D compilers, d

Re: what are the most common bugs in your D apps?

2009-04-10 Thread Nick Sabalausky
"Weed" wrote in message news:grlsqk$245...@digitalmars.com... > davidl ÐÉÛÅÔ: >> >> Actually I'm not sure about what kind of bugs my d apps usually have. >> But I notice that the harmonia project(I now make it uptodate) gets the >> problem of integer overlapping(actually I find it quite hard to d

Re: d_time2FILETIME

2009-04-10 Thread Andrei Alexandrescu
Andrei Alexandrescu wrote: ulong t = (dt - ticksFrom1601To1970) * (10_000_000 / TicksPerSecond); That must be addition, otherwise I go back in time to 1200 or so. Now everything works, thanks to all who answered. The upside of all this is that now setFileTimes works on both Windows an

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Adam D. Ruppe
On Fri, Apr 10, 2009 at 09:20:46AM -0700, Andrei Alexandrescu wrote: > If anyone has ideas and/or code to contribute, that would be great. I never understood why they should be complicated. Couldn't you just do something like (pseudocodeish): == enum LogLevel { Verbose, Warning, Error } FIL

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Andrei Alexandrescu
BLS wrote: Zz wrote: Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz Why ask. Phobos is a one man show. In other word, Phobos is an ego-lib. That's a rather random thing to say, particularly in wake of the recent concerted efforts to improve Phobos and to port it to new

Re: Std Phobos 2 and logging library?

2009-04-10 Thread Andrei Alexandrescu
Zz wrote: Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz I wanted to add logging support for a while now but am undecided about the API to use. Log4J is quite popular but quite complicated. There are a number of simpler APIs out there but I couldn't figure out which is

Re: d_time2FILETIME

2009-04-10 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Fri, 10 Apr 2009 10:07:20 -0400, Andrei Alexandrescu wrote: Hello, I want to port the function setFileTimes available in Phobos/Posix to Windows. Does anyone know of a simple way to convert a d_time value to a FILETIME value? d_time is Ticks since 1-1-1970 an

Re: Std Phobos 2 and logging library?

2009-04-10 Thread BLS
Zz wrote: Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz Why ask. Phobos is a one man show. In other word, Phobos is an ego-lib. In case that you want something special, ask the tango folks. ( beside, logging is avail. there for quite a while) Björn

Std Phobos 2 and logging library?

2009-04-10 Thread Zz
Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz

Re: d_time2FILETIME

2009-04-10 Thread Steven Schveighoffer
On Fri, 10 Apr 2009 10:07:20 -0400, Andrei Alexandrescu wrote: Hello, I want to port the function setFileTimes available in Phobos/Posix to Windows. Does anyone know of a simple way to convert a d_time value to a FILETIME value? d_time is Ticks since 1-1-1970 and FILETIME contains quan

Re: d_time2FILETIME

2009-04-10 Thread Denis Koroskin
On Fri, 10 Apr 2009 18:07:20 +0400, Andrei Alexandrescu wrote: > Hello, > > I want to port the function setFileTimes available in Phobos/Posix to > Windows. Does anyone know of a simple way to convert a d_time value to a > FILETIME value? d_time is Ticks since 1-1-1970 and FILETIME contains

d_time2FILETIME

2009-04-10 Thread Andrei Alexandrescu
Hello, I want to port the function setFileTimes available in Phobos/Posix to Windows. Does anyone know of a simple way to convert a d_time value to a FILETIME value? d_time is Ticks since 1-1-1970 and FILETIME contains quanta of 100-nanoseconds since 1-1-1601. So there's only some shifting an

Re: Compiler does some flow analysis with -O..?

2009-04-10 Thread Robert Fraser
Denis Koroskin wrote: BTW, that's a breaking change! XD Ssh!

Re: bindings/win32, RAS, error 632

2009-04-10 Thread Kagamin
Leonid Krashenko Wrote: > 2. used "implib rasapi32.lib rasapi32.def" with written by hand > rasapi32.def with following content (linkdef (don't know why) can't find > any of that symbols): you should use coffimplib

Re: demangle tool

2009-04-10 Thread bearophile
R: >While D still seems to be better off than C++ I guess something like this is >unavoidable with metaprogramming?< Lot of people have discussed about this topic, and some of them have even found some partial solutions, for example: http://www.ddj.com/cpp/184401416?pgno=1 Of course Andrei was a

Re: demangle tool

2009-04-10 Thread R
Hurm. I thought one of the things D had over C++ was that with aliases such complex error messages can be avoided. While D still seems to be better off than C++ I guess something like this is unavoidable with metaprogramming? Andrei Alexandrescu Wrote: > I wrote a simple utility (at the bottom

Re: AAs

2009-04-10 Thread Denis Koroskin
On Fri, 10 Apr 2009 03:44:06 +0400, Rainer Deyke wrote: bearophile wrote: You are right, there's a problem here, even once you have added an ".idup" to AAs. A hash value isn't data, it's metadata, so you may have a lazily computed mutable metadata of immutable data. Once computed the hash valu

Re: Array Appenders

2009-04-10 Thread Denis Koroskin
On Fri, 10 Apr 2009 11:00:01 +0400, Nick Sabalausky wrote: "Denis Koroskin" <2kor...@gmail.com> wrote in message news:op.ur2f3rglo7c...@korden-pc... On Wed, 08 Apr 2009 15:04:29 +0400, Frits van Bommel wrote: Andrei Alexandrescu wrote: Denis Koroskin wrote: Well, actually I think that hav

Re: Array Appenders

2009-04-10 Thread Nick Sabalausky
"Denis Koroskin" <2kor...@gmail.com> wrote in message news:op.ur2f3rglo7c...@korden-pc... > On Wed, 08 Apr 2009 15:04:29 +0400, Frits van Bommel > wrote: > >> Andrei Alexandrescu wrote: >>> Denis Koroskin wrote: Well, actually I think that having an Appender object is an overkill. I n