Re: Walter on reddit with an older article

2012-03-27 Thread deadalnix
Le 23/03/2012 19:52, Andrei Alexandrescu a écrit : http://www.reddit.com/r/programming/comments/r9p4c/walter_bright_on_c_compilation_speed/ Andrei Interesting. I would love to a comparison of this and what mixin cause the compiler to do.

Re: Pegged: Syntax Highlighting

2012-03-27 Thread Andrej Mitrovic
On 3/17/12, Philippe Sigaud philippe.sig...@gmail.com wrote: If ddmd-clean is OK for you, that's cool. Keep us informed how that went. Seems to work ok: http://i.imgur.com/qGVZD.png I'd love to see if I can do it with Pegged too. I've yet to see how Pegged works internally though and whether I

Re: avgtime - Small D util for your everyday benchmarking needs

2012-03-27 Thread Don Clugston
On 23/03/12 16:25, Andrei Alexandrescu wrote: On 3/23/12 12:51 AM, Manfred Nowak wrote: Andrei Alexandrescu wrote: You may want to also print the mode of the distribution, nontrivial but informative In case of this implementation and according to the given link: trivial and noninformative,

Re: Adam Wilson is now a GSoC 2012 mentor!

2012-03-27 Thread Jacob Carlborg
On 2012-03-27 00:00, Adam Wilson wrote: Mono is over a million, Visual Studio is almost as much as the Windows Kernel (5m+ IIRC), and Eclipse ... well I don't what they are doing wrong over there but the bloat is epic. In other words, a good IDE is a massively complicated beast. Integrations

Re: Adam Wilson is now a GSoC 2012 mentor!

2012-03-27 Thread Adam Wilson
On Tue, 27 Mar 2012 09:38:33 -0700, Jacob Carlborg d...@me.com wrote: On 2012-03-27 00:00, Adam Wilson wrote: Mono is over a million, Visual Studio is almost as much as the Windows Kernel (5m+ IIRC), and Eclipse ... well I don't what they are doing wrong over there but the bloat is epic. In

Re: Pegged: Syntax Highlighting

2012-03-27 Thread Philippe Sigaud
On Tue, Mar 27, 2012 at 16:41, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 3/17/12, Philippe Sigaud philippe.sig...@gmail.com wrote: If ddmd-clean is OK for you, that's cool. Keep us informed how that went. Seems to work ok: http://i.imgur.com/qGVZD.png Nice one. Care to explain how

Re: Adam Wilson is now a GSoC 2012 mentor!

2012-03-27 Thread Jacob Carlborg
On 2012-03-27 20:05, Adam Wilson wrote: To be a fully useable *D* IDE this is true, but that's not really an Integrated Development Environment, its just Yet Another Specialized Development Environment. I'd argue that the whole point of the Integrated part of IDE is that everything you might

Re: Adam Wilson is now a GSoC 2012 mentor!

2012-03-27 Thread alex
On Tuesday, 27 March 2012 at 18:06:03 UTC, Adam Wilson wrote: Besides, Mono-D has more pressing issues than a potential stand-alone IDE ... CTFE/mixin parsing anybody? Well, I think the GSoC phase will be about implementing UFCS, Mixin/Expression evaluation and CTFE then. Well cool, so I

D Conference 2012

2012-03-27 Thread Walter Bright
The web site is up now: http://www.astoriaseminar.com See you all there!

Thrift now officially supports D!

2012-03-27 Thread David Nadlinger
Apache Thrift is a cross-language serialization/RPC framework. During last year's Google Summer of Code, I worked on adding D as a target language – and a few days ago, the D implementation has been accepted into the upstream project! You can find a short overview of the capabilities of the

Re: D Conference 2012

2012-03-27 Thread Bernard Helyer
On Tuesday, 27 March 2012 at 21:29:08 UTC, Walter Bright wrote: The web site is up now: http://www.astoriaseminar.com See you all there! Someday, when I'm rich and famous, I'll be able to afford to travel to such things. For now, I must play the flightless kiwi and request lots of

Re: Array ops give sharing violation under Windows 7 64 bit?

2012-03-27 Thread dennis luehring
try handle: http://technet.microsoft.com/de-de/sysinternals/bb896655 or process explorer: http://technet.microsoft.com/de-de/sysinternals/bb896653 to find the blocking process Am 24.03.2012 19:55, schrieb Walter Bright: Note the failure to write out test.exe. I instrumented Optlink to

