Re: float equality

2011-02-20 Thread Kevin Bealer
== Quote from Walter Bright (newshou...@digitalmars.com)'s article ... > I do understand that if you have a full symbolic representation, you can do so > with zero losses. But Kevin's proposal was not that, it was for a ratio > representation. > > All it represents symbolically is division. There a

Re: Linking COFF and OMF

2011-02-20 Thread Don
Trass3r wrote: I guess it linked printf with DMC's printf in snn.lib though, so there might be some problems with foreign RTLs when one goes too far. Can we replace snn with the other RTL? In 2.052 several of the most complicated dependencies on snn.lib (those relating to exception handling)

Re: Linking COFF and OMF

2011-02-20 Thread Trass3r
I guess it linked printf with DMC's printf in snn.lib though, so there might be some problems with foreign RTLs when one goes too far. Can we replace snn with the other RTL?

Re: float equality

2011-02-20 Thread Walter Bright
dsimcha wrote: You, my friend, have obviously never used a computer algebra system (my favorite is Maxima) at all seriously. I'm not saying it's a practical solution in the context of this discussion, but it is a possible solution in a lot of cases. Basically, if you can't compute something

Re: float equality

2011-02-20 Thread dsimcha
On 2/20/2011 11:32 PM, Walter Bright wrote: Kevin Bealer wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article Kevin Bealer wrote: You could switch to this: struct { BigInt numerator; BigInt denominator; }; Bingo -- no compromise. It cannot represent irrational numbers a

Re: float equality

2011-02-20 Thread Walter Bright
Kevin Bealer wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article Kevin Bealer wrote: You could switch to this: struct { BigInt numerator; BigInt denominator; }; Bingo -- no compromise. It cannot represent irrational numbers accurately. True but I did mention t

Re: Feature request: "noexport" keyword

2011-02-20 Thread Bernard Helyer
On Sun, 20 Feb 2011 16:50:25 -0500, Nick Sabalausky wrote: > Keep in mind though, I have *no* idea how "extern(...)" fits in to all > of this. The linkage is separate to the access and will continue when you change from export to public.

Re: float equality

2011-02-20 Thread Kevin Bealer
== Quote from Walter Bright (newshou...@digitalmars.com)'s article > Kevin Bealer wrote: > > You could switch to this: > > > > struct { > > BigInt numerator; > > BigInt denominator; > > }; > > > > Bingo -- no compromise. > It cannot represent irrational numbers accurately. True but I did m

Comparison vector ops

2011-02-20 Thread bearophile
Are comparison operators too going vectorial? void main() { int[5] a1, a2, a3; bool[5] b1, b2; ubyte[5] u1, u2; a1 = [1, 2, 3, 4, 5]; a2 = [5, 2, 1, 4, 4]; b1 = a1[] > 3; assert(b1 == [false, false, false, true, true]); u1 = a1[] > 3; assert(u1 == [0, 0, 0, 1,

Re: O(N) GC: The patch

2011-02-20 Thread bearophile
Jason House: > How does it effect other cases? I have asked for the timings for a small benchmark, and the results are good (see the issue in Bugzilla). Bye, bearophile

Re: 64bit phobos on Windows?

2011-02-20 Thread bearophile
Andrej Mitrovic: > I'm sorry for hijacking this topic guys. :p > > I am getting somewhere though. GDC changeset 475, using GCC 4.5.0 with > applied TDM-GCC 4.5.0 patches, with built gmp, mpc and mpftr. The > Windows build documentation needs an update (I'll fix it myself given > the chance). If

Re: O(N) GC: The patch

2011-02-20 Thread Jason House
Sounds promising. How does it effect other cases? Some typical GC-heavy benchmark? Lots of smaller no scan objects that are just under your optimization threshold? dsimcha Wrote: > http://d.puremagic.com/issues/show_bug.cgi?id=5623 > > I've found a way to speed up the GC massively on large hea

Re: 64bit phobos on Windows?

2011-02-20 Thread Andrej Mitrovic
K, I've reported the bug.

Re: 64bit phobos on Windows?

2011-02-20 Thread Andrej Mitrovic
I'm sorry for hijacking this topic guys. :p I am getting somewhere though. GDC changeset 475, using GCC 4.5.0 with applied TDM-GCC 4.5.0 patches, with built gmp, mpc and mpftr. The Windows build documentation needs an update (I'll fix it myself given the chance). I've gotten build errors after: m

Re: Hidden links for Language Reference on d-programming-language.org

2011-02-20 Thread Tyro[a.c.edwards]
On 2/21/2011 7:47 AM, Tyro[a.c.edwards] wrote: The links for Documentation: Language Reference gets hidden when you click on any of the following four items: o Lexical o Templates o Inline Assembler o Documentation Comments - Andrew By the way you cannot get to the list by clicking on Languag

Re: float equality

2011-02-20 Thread bearophile
Walter: > MISRA is not suggesting having the language silently default to approximate > equality. Right. But I am not suggesting that, in what I have suggested there is nothing silent :-) Given: double x, y; I have suggested in D: x == y => syntax error. x is y => the same FP equality as t

