Re: stack frame optimization problem

2009-10-24 Thread sprucely
Okay, between gdb and obj2asm I've been able to figure out that the address placed in EAX in the following instructions... mov EAX, jumpTo; jmp EAX; is actually the address of the initialization function for jumpTo... byte* jumpTo = jumpHere; which is named

Re: No header files?

2009-10-24 Thread Yigal Chripun
On 24/10/2009 01:56, Simen Kjaeraas wrote: Yigal Chripun yigal...@gmail.com wrote: On 22/10/2009 18:52, BCS wrote: I'm cynical enough that I'd bet if D switches to a smarter lib format a lot of people would manage to forget the documentation. With the current system, the library must be

Re: No header files?

2009-10-24 Thread AJ
Leandro Lucarella llu...@gmail.com wrote in message news:20091023125658.ga23...@llucax.com.ar... AJ, el 22 de octubre a las 22:08 me escribiste: I'm still not clear on exactly what you plan on doing. Traditional (read C/C++ like) software development. If you plan on generating the

Re: IDE for D? Recommendations?

2009-10-24 Thread AJ
Tim Matthews tim.matthe...@gmail.com wrote in message news:hbtlah$2iu...@digitalmars.com... AJ wrote: Anyone have recommendations for which IDE to use to do an evaluation of D with? I don't need powerful capabilities as I'm just looking to write some code and get a feel for some things in

Re: Private enum members + Descent

2009-10-24 Thread Yigal Chripun
On 24/10/2009 01:16, Justin Johansson wrote: Sorry; subject line mod'ed just so Ary doesn't miss it. enum Color { private UNINITIALIZED = -1, RED, GREEN, BLUE } (btw. Interestingly, typing this code into Eclipse with the Descent plug-in causes a Java out of heap space malfunction.)

Re: Semicolons: mostly unnecessary? Also, language oriented programming

2009-10-24 Thread Yigal Chripun
On 24/10/2009 02:29, Bill Baxter wrote: On Fri, Oct 23, 2009 at 4:54 PM, Yigal Chripunyigal...@gmail.com wrote: On 23/10/2009 19:41, bearophile wrote: Yigal Chripun: The trade-off here is obvious: if you use line continuations like in python they would be very rare but would not be

LLVM 2.6 Release!

2009-10-24 Thread Justin Johansson
Looks like Christmas is arriving early this year folks ... just got this pressy from the LLVM team/Chris Lattner in my inbox. I'm sure a number of D people will be excited about this announcement. Cheers Justin Johansson Hi LLVM Friends, Fans, Followers and Fanatics, LLVM 2.6 is live! You can

Re: No header files?

2009-10-24 Thread Lionello Lunesu
On 22-10-2009 8:01, Walter Bright wrote: Yigal Chripun wrote: the only valid IMO use case for header files is for linking libs - the compiler can handle just find binary formats for that. I was originally going to go with a binary format for that - but it turned out to be pointless. dmd is so

Re: [OT] Re: Targeting C