Problem passing objects between threads

2012-03-27 Thread Ghislain
Hello, This question was posted in D.learn, but did not receive any answer. I apologize if this is not the right place to post. I need to pass objects of a hierarchy between threads and I have some troubles. The sample code below displays: Unknown B.fun() I do not understand why an object of

Re: Regex performance

2012-03-27 Thread James Blewitt
Great! Thanks for the support everyone. What a performance jump between v2.054 and v2.058! James

immutable method not callable using argument types () - doesn't make sense

2012-03-27 Thread Daniel Donnelly
I have: [code] module A; module A; interface B { public: immutable B dup(); } class A : B { public: this() {} this(in char[] field) { this.field = field.dup; }

immutable method not callable using argument types () - doesn't make sense

2012-03-27 Thread Daniel Donnelly
I have: [code] module A; interface B { public: immutable B dup(); } class A : B { public: this() {} this(in char[] field) { this.field = field.dup; } immutable A dup()

Re: immutable method not callable using argument types () - doesn't make sense

2012-03-27 Thread Daniel Donnelly
The two solutions are: inout(A) dup() inout { ... } A dup() const { ... } I'm using the latter. Basically all I need is to copy any object: const, immut-, or mutable.

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread bearophile
Dmitry Olshansky: Speaking more of run-time version of regex, it is essentially running a VM that executes instructions that do various kinds of match-this, match-that. The VM dispatch code is quite slow, the optimal _threaded_ code requires either doing it in _assembly_ or _computed_ goto

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread Martin Nowak
Both GCC and LLVM back-ends support computed gotos (despite the asm produced by LLVM on them is not as good as GCC one). If people feel the desire to add compiler-specific computed gotos to D, they will risk adding them with a different syntax on each present and future compiler. What did

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread Martin Nowak
GotoStatement: http://dlang.org/statement.html#GotoStatement

AA getLValue

2012-03-27 Thread Martin Nowak
Does anybody know an efficient way to get/create-if-missing an lvalue AA entry. I commonly resort to this, but it uses three lookups. auto p = key in aa; if (p is null) { aa[key] = inital; p = key in aa; } //...

Re: AA getLValue

2012-03-27 Thread simendsjo
On Tue, 27 Mar 2012 11:35:51 +0200, Martin Nowak d...@dawgfoto.de wrote: Does anybody know an efficient way to get/create-if-missing an lvalue AA entry. I commonly resort to this, but it uses three lookups. auto p = key in aa; if (p is null) { aa[key] = inital; p = key in aa; }

GSoC 2012 Proposal: Continued Work on a D Linear Algebra library (SciD - std.linalg)

2012-03-27 Thread Cristi Cobzarenco
Hello everyone, My name is Cristian Cobzarenco and last year, mentored by David Simcha and co-mentored by Fawzi Mohamed and Andrei Alexandrescu, I worked on a fork of SciD as part of Google's Summer of Code. While we've got a lot done last summer there's still plenty to do and my proposal this

Re: immutable method not callable using argument types () - doesn't make sense

2012-03-27 Thread Steven Schveighoffer
On Tue, 27 Mar 2012 04:49:57 -0400, Daniel Donnelly enjoysm...@gmail.com wrote: The two solutions are: inout(A) dup() inout { ... } This transfers the constancy from the object to the result. Is that what you want? For arrays, dup means return mutable, no matter what constancy it is

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread bearophile
Martin Nowak: What did you had in mind? The following would only require a minor syntax change. auto codeaddr = Label; goto codeaddr + 0x10; Something like this: Label1: //... Label2: //... Label3: //... enum void*[3] targs = [Label1, Label2, Label3]; int i = 2; // run-time value

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread Dmitry Olshansky
On 27.03.2012 1:07, Timon Gehr wrote: On 03/26/2012 09:10 PM, Dmitry Olshansky wrote: Speaking more of run-time version of regex, it is essentially running a VM that executes instructions that do various kinds of match-this, match-that. The VM dispatch code is quite slow, the optimal

Re: immutable method not callable using argument types () - doesn't make sense

2012-03-27 Thread bearophile
Steven Schveighoffer: So what the compiler is saying is that you can't call dup with arguments (), you must call it with arguments '() immutable', meaning you must call it on an immutable B, not a mutable B. Any space for compiler error message improvements here? Bye, bearophile

Re: reading formatted strings: readf(%s, stringvar)

2012-03-27 Thread Tyro[17]
On Tuesday, 27 March 2012 at 00:05:51 UTC, Andrei Alexandrescu wrote: On 3/26/12 2:52 PM, Tyro[17] wrote: Couldn't the state of stdin be checked upon entrance into readf and reopened if it is already closed? That won't work. But this does: import std.stdio, std.array; extern(C) // As

Re: reading formatted strings: readf(%s, stringvar)

2012-03-27 Thread Tyro[17]
On Monday, 26 March 2012 at 21:20:00 UTC, Ali Çehreli wrote: On 03/26/2012 02:12 PM, Tyro[17] wrote: I don't want to provide an explicit terminator, but instead rely on Ctrl-D/Ctrl-Z to do the job while being able to continue processing read request. As explained by Andrei, this is not

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread kraybourne
On 3/27/12 13:37 , bearophile wrote: Something like this: Label1: //... Label2: //... Label3: //... enum void*[3] targs = [Label1,Label2,Label3]; int i = 2; // run-time value goto targs[i]; +1, this would be sweet

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread Martin Nowak
enum void*[3] targs = [Label1, Label2, Label3]; int i = 2; // run-time value goto targs[i]; Yeah, that would work with the extension.

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread bearophile
Martin Nowak: The following would only require a minor syntax change. auto codeaddr = Label; goto codeaddr + 0x10; GotoStatement: goto Identifier ; goto Expression ; // NEW goto default ; goto case ; goto case Expression ; You also need to support Label, that currently

Re: Regex performance

2012-03-27 Thread Andrei Alexandrescu
On 3/27/12 1:57 AM, James Blewitt wrote: Great! Thanks for the support everyone. What a performance jump between v2.054 and v2.058! James Hi James -- you may want to link this discussion from your blog. Cheers, Andrei

Re: reading formatted strings: readf(%s, stringvar)

2012-03-27 Thread Andrei Alexandrescu
On 3/27/12 6:54 AM, Tyro[17] wrote: On Tuesday, 27 March 2012 at 00:05:51 UTC, Andrei Alexandrescu wrote: On 3/26/12 2:52 PM, Tyro[17] wrote: Couldn't the state of stdin be checked upon entrance into readf and reopened if it is already closed? That won't work. But this does: [snip] Very

Re: Getting around the non-virtuality of templates

2012-03-27 Thread Stewart Gordon
On 26/03/2012 14:37, Steven Schveighoffer wrote: snip So for now, I use the undocumented old-style functions. One other thing that this wrapper method loses is covariance, which I use a lot in dcollections. I haven't filed a bug on it, but there is at least a workaround on this one -- the

Re: Getting around the non-virtuality of templates

2012-03-27 Thread Artur Skawina
On 03/27/12 17:12, Stewart Gordon wrote: On 26/03/2012 14:37, Steven Schveighoffer wrote: snip So for now, I use the undocumented old-style functions. One other thing that this wrapper method loses is covariance, which I use a lot in dcollections. I haven't filed a bug on it, but there is

Re: Getting around the non-virtuality of templates

2012-03-27 Thread Stewart Gordon
On 27/03/2012 16:12, Stewart Gordon wrote: On 26/03/2012 14:37, Steven Schveighoffer wrote: snip So for now, I use the undocumented old-style functions. One other thing that this wrapper method loses is covariance, which I use a lot in dcollections. I haven't filed a bug on it, but there is

Re: Getting around the non-virtuality of templates

2012-03-27 Thread Steven Schveighoffer
On Tue, 27 Mar 2012 11:26:08 -0400, Stewart Gordon smjg_1...@yahoo.com wrote: On 27/03/2012 16:12, Stewart Gordon wrote: On 26/03/2012 14:37, Steven Schveighoffer wrote: snip So for now, I use the undocumented old-style functions. One other thing that this wrapper method loses is

A safe replacement for computed goto

2012-03-27 Thread Dmitry Olshansky
On 27.03.2012 16:24, Dmitry Olshansky wrote: On 27.03.2012 1:07, Timon Gehr wrote: On 03/26/2012 09:10 PM, Dmitry Olshansky wrote: Speaking more of run-time version of regex, it is essentially running a VM that executes instructions that do various kinds of match-this, match-that. The VM

Re: reading formatted strings: readf(%s, stringvar)

2012-03-27 Thread Tyro[17]
On Tuesday, 27 March 2012 at 15:14:07 UTC, Andrei Alexandrescu wrote: On 3/27/12 6:54 AM, Tyro[17] wrote: On Tuesday, 27 March 2012 at 00:05:51 UTC, Andrei Alexandrescu wrote: On 3/26/12 2:52 PM, Tyro[17] wrote: Couldn't the state of stdin be checked upon entrance into readf and reopened if

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread Timon Gehr
On 03/27/2012 01:37 PM, bearophile wrote: See: http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Labels-as-Values.html (I'd like to know why GCC usesLabel instead ofLabel). Because labels reside in their own namespace.

Re: Issue 3789, stucts equality

2012-03-27 Thread Nathan M. Swan
On Monday, 26 March 2012 at 21:25:06 UTC, Alvaro wrote: Maybe it makes more sense that struct==struct applies == to each of its fields. It would be the same as bitwise comparison for simple primitive types, but would be more useful with other types such as strings. +1

Re: reading formatted strings: readf(%s, stringvar)

2012-03-27 Thread Matt Peterson
On Tuesday, 27 March 2012 at 15:14:07 UTC, Andrei Alexandrescu wrote: On 3/27/12 6:54 AM, Tyro[17] wrote: On Tuesday, 27 March 2012 at 00:05:51 UTC, Andrei Alexandrescu wrote: On 3/26/12 2:52 PM, Tyro[17] wrote: Couldn't the state of stdin be checked upon entrance into readf and reopened if

Re: reading formatted strings: readf(%s, stringvar)

2012-03-27 Thread H. S. Teoh
On Tue, Mar 27, 2012 at 08:56:56PM +0200, Matt Peterson wrote: On Tuesday, 27 March 2012 at 15:14:07 UTC, Andrei Alexandrescu wrote: [...] You're in a sparse minority at best. Every Unix application out there uses Ctrl-D for end-of-console-input, and your users would be surprised by your

Re: reading formatted strings: readf(%s, stringvar)

2012-03-27 Thread Matt Peterson
On Tuesday, 27 March 2012 at 19:05:19 UTC, H. S. Teoh wrote: On Tue, Mar 27, 2012 at 08:56:56PM +0200, Matt Peterson wrote: On Tuesday, 27 March 2012 at 15:14:07 UTC, Andrei Alexandrescu wrote: [...] You're in a sparse minority at best. Every Unix application out there uses Ctrl-D for

Re: Issue 3789, stucts equality

2012-03-27 Thread Steven Schveighoffer
On Mon, 26 Mar 2012 17:25:07 -0400, Alvaro alvarodotseg...@gmail.com wrote: Maybe it makes more sense that struct==struct applies == to each of its fields. It would be the same as bitwise comparison for simple primitive types, but would be more useful with other types such as strings.

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread bearophile
Timon Gehr: On 03/27/2012 01:37 PM, bearophile wrote: See: http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Labels-as-Values.html (I'd like to know why GCC usesLabel instead ofLabel). Because labels reside in their own namespace. I see. That's probably true in D too. But if possible I think the

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread Martin Nowak
On Tue, 27 Mar 2012 17:01:51 +0200, bearophile You also need to support Label, that currently is Error: undefined identifier Label. Bye, bearophile That doesn't require a syntax addition. One would only need to lookup the label and detect naming collisions with other declarations.

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread Tove
On Tuesday, 27 March 2012 at 09:51:07 UTC, bearophile wrote: Dmitry Olshansky: Speaking more of run-time version of regex, it is essentially running a VM that executes instructions that do various kinds of match-this, match-that. The VM dispatch code is quite slow, the optimal _threaded_

Re: Getting around the non-virtuality of templates

2012-03-27 Thread Stewart Gordon
On 27/03/2012 16:46, Steven Schveighoffer wrote: snip One tip -- if you are doing method as above inside a class and not an interface, you can use: cast(T)cast(void*)this; which should avoid the unnecessary dynamic cast. Which would work if the function always returns this. But in the

Re: reading formatted strings: readf(%s, stringvar)

2012-03-27 Thread Andrei Alexandrescu
On 3/27/12 12:56 PM, Matt Peterson wrote: GDB handles Ctrl-D differently. It doesn't close the input on the first one, it waits for the second one and then exits. After the first one it acts like you typed 'quit', which asks you if you really want to quit when there's a program still running.

Re: GSoC 2012 Proposal: Continued Work on a D Linear Algebra library (SciD - std.linalg)

2012-03-27 Thread Cristi Cobzarenco
Sorry for the follow-up, I just wanted to mention that I also uploaded the proposal on Melange at http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/cristicbz/41002#, but I still recommend reading it on github. Thank you, Cristian. --- Cristi Cobzarenco BSc in Artificial

Re: regex direct support for sse4 intrinsics

2012-03-27 Thread bearophile
Tove: I'm very surprised by your findings by computed gotos... the compiler I am most used to(rvct for arm)... seems proficient in emitting jump table instructions(TBB, TBH) for thumb2... but based on your findings I will definitely re-check the generated asm. You have also to take in

std.containers - WAT

2012-03-27 Thread James Miller
In helping someone in D.learn, I ended up looking through the documentation and code for std.containers. There is a lot wrong with whats going on there right now. For a start, the documentation is pretty unclear, The table for the container primitives is poorly explained, and the complexity

Re: std.containers - WAT

2012-03-27 Thread Andrei Alexandrescu
On 3/27/12 7:46 PM, James Miller wrote: For a start, the documentation is pretty unclear, The table for the container primitives is poorly explained, and the complexity columns wraps on most screen sizes, making understanding them a nightmare. I plan to redo that table. A screenshot would help

Re: Proposal: user defined attributes

2012-03-27 Thread Martin Nowak
Note that one library that did attempt runtime reflection capability (flectioned) does all this at runtime, and does some really funky shit, like opening /proc/self/map on Linux, or requiring you to pass an OPTLINK map file. I don't look at these as innovations as much as I do as workarounds.

Re: std.containers - WAT

2012-03-27 Thread James Miller
On 28 March 2012 15:28, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: In fact, why are any of the functions accepting and returning /Ranges/ which are internal types specific to the container? Ranges are not internal to containers, they are the way containers are manipulated. But

Re: std.containers - WAT

2012-03-27 Thread H. S. Teoh
On Wed, Mar 28, 2012 at 02:46:19PM +1300, James Miller wrote: In helping someone in D.learn, I ended up looking through the documentation and code for std.containers. There is a lot wrong with whats going on there right now. [...] IIRC, Andrei is planning to redesign (or do some major

Re: std.containers - WAT

2012-03-27 Thread James Miller
On 28 March 2012 17:00, H. S. Teoh hst...@quickfur.ath.cx wrote: Anyway, it would be great if more people can help with the docs. Just create an account on github and fork D-Programming-Language/phobos and D-Programming-Language/d-programming-language.org, run `git clone` on both repositories

Annoyances with traits

2012-03-27 Thread F i L
I find myself using __traits(hasMember, T, member) a lot. It's really basic feature of meta-programming. I'm not a fan of the __usedByCompiler syntax, but that's a whole different discussion. __traits() is fine (besides the fact that first-argument-as-function is syntactically inconsistent to

Re: std.containers - WAT

2012-03-27 Thread Jonathan M Davis
On Wednesday, March 28, 2012 16:40:56 James Miller wrote: On 28 March 2012 15:28, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: In fact, why are any of the functions accepting and returning /Ranges/ which are internal types specific to the container? Ranges are not internal

Re: std.containers - WAT

2012-03-27 Thread Alex Rønne Petersen
On 28-03-2012 06:13, James Miller wrote: On 28 March 2012 17:00, H. S. Teohhst...@quickfur.ath.cx wrote: Anyway, it would be great if more people can help with the docs. Just create an account on github and fork D-Programming-Language/phobos and

Re: std.containers - WAT

2012-03-27 Thread H. S. Teoh
On Wed, Mar 28, 2012 at 06:58:45AM +0200, Alex Rønne Petersen wrote: On 28-03-2012 06:13, James Miller wrote: [...] I think one more thing that needs some changing is the usability of the documentation, right now you get a dense list at the top, in mostly-alphabetical order (I think it puts

Installing x32 packages on x64 debian (or fix a dmd bug)

2012-03-27 Thread simendsjo
This might not be the best forum to ask, but as it relates a dmd bug, I hope others here have found a workaround. I'm using a debian-based x64 distro. Due to http://d.puremagic.com/issues/show_bug.cgi?id=5570, I have to compile for -m32. The challenge is installing 32-bit libraries using

Printing stacktrace on segfault

2012-03-27 Thread simendsjo
Is there a way to print a stacktrace on segfaults on linux?

Re: Installing x32 packages on x64 debian (or fix a dmd bug)

2012-03-27 Thread Jordi Sayol
Al 27/03/12 11:52, En/na simendsjo ha escrit: This might not be the best forum to ask, but as it relates a dmd bug, I hope others here have found a workaround. I'm using a debian-based x64 distro. Due to http://d.puremagic.com/issues/show_bug.cgi?id=5570, I have to compile for -m32. The

Re: Installing x32 packages on x64 debian (or fix a dmd bug)

2012-03-27 Thread simendsjo
On Tue, 27 Mar 2012 12:18:45 +0200, Jordi Sayol g.sa...@yahoo.es wrote: Al 27/03/12 11:52, En/na simendsjo ha escrit: This might not be the best forum to ask, but as it relates a dmd bug, I hope others here have found a workaround. I'm using a debian-based x64 distro. Due to

Re: Installing x32 packages on x64 debian (or fix a dmd bug)

2012-03-27 Thread Jordi Sayol
Al 27/03/12 12:40, En/na simendsjo ha escrit: On Tue, 27 Mar 2012 12:18:45 +0200, Jordi Sayol g.sa...@yahoo.es wrote: Al 27/03/12 11:52, En/na simendsjo ha escrit: This might not be the best forum to ask, but as it relates a dmd bug, I hope others here have found a workaround. I'm using a

Re: Rewrite of std.range docs (Was: Re: Making sense of ranges)

2012-03-27 Thread Marco Leise
Am Tue, 27 Mar 2012 06:00:58 +0200 schrieb Jesse Phillips jessekphillip...@gmail.com: On Monday, 26 March 2012 at 00:50:32 UTC, H. S. Teoh wrote: This thread has further convinced me that std.range's docs *need* this rewrite. So here's my first attempt at it:

std.stream.File help required (and classes)

2012-03-27 Thread akaz
Hi all, I am trying to port some application based on a library called mediastreamer2, part of linphone software. The basic software component built on top of mediastreamer2 is called a filter. Basically, it is a C structure with parameters and some methods (pointers to functions).

Re: std.stream.File help required (and classes)

2012-03-27 Thread akaz
I should at that the __gshared attribute was added in distress, but changed nothing. With or without it, the program still crashes.

Re: Rewrite of std.range docs (Was: Re: Making sense of ranges)

2012-03-27 Thread Mike Parker
On 3/27/2012 7:26 PM, Marco Leise wrote: Am Tue, 27 Mar 2012 06:00:58 +0200 schrieb Jesse Phillipsjessekphillip...@gmail.com: On Monday, 26 March 2012 at 00:50:32 UTC, H. S. Teoh wrote: This thread has further convinced me that std.range's docs *need* this rewrite. So here's my first attempt

Re: Installing x32 packages on x64 debian (or fix a dmd bug)

2012-03-27 Thread simendsjo
On Tue, 27 Mar 2012 13:24:06 +0200, Jordi Sayol g.sa...@yahoo.es wrote: Al 27/03/12 12:40, En/na simendsjo ha escrit: On Tue, 27 Mar 2012 12:18:45 +0200, Jordi Sayol g.sa...@yahoo.es wrote: Al 27/03/12 11:52, En/na simendsjo ha escrit: This might not be the best forum to ask, but as it

Re: GUI library

2012-03-27 Thread Tyro[17]
On Sunday, 25 March 2012 at 15:59:21 UTC, Jacob Carlborg wrote: On 2012-03-25 17:22, Kevin Cox wrote: I would reccomend Qt as well. You will get native cross-platform widgets with great performance. I am not sure how far QtD is but I know it once had a lot of development on it. I don't

Re: Printing stacktrace on segfault

2012-03-27 Thread David
Am 27.03.2012 12:04, schrieb simendsjo: Is there a way to print a stacktrace on segfaults on linux? I haven't found one, but you can use gdb, the only thing you've to do is to compile with -g and -gc (or you use gdc)

Problem about lambda expressions

2012-03-27 Thread Tongzhou Li
Hello again! I'm learning D, and I encountered a problem. I tried this code: http://ideone.com/hkpT6 It works well. (Have no idea why codepad.org failed to compile it) I tried to write a lambda instead of function f, but I got nothing printed. Did I make something wrong? Compiler used: DMD32 D

Re: Installing x32 packages on x64 debian (or fix a dmd bug)

2012-03-27 Thread simendsjo
On Tue, 27 Mar 2012 15:11:38 +0200, Jordi Sayol g.sa...@yahoo.es wrote: Al 27/03/12 15:03, En/na simendsjo ha escrit: I have ia32-libs, but say I want to install mysql? I can only get x64 versions thourgh the package manager. Trying to download and install 32-bit .deps says it's

Re: Problem about lambda expressions

2012-03-27 Thread Tongzhou Li
Oh, I also tried: void seq_apply(Params..., Args...)(void delegate(Params) func, Args args) But I got a error: variadic template parameter must be last Does it mean that there can only be one variadic template parameter? How to fix it? Thanks

Re: Problem with receiveOnly and classes

2012-03-27 Thread kraybourne
On 3/25/12 19:33 , Ghislain wrote: Hello, [...] I do not understand why an object of type A is fetched as a Variant, while a object of type B is received correctly. [...] Any idea? Hi! I get the same on Mac DMD 2.058. I have no idea. Looks like a bug to me, although I can't say which part

Re: Problem about lambda expressions

2012-03-27 Thread dennis luehring
Am 27.03.2012 15:52, schrieb Tongzhou Li: Oh, I also tried: void seq_apply(Params..., Args...)(void delegate(Params) func, Args args) But I got a error: variadic template parameter must be last Does it mean that there can only be one variadic template parameter? How to fix it? Thanks

Re: Rewrite of std.range docs (Was: Re: Making sense of ranges)

2012-03-27 Thread H. S. Teoh
On Tue, Mar 27, 2012 at 09:55:43PM +0900, Mike Parker wrote: On 3/27/2012 7:26 PM, Marco Leise wrote: [...] Ranges whose elements are sorted affords ...- insert a comma before affords perhaps? It would help non-native speakers. Actually, a comma there would be incorrect. But because

Re: std.stream.File help required (and classes)

2012-03-27 Thread H. S. Teoh
On Tue, Mar 27, 2012 at 01:58:03PM +0200, akaz wrote: [...] Now, the questions: 1. why there is std.stdio.File, but also std.stream.File? This gives a conflict and explicit names must then be used to avoid conflict. [...] This is a design flaw that will be fixed eventually. There's a

Re: Problem about lambda expressions

2012-03-27 Thread Artur Skawina
On 03/27/12 15:52, Tongzhou Li wrote: Oh, I also tried: void seq_apply(Params..., Args...)(void delegate(Params) func, Args args) But I got a error: variadic template parameter must be last Does it mean that there can only be one variadic template parameter? How to fix it? I'm not

Re: std.stream.File help required (and classes)

2012-03-27 Thread Steven Schveighoffer
On Tue, 27 Mar 2012 10:46:08 -0400, H. S. Teoh hst...@quickfur.ath.cx wrote: On Tue, Mar 27, 2012 at 01:58:03PM +0200, akaz wrote: [...] Now, the questions: 1. why there is std.stdio.File, but also std.stream.File? This gives a conflict and explicit names must then be used to avoid

Re: Problem about lambda expressions

2012-03-27 Thread Kenji Hara
On Tuesday, 27 March 2012 at 13:42:30 UTC, Tongzhou Li wrote: Hello again! I'm learning D, and I encountered a problem. I tried this code: http://ideone.com/hkpT6 It works well. (Have no idea why codepad.org failed to compile it) I tried to write a lambda instead of function f, but I got

Re: std.stream.File help required (and classes)

2012-03-27 Thread akaz
Thank you. But why do I lose access to my std.stream.File file? Somehow, the variable gets unallocated, thus the file is closed back? With pointers of C it used to be so simple... variable remained allocated untel the corresponding free(). I do not quite grasp this (a bit) awkward mix

Re: Printing stacktrace on segfault

2012-03-27 Thread Jonathan M Davis
On Tuesday, March 27, 2012 12:04:59 simendsjo wrote: Is there a way to print a stacktrace on segfaults on linux? You can do it if you install a signal handler for sigsegv and use backtrace_symbols to construct a stacktrace. Or you can just run the program in gdb or turn core dumps on and use

Re: Problem about lambda expressions

2012-03-27 Thread Ali Çehreli
On 03/27/2012 06:42 AM, Tongzhou Li wrote: Hello again! I'm learning D, and I encountered a problem. I tried this code: http://ideone.com/hkpT6 It works well. (Have no idea why codepad.org failed to compile it) I tried to write a lambda instead of function f, but I got nothing printed.

Re: Printing stacktrace on segfault

2012-03-27 Thread Jérôme M. Berger
simendsjo wrote: Is there a way to print a stacktrace on segfaults on linux? catchsegv (part of glibc, so should be available on just about all Linux distros...) Jerome -- mailto:jeber...@free.fr http://jeberger.free.fr Jabber: jeber...@jabber.fr signature.asc

D Dll injection problem

2012-03-27 Thread Gyron
Hey there, I want to inject a dll which was created in D into a c Program. Informations: DMD vs. 2.058 IDE: MonoDevelop with Mono-D System: Windows 7 64bit Program Informations: 32-bit written in c The Injector is working for sure, so thats not the Problem. the Source of the DLL: import

Re: std.stream.File help required (and classes)

2012-03-27 Thread Ali Çehreli
On 03/27/2012 04:58 AM, akaz wrote: 2. is the std.stream.File the correct choice here? Should I use std.file instead? Then, why so many file classes (count std.stdio.File too). std.file is more about files and directories, not file contents. I've abandoned std.stream.File some time ago. I

Re: D Dll injection problem

2012-03-27 Thread maarten van damme
when I tried the previous dmd compiler (have yet to try the curent one on this problem) I got the same problems while trying to compile a dll and use it. I have no clue as to why this is happening. worked in 2.54 I thought

Re: D Dll injection problem

2012-03-27 Thread Gyron
On Tuesday, 27 March 2012 at 20:45:52 UTC, maarten van damme wrote: when I tried the previous dmd compiler (have yet to try the curent one on this problem) I got the same problems while trying to compile a dll and use it. I have no clue as to why this is happening. worked in 2.54 I thought I

Re: D Dll injection problem

2012-03-27 Thread Trass3r
Maybe it's because I have no def file. Very possible. Just pass it to dmd like the other files. Or try the new -shared flag.

Re: std.stream.File help required (and classes)

2012-03-27 Thread akaz
std.file is more about files and directories, not file contents. I've abandoned std.stream.File some time ago. I just use std.stdio.File partly because stdio, stdout, and stderr are of that type anyway. It works with ranges as well. should be re-named std.folder, then, or std.filesystem.

Re: D Dll injection problem

2012-03-27 Thread Gyron
On Tuesday, 27 March 2012 at 21:12:59 UTC, Trass3r wrote: Maybe it's because I have no def file. Very possible. Just pass it to dmd like the other files. Or try the new -shared flag. I have tried both now (shared and def file linking), but know it's crashing my App, lol. I inject it but

Re: D Dll injection problem

2012-03-27 Thread Trass3r
I inject it but it returns nothing and the App(where the dll is injected) is hanging( not responding). Could you try it maybe? I would like to know whether it's a Problem with D or with me. Are dlls without injection working?

Re: D Dll injection problem

2012-03-27 Thread Gyron
On Tuesday, 27 March 2012 at 21:46:23 UTC, Trass3r wrote: I inject it but it returns nothing and the App(where the dll is injected) is hanging( not responding). Could you try it maybe? I would like to know whether it's a Problem with D or with me. Are dlls without injection working? I

Re: std.stream.File help required (and classes)

2012-03-27 Thread Ali Çehreli
On 03/27/2012 02:20 PM, akaz wrote: what is the equivalent of std.stream.File.writeBlock(const void* buffer, size_t size)? I see there is a std.stdio.rawWrite(T)(in T[] buffer); But, my data is: a (byte*) pointer and a length. How do I write something like

Re: std.stream.File help required (and classes)

2012-03-27 Thread akaz
OK, I converted into using the std.stdio.File. Without success, the programs till crashes. However, in the meantime: A) why there is no parameter-less constructor for std.stdio.File? I would like to have into my init function: s.filedesc=new File() and, then, in my setter open method

  1   2   >