Re: 64bit phobos on Windows?

2011-02-20 Thread Iain Buclaw
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article > Now I've tried GCC v3.4.5, applied gcc-4.4.0-20080731-pex-win32.patch, > applied the TDM GCC 3.4.5 patches, and I get the same thing: > --- > cc1d.exe - Application Error > --- > T

Hidden links for Language Reference on d-programming-language.org

2011-02-20 Thread Tyro[a.c.edwards]
The links for Documentation: Language Reference gets hidden when you click on any of the following four items: o Lexical o Templates o Inline Assembler o Documentation Comments - Andrew

Re: float equality

2011-02-20 Thread Walter Bright
spir wrote: Is there any plan for them in D2 in the future? If you want to work on a library module that supports them, please have a go!

Re: float equality

2011-02-20 Thread Jérôme M. Berger
Kevin Bealer wrote: > == Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article > ... >> It may be that you would still end up with situations where two values that >> you >> would think would be the same aren't due to rounding error or whatnot. >> However, >> with a fixed point value, you w

Re: 64bit phobos on Windows?

2011-02-20 Thread Jérôme M. Berger
Andrej Mitrovic wrote: > No I did that. And I've patched GCC 3.4.5. > > This step causes the crash at the end: make STAGE1_CFLAGS="-g3 -O0" > 2>&1 | tee build.log > > Log: > checking If /gdc/dev/build/gcc/./gcc/gdc -B/gdc/dev/build/gcc/./gcc/ > -L/gdc/dev/build/gcc/i686-pc-mingw32/winsup/mingw >

Linking COFF and OMF

2011-02-20 Thread Dmitry Olshansky
I just took a stab at linking together different object formats with UniLink. Well, it just works(tm). So I may suggest to anyone having to link with precompiled COFF static libs on windows to try it out. For starters I just replaced most of my kernel32.lib, shell32.lib etc with Microsoft SDK

Re: float equality

2011-02-20 Thread spir
On 02/20/2011 09:43 PM, Walter Bright wrote: Jonathan M Davis wrote: It may be that you would still end up with situations where two values that you would think would be the same aren't due to rounding error or whatnot. However, with a fixed point value, you wouldn't have the problem where a par

Re: Feature request: "noexport" keyword

2011-02-20 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:ijs2f1$5ri$1...@digitalmars.com... > "Bekenn" wrote in message > news:ijrjh2$20sv$1...@digitalmars.com... >> On 2/19/2011 11:30 PM, Nick Sabalausky wrote: >>> "Bekenn" wrote in message >>> news:ijqffm$6lk$1...@digitalmars.com... >>> I'm not 100% certain,

Re: Feature request: "noexport" keyword