2009-10-24 Thread Max Samukha
On Fri, 23 Oct 2009 13:08:06 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I wanted to use auto, but ddoc cannot document functions with auto returns. Andrei When I need to hack around an 'auto' bug, I sometimes factor out the return type to a template: template IotaRet(B,

Re: [OT] Re: Targeting C

2009-10-24 Thread Andrei Alexandrescu
Max Samukha wrote: On Fri, 23 Oct 2009 13:08:06 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I wanted to use auto, but ddoc cannot document functions with auto returns. Andrei When I need to hack around an 'auto' bug, I sometimes factor out the return type to a template:

Re: Private enum members + Descent

2009-10-24 Thread Ary Borenszweig
Justin Johansson wrote: Sorry; subject line mod'ed just so Ary doesn't miss it. enum Color { private UNINITIALIZED = -1, RED, GREEN, BLUE } (btw. Interestingly, typing this code into Eclipse with the Descent plug-in causes a Java out of heap space malfunction.) Thanks, fixed!

Re: LLVM 2.6 Release!

2009-10-24 Thread Moritz Warning
On Sat, 24 Oct 2009 06:36:42 -0400, Justin Johansson wrote: [..] Hi LLVM Friends, Fans, Followers and Fanatics, LLVM 2.6 is live! You can download it here: http://llvm.org/releases/ and read about it here: http://llvm.org/releases/2.6/docs/ReleaseNotes.html [..] \o/

Re: static arrays becoming value types

2009-10-24 Thread bearophile
Sorry for the late answer, I have missed your answer until now. dsimcha: Here's a way around that: To pass a static array by reference to a templated function that was written with generic ranges in mind, just slice it to make it a dynamic array: float[3] foo; pragma(msg,

Re: LLVM 2.6 Release!

2009-10-24 Thread Andrei Alexandrescu
Justin Johansson wrote: Looks like Christmas is arriving early this year folks ... just got this pressy from the LLVM team/Chris Lattner in my inbox. I'm sure a number of D people will be excited about this announcement. Cheers Justin Johansson Hi LLVM Friends, Fans, Followers and Fanatics,

Re: LLVM 2.6 Release!

2009-10-24 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article Justin Johansson wrote: Looks like Christmas is arriving early this year folks ... just got this pressy from the LLVM team/Chris Lattner in my inbox. I'm sure a number of D people will be excited about this

Re: Private enum members + Descent

2009-10-24 Thread Justin Johansson
Yigal Chripun Wrote: On 24/10/2009 01:16, Justin Johansson wrote: Sorry; subject line mod'ed just so Ary doesn't miss it. enum Color { private UNINITIALIZED = -1, RED, GREEN, BLUE } (btw. Interestingly, typing this code into Eclipse with the Descent plug-in causes a Java out of heap

Re: Private enum members + Descent

2009-10-24 Thread Denis Koroskin
On Sat, 24 Oct 2009 19:00:10 +0400, Justin Johansson n...@spam.com wrote: Yigal Chripun Wrote: On 24/10/2009 01:16, Justin Johansson wrote: Sorry; subject line mod'ed just so Ary doesn't miss it. enum Color { private UNINITIALIZED = -1, RED, GREEN, BLUE } (btw. Interestingly, typing

Re: LLVM 2.6 Release!

2009-10-24 Thread Moritz Warning
On Sat, 24 Oct 2009 09:40:03 -0500, Andrei Alexandrescu wrote: Justin Johansson wrote: Looks like Christmas is arriving early this year folks ... just got this pressy from the LLVM team/Chris Lattner in my inbox. I'm sure a number of D people will be excited about this announcement.

Re: Private enum members + Descent

2009-10-24 Thread Justin Johansson
Denis Koroskin Wrote: On Sat, 24 Oct 2009 19:00:10 +0400, Justin Johansson n...@spam.com wrote: Yigal Chripun Wrote: On 24/10/2009 01:16, Justin Johansson wrote: Sorry; subject line mod'ed just so Ary doesn't miss it. enum Color { private UNINITIALIZED = -1, RED, GREEN, BLUE }

Re: LLVM 2.6 Release!

2009-10-24 Thread Justin Johansson
Andrei Alexandrescu Wrote: Justin Johansson wrote: Looks like Christmas is arriving early this year folks ... just got this pressy from the LLVM team/Chris Lattner in my inbox. I'm sure a number of D people will be excited about this announcement. Cheers Justin Johansson

Re: Mini proposal: rename float.min to float.min_normal

2009-10-24 Thread Jeremie Pelletier
bearophile wrote: Don: such as X86_64 and D_InlineAsm_X86 I don't like the identifier that denotes D2 code (D_Version2). I never use it either, this identifier is rather pointless. Both compilers will still parse both conditions and errors on the branch for the other version. If there

Re: Mini proposal: rename float.min to float.min_normal

2009-10-24 Thread bearophile
Jeremie Pelletier: I never use it either, this identifier is rather pointless. Both compilers will still parse both conditions and errors on the branch for the other version. Sorry, as usual I want not precise enough, I meant I don't like the name of that identifier, but I use that

Re: Private enum members + Descent

2009-10-24 Thread Yigal Chripun
On 24/10/2009 17:10, Denis Koroskin wrote: On Sat, 24 Oct 2009 19:00:10 +0400, Justin Johansson n...@spam.com wrote: Yigal Chripun Wrote: On 24/10/2009 01:16, Justin Johansson wrote: Sorry; subject line mod'ed just so Ary doesn't miss it. enum Color { private UNINITIALIZED = -1, RED,

Re: LLVM 2.6 Release!

2009-10-24 Thread Denis Koroskin
On Sat, 24 Oct 2009 19:48:51 +0400, Justin Johansson n...@spam.com wrote: Andrei Alexandrescu Wrote: Justin Johansson wrote: Looks like Christmas is arriving early this year folks ... just got this pressy from the LLVM team/Chris Lattner in my inbox. I'm sure a number of D people will be

Re: No header files?

2009-10-24 Thread Leandro Lucarella
AJ, el 24 de octubre a las 01:44 me escribiste: Leandro Lucarella llu...@gmail.com wrote in message news:20091023125658.ga23...@llucax.com.ar... AJ, el 22 de octubre a las 22:08 me escribiste: I'm still not clear on exactly what you plan on doing. Ooops! No I don't! Yes, I will be

Re: Mini proposal: rename float.min to float.min_normal

2009-10-24 Thread Don
Jeremie Pelletier wrote: I agree, its a good change! I would also change float.min to be an alias of -float.max. Unfortunately, we can't do that yet, it would silently change the meaning of existing code. Hopefully it can be done eventually.

Getting All Instantiations of a Template

2009-10-24 Thread dsimcha
Is there currently a way in D2 to get the parameters of all instantiations of a template in a given scope? For example: class Foo { template instantiateMe(T) { void instantiateMe(T arg) {} } void foo() { int i; instantiateMe(i); } void bar() {

Re: Semicolons: mostly unnecessary? Also, language oriented programming

2009-10-24 Thread Nick Sabalausky
Yigal Chripun yigal...@gmail.com wrote in message news:hbuc2i$11p...@digitalmars.com... If we are at the topic of language syntax: Have you ever heard of MPS by Jetbrains? MPS (meta programming system) is a tool to design your own language complete with an IDE, and everything else you get

Re: Semicolons: mostly unnecessary? Also, language oriented programming

2009-10-24 Thread Nick Sabalausky
Yigal Chripun yigal...@gmail.com wrote in message news:hbuc2i$11p...@digitalmars.com... If we are at the topic of language syntax: Have you ever heard of MPS by Jetbrains? MPS (meta programming system) is a tool to design your own language complete with an IDE, and everything else you get for

Re: Private enum members + Descent

2009-10-24 Thread Justin Johansson
Yigal Chripun Wrote: On 24/10/2009 17:10, Denis Koroskin wrote: On Sat, 24 Oct 2009 19:00:10 +0400, Justin Johansson n...@spam.com wrote: Yigal Chripun Wrote: On 24/10/2009 01:16, Justin Johansson wrote: Sorry; subject line mod'ed just so Ary doesn't miss it. enum Color {

Re: LLVM 2.6 Release!

2009-10-24 Thread Justin Johansson
Denis Koroskin Wrote: On Sat, 24 Oct 2009 19:48:51 +0400, Justin Johansson n...@spam.com wrote: Andrei Alexandrescu Wrote: Justin Johansson wrote: Looks like Christmas is arriving early this year folks ... just got this pressy from the LLVM team/Chris Lattner in my inbox. I'm

Re: Private enum members + Descent

2009-10-24 Thread Michel Fortin
On 2009-10-24 18:45:10 -0400, Justin Johansson n...@spam.com said: Let me try again. You have a set of N things which are represented by an enum definition. There is some subset of this set containing M things (so M N) which represents the things meaningful in a public sense. The remaining

Re: Private enum members + Descent

2009-10-24 Thread Denis Koroskin
On Sun, 25 Oct 2009 02:22:51 +0300, Michel Fortin michel.for...@michelf.com wrote: On 2009-10-24 18:45:10 -0400, Justin Johansson n...@spam.com said: Let me try again. You have a set of N things which are represented by an enum definition. There is some subset of this set containing M

Re: stack frame optimization problem

2009-10-24 Thread sprucely
I've been able to determine that the trick, extern(C) byte jumpHere, is not providing the correct address. Since all my functions will have an identical stack frame, it will be easy enough to just hard code the proper offset. sprucely Wrote: Okay, between gdb and obj2asm I've been able to

Thread safety of alloca

2009-10-24 Thread dsimcha
Does anyone know if alloca() is by some chance not thread safe? I'm working on improving my parallelization library and I keep running into all kinds of erratic behavior (but not stack overflows) when I use alloca() instead of heap as an optimization, but when I disable this optimization,

Re: LLVM 2.6 Release!

2009-10-24 Thread Andrei Alexandrescu
Justin Johansson wrote: btw. What's the latest ETA for TDPL? Thank you for your interest. I plan to send a complete draft out on Nov 9. We're less stable with threads than I'd want, so probably the Nov 9 draft will not include the threads chapter. Then we'll pipeline reviews and editing

Re: LLVM 2.6 Release!

2009-10-24 Thread Andrei Alexandrescu
Justin Johansson wrote: Denis Koroskin Wrote: Amazon mentions March 15, 2010: http://www.amazon.com/exec/obidos/ASIN/0321635361/modecdesi-20 Thanks; just had a look at that link. Did Andrei give a preview of the table of contents somewhere? I'd certainly welcome a chapter (or at least a

Re: Thread safety of alloca

2009-10-24 Thread Denis Koroskin
On Sun, 25 Oct 2009 03:34:24 +0300, dsimcha dsim...@yahoo.com wrote: Does anyone know if alloca() is by some chance not thread safe? I'm working on improving my parallelization library and I keep running into all kinds of erratic behavior (but not stack overflows) when I use alloca()

Re: Thread safety of alloca

2009-10-24 Thread dsimcha
== Quote from Denis Koroskin (2kor...@gmail.com)'s article On Sun, 25 Oct 2009 03:34:24 +0300, dsimcha dsim...@yahoo.com wrote: Does anyone know if alloca() is by some chance not thread safe? I'm working on improving my parallelization library and I keep running into all kinds of

Re: Private enum members + Descent

2009-10-24 Thread Rainer Deyke
Denis Koroskin wrote: On Sun, 25 Oct 2009 02:22:51 +0300, Michel Fortin michel.for...@michelf.com wrote: Sounds like you want enum inheritance: one enum being a superset of another. :-) I was about to post the same thing. It was previously proposed, but it was rejected because it works

Re: [OT] What should be in a programming language?

2009-10-24 Thread Jason House
Yigal Chripun Wrote: On 23/10/2009 19:50, Jason House wrote: Yigal Chripun Wrote: snip transitive const and everything is const by default, immutable as part of the concurrency ownership design, functions would be defined as in ML: they take one tuple argument and return one tuple

Re: Problems linking C and D code

2009-10-24 Thread torhu
On 24.10.2009 15:02, Jan Stępień wrote: Hi all, I've got a problem with linking two object files on Windows with an external *.lib file. First one is compiled C code, second one is in D. I'm using D2. $ dmc -c first.c -I path/to/SDL/include $ dmd -c second.d First two commands create

Re: some questions about D

2009-10-24 Thread Luis P. Mendes
Thu, 22 Oct 2009 13:04:55 -0400, bearophile escreveu: Luis P. Mendes: I'm about to begin a project on artificial intelligence, decision trees and some other algorithmic stuff that needs runtime and development speed. Very good, D sounds fit for such kind of code. If you need development

[Issue 2862] ICE(template.c) using type tuple as function argument

2009-10-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2862 --- Comment #3 from Don clugd...@yahoo.com.au 2009-10-23 23:15:46 PDT --- Aargh, this doesn't work because types ARE valid function arguments inside type expressions. There does not seem to be better place to catch this error (functionArguments

[Issue 2908] Build error: ../mars/mars.h doesn't exist

2009-10-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2908 Gide Nwawudu g...@nwawudu.com changed: What|Removed |Added CC||g...@nwawudu.com ---

[Issue 3439] New: std.range.Sequence.opIndex not consistent after calling popFront().

2009-10-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3439 Summary: std.range.Sequence.opIndex not consistent after calling popFront(). Product: D Version: 2.035 Platform: Other OS/Version: Windows Status: NEW

[Issue 3439] std.range.Sequence.opIndex not consistent after calling popFront().

2009-10-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3439 Andrei Alexandrescu and...@metalanguage.com changed: What|Removed |Added Status|NEW |ASSIGNED