2011-02-20 Thread Nick Sabalausky
"Bekenn" wrote in message news:ijrjh2$20sv$1...@digitalmars.com... > On 2/19/2011 11:30 PM, Nick Sabalausky wrote: >> "Bekenn" wrote in message >> news:ijqffm$6lk$1...@digitalmars.com... >> I'm not 100% certain, but I think this should already do what you want: >> >> export extern (Windows): >>

Re: tooling quality and some random rant

2011-02-20 Thread Walter Bright
nedbrek wrote: Hope that helps, Thanks, this is great info!

Re: 64bit phobos on Windows?

2011-02-20 Thread Andrej Mitrovic
Now I've tried GCC v3.4.5, applied gcc-4.4.0-20080731-pex-win32.patch, applied the TDM GCC 3.4.5 patches, and I get the same thing: --- cc1d.exe - Application Error --- The application failed to initialize properly (0xc005). Click on OK to termin

Re: compile dmd 2.052 under Windows XP (32bit) -- error !

2011-02-20 Thread Walter Bright
David Wang wrote: Why my doc version is ver 8.42n ? It should be 8.52c when I download it from http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm852c.zip, right ? http://www.digitalmars.com/faq.html#version

Re: float equality

2011-02-20 Thread Walter Bright
Kevin Bealer wrote: You could switch to this: struct { BigInt numerator; BigInt denominator; }; Bingo -- no compromise. It cannot represent irrational numbers accurately.

Re: float equality

2011-02-20 Thread Walter Bright
Jonathan M Davis wrote: It may be that you would still end up with situations where two values that you would think would be the same aren't due to rounding error or whatnot. However, with a fixed point value, you wouldn't have the problem where a particular value could not be held in it even i

Re: float equality

2011-02-20 Thread Walter Bright
bearophile wrote: There's a total lack of evidence for that. MISRA-C standard disallows the equality among FP values. I presume they have some serious evidence for their choices, but I don't know such evidence. Today MISRA-C is one of the most serious attempts at fixing the holes in C language

Re: O(N) GC: The patch

2011-02-20 Thread Steven Schveighoffer
On Sun, 20 Feb 2011 15:19:24 -0500, dsimcha wrote: http://d.puremagic.com/issues/show_bug.cgi?id=5623 I've found a way to speed up the GC massively on large heaps without excessive ripple effects. Technically it's still O(N), but with about a hundred fold smaller constant in the case of l

Re: float equality

2011-02-20 Thread Walter Bright
Jonathan M Davis wrote: There's way too much to worry about. I don't _want_ to have to be worrying about rounding error and that sort of thing. I generally want to do whatever calculations I need to do for a particular task and be done with it. Math doesn't interest me enough for me to want to

Re: Stupid little iota of an idea

2011-02-20 Thread Justin Bogner
Don writes: > I don't like interval at all, because I don't think it includes the > notion of 'stepping'. An interval is just, everything from A to B, > without necessarily specifying how you reach everything in that > interval. Whereas iota includes the stepping. > (I would like to see intervals

O(N) GC: The patch

2011-02-20 Thread dsimcha
http://d.puremagic.com/issues/show_bug.cgi?id=5623 I've found a way to speed up the GC massively on large heaps without excessive ripple effects. Technically it's still O(N), but with about a hundred fold smaller constant in the case of large heaps with most stuff not scanned. Now, I think t

Re: Do findSplit, findSplitBefore, and findSplitAfter make until unnecessary?

2011-02-20 Thread Andrei Alexandrescu
On 2/20/11 12:20 AM, Jonathan M Davis wrote: With the most recent release, we got findSplit, findSplitBefore, and findSplitAfter in std.algorithm, which are all very useful and cool. However, in light of what they can do, I'm wondering if we really need std.algorithm.until? It seems to me that t

Re: 64bit phobos on Windows?

2011-02-20 Thread Andrej Mitrovic
No I did that. And I've patched GCC 3.4.5. This step causes the crash at the end: make STAGE1_CFLAGS="-g3 -O0" 2>&1 | tee build.log Log: checking If /gdc/dev/build/gcc/./gcc/gdc -B/gdc/dev/build/gcc/./gcc/ -L/gdc/dev/build/gcc/i686-pc-mingw32/winsup/mingw -L/gdc/dev/build/gcc/i686-pc-mingw32/wins

Re: 64bit phobos on Windows?

2011-02-20 Thread Iain Buclaw
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article > cc1d.exe crashed after an hour of building. > Right, I'll stop trying now. Mutters something about needing to compile gmp, mpfr (and probably mpc for 4.5) before attempting to build gdc on Windows.

Re: DMD and 64-bit

2011-02-20 Thread Don
Steven Schveighoffer wrote: On Sat, 19 Feb 2011 19:21:05 -0500, Nick Sabalausky wrote: "Jonathan M Davis" wrote in message news:mailman.1787.1298108224.4748.digitalmar...@puremagic.com... On Saturday 19 February 2011 01:12:25 Russel Winder wrote: > Am I correct in assuming that DMD generates

Re: 64bit phobos on Windows?

2011-02-20 Thread Andrej Mitrovic
cc1d.exe crashed after an hour of building. Right, I'll stop trying now.

Re: float equality

2011-02-20 Thread Kevin Bealer
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article ... > It may be that you would still end up with situations where two values that > you > would think would be the same aren't due to rounding error or whatnot. > However, > with a fixed point value, you wouldn't have the problem wher

Re: Feature request: "noexport" keyword

2011-02-20 Thread Bekenn
On 2/19/2011 11:30 PM, Nick Sabalausky wrote: "Bekenn" wrote in message news:ijqffm$6lk$1...@digitalmars.com... I'm not 100% certain, but I think this should already do what you want: export extern (Windows): void func1(); int func2(); public: void func3(); void func4(); Hmm... I think y

Re: 64bit phobos on Windows?

2011-02-20 Thread Andrej Mitrovic
If I get this thing working I'll post binaries and a batch/shell script that does all the work automatically. I really don't understand the point of using MSYS and then writing a 2-page guide even though MSYS has a working shell interpreter.

Re: GC.forget() (Was: O(N) Garbage collection?)

2011-02-20 Thread Steven Schveighoffer
On Sat, 19 Feb 2011 22:39:10 -0500, Nick Sabalausky wrote: "bearophile" wrote in message news:ijpkh8$232r$1...@digitalmars.com... dsimcha: Yeh, I rebuilt the same model in my head over the past few hours (like you, I had a good mental model of the GC at one point but have slowly forgotten i

Re: Feature request: "noexport" keyword

2011-02-20 Thread Steven Schveighoffer
On Sun, 20 Feb 2011 02:19:39 -0500, Bekenn wrote: The "export" keyword is a protection attribute, along with "private", "package", "protected", and "public". This means that it can be used with the same syntax as any of those other attributes; for instance, if creating a D "header" for an

Re: Mac OSX std.datetime / Posix daylight variable

2011-02-20 Thread Jacob Carlborg
On 2011-02-20 13:53, Michel Fortin wrote: On 2011-02-20 00:11:11 -0500, Jonathan M Davis said: Posix defines the tzset function along with a few helper items. From the Linux man page: extern int daylight; extern long timezone; extern char *tzname[2]; void tzset(void); It seems that while the

Re: [OT] Webpage design and "Name That Color!"

2011-02-20 Thread Jacob Carlborg
On 2011-02-20 03:53, Nick Sabalausky wrote: I've been updating the docs for my Goldie project in preparation of a new release, and figured the they looked a bit...sterile, so I've tweaked the CSS a bit. And, well, I think I've stumbled upon a heisencolor...(or a heisenhue, rather) Without readin

Re: Simple .d file passed in -m32 model, but failed in -m64 model. Why?

2011-02-20 Thread David Nadlinger
On 2/20/11 3:25 PM, David Wang wrote: Why the same source file shows different results? Because the array index »i« in your foreach loop is of type size_t, which is uint (32 bit wide) on x86_32 and ulong (64 bit wide) on x86_64. By the way, using D2, a shorter way to initialize the array wou

Simple .d file passed in -m32 model, but failed in -m64 model. Why?

2011-02-20 Thread David Wang
Thank you Brad Roberts, at first I remove MinGW's PATHs in my system, and then I successfully compiled the DMD, then I added back the MinGW's PATHs to the system. :-) But, when I in Linux (Fedora 14 X86_64) system, I compiled a simple d file in 32bit model and 64 bit model I got different result

Re: float equality

2011-02-20 Thread Jonathan M Davis
On Sunday 20 February 2011 05:21:12 spir wrote: > On 02/20/2011 06:17 AM, Jonathan M Davis wrote: > > On Saturday 19 February 2011 20:46:50 Walter Bright wrote: > >> bearophile wrote: > >>> Walter: > That'll just trade one set of problems for another. > >>> > >>> But the second set of problem

Re: Mac OSX std.datetime / Posix daylight variable

2011-02-20 Thread Jonathan M Davis
On Sunday 20 February 2011 04:53:03 Michel Fortin wrote: > On 2011-02-20 00:11:11 -0500, Jonathan M Davis said: > > Posix defines the tzset function along with a few helper items. From the > > Linux man page: > > > > extern int daylight; > > extern long timezone; > > extern char *tzname[2]; > > v

Re: float equality

2011-02-20 Thread spir
On 02/20/2011 06:17 AM, Jonathan M Davis wrote: On Saturday 19 February 2011 20:46:50 Walter Bright wrote: bearophile wrote: Walter: That'll just trade one set of problems for another. But the second set of problems may be smaller :-) There's a total lack of evidence for that. Furthermore,

Re: DMD versions

2011-02-20 Thread Jérôme M. Berger
Russel Winder wrote: > On Fri, 2011-02-18 at 13:20 +, Lars T. Kyllingstad wrote: >> On Fri, 18 Feb 2011 08:08:46 -0500, Steven Schveighoffer wrote: >> >>> On Fri, 18 Feb 2011 07:56:46 -0500, Matthias Pleh >>> wrote: >>> >>> There is the special Token __VERSION__ which gives an integer. >>

Re: Mac OSX std.datetime / Posix daylight variable

2011-02-20 Thread Michel Fortin
On 2011-02-20 00:11:11 -0500, Jonathan M Davis said: Posix defines the tzset function along with a few helper items. From the Linux man page: extern int daylight; extern long timezone; extern char *tzname[2]; void tzset(void); It seems that while these _are_ Posix, not all Posix systems decla

Re: float equality

2011-02-20 Thread bearophile
Walter: > There's a total lack of evidence for that. MISRA-C standard disallows the equality among FP values. I presume they have some serious evidence for their choices, but I don't know such evidence. Today MISRA-C is one of the most serious attempts at fixing the holes in C language to writ

Re: compile dmd 2.052 under Windows XP (32bit) -- error !

2011-02-20 Thread Brad Roberts
win32.mak is only intended for use with the digitalmars version of make, not gnu make. It's shipped with both dmd and dmc. On 2/20/2011 4:29 AM, David Wang wrote: > Sorry, I think I should post my question here except "digitalmars.D.bugs". > > I've installed dmc and dmd2 by the "dinstaller.exe"

compile dmd 2.052 under Windows XP (32bit) -- error !

2011-02-20 Thread David Wang
Sorry, I think I should post my question here except "digitalmars.D.bugs". I've installed dmc and dmd2 by the "dinstaller.exe" from http://ftp.digitalmars.com/dinstaller.exe After finished, I downloaded the latest dmd, druntime and phobos from github.com When I try to compile the dmd source thro

Re: [OT] Webpage design and "Name That Color!"

2011-02-20 Thread Simen kjaeraas
Nick Sabalausky wrote: ...and reply with what color you think the background looks like (the main background, not the sidebar). And whether or not you like it would be helpful, too, of course. Dirty light gray. It's easy on the eyes, and provides good contrast. I like it. -- Simen

Re: DMD and 64-bit

2011-02-20 Thread Russel Winder
On Sat, 2011-02-19 at 15:28 -0800, Walter Bright wrote: > Russel Winder wrote: > > Am I correct in assuming that DMD generates 32-bit by default and that > > for 64-bit you have to give the -m64 option? > > > > Is the eventual plan to use the natural word length of the platform as > > the default,

Re: [OT] Webpage design and "Name That Color!"

2011-02-20 Thread spir
On 02/20/2011 03:53 AM, Nick Sabalausky wrote: I've been updating the docs for my Goldie project in preparation of a new release, and figured the they looked a bit...sterile, so I've tweaked the CSS a bit. And, well, I think I've stumbled upon a heisencolor...(or a heisenhue, rather) Without rea

Re: Do findSplit, findSplitBefore, and findSplitAfter make until unnecessary?

2011-02-20 Thread Tomek Sowiński
Jonathan M Davis napisał: > Does anyone have a good reason why the findSplit* functions don't make until > obsolete and unnecessary? Until is lazy, findSplit* are not. -- Tomek

Re: Stupid little iota of an idea

2011-02-20 Thread Nick Sabalausky
"Don" wrote in message news:ijmndc$3e5$1...@digitalmars.com... > Nick Sabalausky wrote: >> >> I like "interval", too. >> >> I do think the name "iota" is a nice extra reason to just use a..b or >> a..b:c like you say. It also makes it clear that it's a series of >> discrete values rather than

Re: float equality

2011-02-20 Thread Jonathan M Davis
On Sunday 20 February 2011 01:20:34 Walter Bright wrote: > Jonathan M Davis wrote: > > Regardless, I'm glad that I don't generally have to do much in the way of > > math- centric programming. > > Why not? I enjoyed it. There's way too much to worry about. I don't _want_ to have to be worrying ab

Re: 64bit phobos on Windows?

2011-02-20 Thread Anders F Björklund
Iain Buclaw wrote: I wish someone released prebuilt versions. Compiling GCC on Windows is a PITA. Windows is a PITA, period. I tried using it as an everyday OS the other week. Something that I will never try again any time soon... Fortunately one can run MinGW on other platforms, even if c

Re: O(N) Garbage collection?

2011-02-20 Thread Simen kjaeraas
Nick Sabalausky wrote: Ahh, I was confusing "gene" with "chromosome" (and probably still got the exact number wrong ;) ). That you did. Humans have 23 chromosome pairs. But now you know! -- Simen

Re: 64bit phobos on Windows?

2011-02-20 Thread Johannes Pfau
Andrej Mitrovic wrote: >On 2/20/11, Trass3r wrote: >>> I'm very interested in trying out GDC with D2 on Win32. I fear >>> compiling GDC is gonna be tricky though. Has anyone had success with >>> it? Hand me a few tips before I venture into the unknown, please! >>> (and if I'm successful I'll uploa

Re: Optional module names export list

2011-02-20 Thread Dmitry Olshansky
On 20.02.2011 3:48, spir wrote: On 02/20/2011 12:46 AM, bearophile wrote: In a Python module if you define a name with a starting underscore, that name will be private to that module, and it will not be imported if a command "from module_name import *" is used: class Name1: pass def name2():

Re: 64bit phobos on Windows?

2011-02-20 Thread Johannes Pfau
Andrej Mitrovic wrote: >On 2/20/11, Trass3r wrote: >>> I'm very interested in trying out GDC with D2 on Win32. I fear >>> compiling GDC is gonna be tricky though. Has anyone had success with >>> it? Hand me a few tips before I venture into the unknown, please! >>> (and if I'm successful I'll uploa

Re: float equality

2011-02-20 Thread Walter Bright
Jonathan M Davis wrote: Regardless, I'm glad that I don't generally have to do much in the way of math- centric programming. Why not? I enjoyed it.