Re: dlibgit - D bindings to the libgit2 library

2012-10-12 Thread Jacob Carlborg
On 2012-10-12 01:14, Andrej Mitrovic wrote: On 10/11/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: https://github.com/AndrejMitrovic/dlibgit Macros are now recreated, and there is a minimal git client sample ported from C (it has just a few commands implemented). Cool, did you

Re: ddox documentation generator

2012-10-12 Thread Jonas Drewsen
On Thursday, 11 October 2012 at 18:03:18 UTC, Sönke Ludwig wrote: There were still some bugs and inconsistencies with how DMD handles DDOC macros. I've uploaded a fixed version, also with syntax highlighting enabled in text sections*. std.algorithm for example now also has its overview table

Re: ddox documentation generator

2012-10-12 Thread Sönke Ludwig
Am 10/12/2012 10:52 AM, schrieb Jonas Drewsen: On Thursday, 11 October 2012 at 18:03:18 UTC, Sönke Ludwig wrote: There were still some bugs and inconsistencies with how DMD handles DDOC macros. I've uploaded a fixed version, also with syntax highlighting enabled in text sections*.

Re: dlibgit - D bindings to the libgit2 library

2012-10-12 Thread Andrej Mitrovic
On 10/12/12, Jacob Carlborg d...@me.com wrote: Cool, did you translate the macros manually ? Yeah I had to do it that way.

Re: GtkD 2.0 released, Gtk+ 3 with D.

2012-10-12 Thread Andrej Mitrovic
On 9/10/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: http://www.tarnyko.net/en/?q=node/1 Btw for win32 users, GTK_BASEPATH needs to be set to wherever you've installed the runtime bundle (e.g. C:\Program Files\GTKRuntime-3.4.2). Don't let it install with the +- in the path because of an

Re: GtkD 2.0 released, Gtk+ 3 with D.

2012-10-12 Thread Andrej Mitrovic
On 9/9/12, nazriel s...@dzfl.pl wrote: Anyways, for those who wonder how will Gtk3 apps look at Windows: http://blogs.gnome.org/alexl/2012/03/27/moar-windows-themes/ Only with theming though, classic mode is not supported (yet). It does have some visual bugs. Text overflows buttons, the menu

Re: GtkD 2.0 released, Gtk+ 3 with D.

2012-10-12 Thread Andrej Mitrovic
On 10/12/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Most of these are fixable I guess. FWIW I've filed these to the GTK bugzilla.

Re: GtkD 2.0 released, Gtk+ 3 with D.

2012-10-12 Thread Jordi Sayol
Al 12/10/12 15:38, En/na Andrej Mitrovic ha escrit: Anyway it's not too shabby. It's great that we have a multiplatform library that's up to date. Thanks GtkD devs! You can say it in singular. There is only one active dev in GtkD project. Mike Wey. Many many thanks to him. -- Jordi Sayol

Re: GtkD 2.0 released, Gtk+ 3 with D.

2012-10-12 Thread Andrej Mitrovic
On 10/12/12, Jordi Sayol g.sa...@yahoo.es wrote: You can say it in singular. There is only one active dev in GtkD project. Mike Wey. Many many thanks to him. Wow, really? That's both amazing and worrying. We seem to have a lot of 1-man projects in D. Our bus factor is pretty low :p

Re: Blog post: Demystifying Garbage Collectors

2012-10-12 Thread Andrei Alexandrescu
On 10/11/12 9:15 PM, Alex Rønne Petersen wrote: http://xtzgzorex.wordpress.com/2012/10/11/demystifying-garbage-collectors/ Essentially an explanation of garbage collection for the layman programmer. Though, it does assume some familiarity with C and memory management. It's an abstract article

Re: GtkD 2.0 released, Gtk+ 3 with D.

2012-10-12 Thread Mike Wey
On 10/12/2012 03:24 PM, Andrej Mitrovic wrote: On 9/10/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: http://www.tarnyko.net/en/?q=node/1 Btw for win32 users, GTK_BASEPATH needs to be set to wherever you've installed the runtime bundle (e.g. C:\Program Files\GTKRuntime-3.4.2). Don't

Re: GtkD 2.0 released, Gtk+ 3 with D.

2012-10-12 Thread Mike Wey
On 10/12/2012 04:15 PM, Jordi Sayol wrote: Al 12/10/12 15:38, En/na Andrej Mitrovic ha escrit: Anyway it's not too shabby. It's great that we have a multiplatform library that's up to date. Thanks GtkD devs! You can say it in singular. There is only one active dev in GtkD project. Mike

D2 for Win64

2012-10-12 Thread Walter Bright
Is now in a semi-usable state. Problems remain: $(LI 80 bit reals are truncated to 64 bits when formatting.) $(LI Many math functions are not implemented.) $(LI No symbolic debug info is generated.) $(LI Cannot catch Win64 structured exception handling

Re: GtkD 2.0 released, Gtk+ 3 with D.

2012-10-12 Thread Russel Winder
Mike, On Fri, 2012-10-12 at 22:25 +0200, Mike Wey wrote: […] I do seem to be getting more pull requests lately :) The GtkD README gives the distinct impression that DSSS is the only way of building GtkD and any projects using it. However, according to its own webpage, DSSS is a Dv1 system that

Re: Tips for debugging EXC_BAD_ACCESS

2012-10-12 Thread Jacob Carlborg
On 2012-10-11 20:19, Michel Fortin wrote: Most likely, the object objc_msgSend is called on has been deallocated, which would mean that windowSendEvent is called with a deallocated NSWindow object as its first argument. How can I detect that? Can I use the object somehow and try to get the

Re: List of reserved words

2012-10-12 Thread Jacob Carlborg
On 2012-10-11 21:28, Jonathan M Davis wrote: A lot of it is there already: http://dlang.org/phobos/object.html I wouldn't count that list. I'm thinking more something that explicitly says: These are reserved symbols by the language or the runtime. Creating your own function named

Re: Any interest in libgit bindings?

2012-10-12 Thread Jacob Carlborg
On 2012-10-11 21:38, Andrej Mitrovic wrote: I guess it depends on what you get from clang. The XML I'm working on has this sort of output: File id=f3 name=git2/submodule.h/ File id=f4 name=c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../include/inttypes.h/ File id=f39

Re: #pragma comment (lib, ...)

2012-10-12 Thread Jacob Carlborg
On 2012-10-12 01:03, Kapps wrote: In an ideal world, your VS plugin would support Packages in the Add References dialog. Just like you could, in theory, add a project as a reference, you would add a package. Then, upon build, the plugin would call the package manager and get the libraries /

Re: #pragma comment (lib, ...)

2012-10-12 Thread Jacob Carlborg
On 2012-10-11 21:45, H. S. Teoh wrote: Yeah, it was one of the things that convinced me to *not* use Redhat. I saw a similar thing back in the Bad Old Days of Win98, Win2k, and their ilk, where installing a driver would sometimes prompt you something to the effect of this driver needs to

Re: #pragma comment (lib, ...)

2012-10-12 Thread Jacob Carlborg
On 2012-10-12 07:46, Paulo Pinto wrote: This already exists, it is called NuGet. Again, it's not cross-platform. How well does it work with D, at all? -- /Jacob Carlborg

Re: GC statistics

2012-10-12 Thread Rainer Schuetze
On 10/10/2012 9:11 PM, Andrei Alexandrescu wrote: This is mostly for GC experts out there - what statistics are needed and useful, yet not too expensive to collect? https://github.com/D-Programming-Language/druntime/pull/236 Andrei What about allocation time? Including/excluding possible

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 06:42:23 Simen Kjaeraas wrote: Anyways, is there a reason you cannot use @disable this() for SysTime? That way, you have rather explicitly marked .init as invalid. Disabling init does a lot to make a type unusable such that it really doesn't make sense to use it

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 07:53:09 monarch_dodra wrote: Yes, as answered, opAssign may do things to this, such as dealocate a payload, reduce a ref counter, or who knows what. A valid point, but it would be easy to explicitly call the invariant at the beginning of opAssign if wanted to

Re: #pragma comment (lib, ...)

2012-10-12 Thread Manu
On 12 October 2012 09:51, Jacob Carlborg d...@me.com wrote: On 2012-10-12 07:46, Paulo Pinto wrote: This already exists, it is called NuGet. Again, it's not cross-platform. How well does it work with D, at all? That's strictly for Microsoft .NET packages isn't it?

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread monarch_dodra
On Friday, 12 October 2012 at 07:36:37 UTC, Jonathan M Davis wrote: On Friday, October 12, 2012 07:53:09 monarch_dodra wrote: Yes, as answered, opAssign may do things to this, such as dealocate a payload, reduce a ref counter, or who knows what. A valid point, but it would be easy to

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 10:09:22 monarch_dodra wrote: When you declare s void, you are supposed to memcpy .init over it manually, or call emplace (which does the same thing + more). If that's what you're supposed to do, it's only because opAssign is annoying enough to check its invariant.

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread monarch_dodra
On Friday, 12 October 2012 at 08:20:42 UTC, Jonathan M Davis wrote: On Friday, October 12, 2012 10:09:22 monarch_dodra wrote: If that's what you're supposed to do, it's only because opAssign is annoying enough to check its invariant. Without the invariant, that's not something that would

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 10:29:06 monarch_dodra wrote: On Friday, 12 October 2012 at 08:20:42 UTC, Jonathan M Davis wrote: On Friday, October 12, 2012 10:09:22 monarch_dodra wrote: If that's what you're supposed to do, it's only because opAssign is annoying enough to check its

Re: #pragma comment (lib, ...)

2012-10-12 Thread Paulo Pinto
On Friday, 12 October 2012 at 07:39:15 UTC, Manu wrote: On 12 October 2012 09:51, Jacob Carlborg d...@me.com wrote: On 2012-10-12 07:46, Paulo Pinto wrote: This already exists, it is called NuGet. Again, it's not cross-platform. How well does it work with D, at all? That's strictly

Re: #pragma comment (lib, ...)

2012-10-12 Thread Paulo Pinto
On Friday, 12 October 2012 at 06:51:19 UTC, Jacob Carlborg wrote: On 2012-10-12 07:46, Paulo Pinto wrote: This already exists, it is called NuGet. Again, it's not cross-platform. How well does it work with D, at all? Fare enough, I got the feeling that the conversation had turned into

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread monarch_dodra
On Friday, 12 October 2012 at 08:34:31 UTC, Jonathan M Davis wrote: Try that code defining S as RefCounted!int and see what happens. That just means that the problem goes further than just invariants. It's still a big problem for invariants. - Jonathan M Davis I appologize, but I don't

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 11:31:36 monarch_dodra wrote: Bask on subject, I _have_ started working with invariants. I think they are nice, but there indeed some times where you'd wish they wouldn't trigger. How about the @noinvariant function attribute? Sounds like a simple enough

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread David Nadlinger
On Friday, 12 October 2012 at 09:42:19 UTC, Jonathan M Davis wrote: That sounds like a decent solution to me, but I think that there's a good chance that Walter would reject it on principle (since in general, skipping the invariant pretty much defeats the purpose of having one). But he

Re: #pragma comment (lib, ...)

2012-10-12 Thread David Nadlinger
On Thursday, 11 October 2012 at 22:50:38 UTC, Iain Buclaw wrote: So the object that interprets pragma(lib) is able to communicate with the object that handles what flags to pass to the linker. :-) Yes, and pragma(lib) is already supported in LDC. This is not possible with gdc, as the driver

Re: #pragma comment (lib, ...)

2012-10-12 Thread Iain Buclaw
On 12 October 2012 10:47, David Nadlinger s...@klickverbot.at wrote: On Thursday, 11 October 2012 at 22:50:38 UTC, Iain Buclaw wrote: So the object that interprets pragma(lib) is able to communicate with the object that handles what flags to pass to the linker. :-) Yes, and pragma(lib) is

BNF grammar for D?

2012-10-12 Thread Thomas Koch
Hi, cedet is a collection of emacs dev tools. I understand that it should be relatively easy to enhance the emacs support of D if one just provides cedet with a BNF grammar in a Bison like format, I cite: You should choose to use the Semantic lexer/grammer format for your language if it has

Re: Gathering info for D/Embedded presentation

2012-10-12 Thread Jens Mueller
mist wrote: After some gentle preachings I have been asked in my company to prepare presentation regarding D usage in scope of embedded, kernel-level development and mobile devices. I am quite starving to find good project examples for D2 though ( most stuff I am aware of is D1 ) and do not

Re: GC is reclaiming live objects

2012-10-12 Thread deadalnix
I have made some research and found a workaround. It seems that the problem is somehow related to map.array combination, but couldn't reproduce it on a simple test case. Alex Rønne Petterson think to think that it is related to this bug http://d.puremagic.com/issues/show_bug.cgi?id=8774 (and

Re: Gathering info for D/Embedded presentation

2012-10-12 Thread maarten van damme
I'm also curious if druntime can be made compatible with bionic because now I have to experiment with using a chrooted linux on my phone to test some D applications.

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 11:49:48 David Nadlinger wrote: On Friday, 12 October 2012 at 09:42:19 UTC, Jonathan M Davis wrote: That sounds like a decent solution to me, but I think that there's a good chance that Walter would reject it on principle (since in general, skipping the

Re: Gathering info for D/Embedded presentation

2012-10-12 Thread Tim Krimm
1) Do you consider garbage collection to be an issue in embedded programming? 2) Are you dealing with hard timing constraints where garbage collection could be an issue? I would love a copy of your presentation I think the XOMB

Re: Tips for debugging EXC_BAD_ACCESS

2012-10-12 Thread Jacob Carlborg
On 2012-10-11 20:19, Michel Fortin wrote: Most likely, the object objc_msgSend is called on has been deallocated, which would mean that windowSendEvent is called with a deallocated NSWindow object as its first argument. I have done some investigation and I can call other methods on the

Re: BNF grammar for D?

2012-10-12 Thread Aziz K.
Hi, I can give you three options to choose from. There's the official grammar (don't know what the form is called): http://dlang.org/declaration.html A Parser Expression Grammar (PEG): https://github.com/PhilippeSigaud/Pegged/blob/master/pegged/examples/dparser.d The source code comments in

Re: Gathering info for D/Embedded presentation

2012-10-12 Thread mist
On Friday, 12 October 2012 at 10:58:04 UTC, Jens Mueller wrote: mist wrote: After some gentle preachings I have been asked in my company to prepare presentation regarding D usage in scope of embedded, kernel-level development and mobile devices. I am quite starving to find good project

Re: Gathering info for D/Embedded presentation

2012-10-12 Thread mist
On Friday, 12 October 2012 at 12:20:16 UTC, Tim Krimm wrote: 1) Do you consider garbage collection to be an issue in embedded programming? 2) Are you dealing with hard timing constraints where garbage collection could be an issue? I would love a copy of your presentation

Re: BNF grammar for D?

2012-10-12 Thread Russel Winder
On Fri, 2012-10-12 at 15:11 +0200, Aziz K. wrote: Hi, I can give you three options to choose from. There's the official grammar (don't know what the form is called): http://dlang.org/declaration.html A Parser Expression Grammar (PEG):

Re: Tips for debugging EXC_BAD_ACCESS

2012-10-12 Thread Michel Fortin
On 2012-10-12 12:40:35 +, Jacob Carlborg d...@me.com said: On 2012-10-11 20:19, Michel Fortin wrote: Most likely, the object objc_msgSend is called on has been deallocated, which would mean that windowSendEvent is called with a deallocated NSWindow object as its first argument. I have

Re: BNF grammar for D?

2012-10-12 Thread Paulo Pinto
On Friday, 12 October 2012 at 14:41:12 UTC, Russel Winder wrote: On Fri, 2012-10-12 at 15:11 +0200, Aziz K. wrote: Hi, I can give you three options to choose from. There's the official grammar (don't know what the form is called): http://dlang.org/declaration.html A Parser Expression

Re: BNF grammar for D?

2012-10-12 Thread Russel Winder
On Fri, 2012-10-12 at 16:59 +0200, Paulo Pinto wrote: […] My grammar knowledge is a bit rusty, but isn't EBNF only possible for LR(K) languages? Mentioning EBNF turns out to be a red herring. Indeed mention of BNF is a red herring also. What is actually needed is a Wisent grammar file.

Re: #pragma comment (lib, ...)

2012-10-12 Thread Kagamin
On Wednesday, 10 October 2012 at 11:39:29 UTC, Iain Buclaw wrote: NB: GCC has no such equivalent hmm... really? Tough it seems like ld parses .drectve section: http://pastebin.com/mc63b1b1 http://www.ibiblio.org/gferg/ldp/man/man1/dlltool.1.html And syntax used sort of resembles that of gnu

Explicit TCE

2012-10-12 Thread Tyler Jameson Little
I've read a few threads discussing tail call elimination, but they all wanted the spec to articulate specific circumstances where tail call elimination is required. Has there been any thought to adding syntax to explicitly state tail call elimination? D could use something like Newsqueak's

Re: Explicit TCE

2012-10-12 Thread Alex Rønne Petersen
On 12-10-2012 19:29, Tyler Jameson Little wrote: I've read a few threads discussing tail call elimination, but they all wanted the spec to articulate specific circumstances where tail call elimination is required. Has there been any thought to adding syntax to explicitly state tail call

Re: Explicit TCE

2012-10-12 Thread Dmitry Olshansky
On 12-Oct-12 21:29, Tyler Jameson Little wrote: I've read a few threads discussing tail call elimination, but they all wanted the spec to articulate specific circumstances where tail call elimination is required. Has there been any thought to adding syntax to explicitly state tail call

Re: Explicit TCE

2012-10-12 Thread Tyler Jameson Little
I'm a big fan of explicit, guaranteed TCE. However, the primary problem with this approach is a really mundane one: The major compiler back ends (GCC and LLVM) don't have any means of guaranteeing TCE... Ugh... I thought that might be a problem. I don't know too much about GCC/LLVM, but I

Re: Explicit TCE

2012-10-12 Thread bearophile
Tyler Jameson Little: D could use something like Newsqueak's become keyword. If you're not familial with Newsqueak, become is just like a return, except it replaces the stack frame with the function that it calls. Are you talking about CPS?

Re: Explicit TCE

2012-10-12 Thread Tyler Jameson Little
No idea what you are talking about. I'm not sure which part wasn't clear, so I'll try to explain myself. Please don't feel offended if I clarify things you already understand. An optimizable tail call must simply be a function call. The current stack frame would be replaced with the new

Re: #pragma comment (lib, ...)

2012-10-12 Thread Iain Buclaw
.drective looks to be for functions, not libraries. Iain Buclaw *(p e ? p++ : p) = (c 0x0f) + '0'; On 12 Oct 2012 17:31, Kagamin s...@here.lot wrote: On Wednesday, 10 October 2012 at 11:39:29 UTC, Iain Buclaw wrote: NB: GCC has no such equivalent hmm... really? Tough it seems like

Re: Explicit TCE

2012-10-12 Thread Tyler Jameson Little
On Friday, 12 October 2012 at 18:02:57 UTC, bearophile wrote: Tyler Jameson Little: D could use something like Newsqueak's become keyword. If you're not familial with Newsqueak, become is just like a return, except it replaces the stack frame with the function that it calls. Are you

Re: Explicit TCE

2012-10-12 Thread Dmitry Olshansky
On 12-Oct-12 22:17, Tyler Jameson Little wrote: No idea what you are talking about. I'm not sure which part wasn't clear, so I'll try to explain myself. Please don't feel offended if I clarify things you already understand. An optimizable tail call must simply be a function call. The

Re: Explicit TCE

2012-10-12 Thread Tyler Jameson Little
My mention of overhead was just how complicated it would be to implement. The general algorithm is (for each become keyword): * determine max stack size (consider all branches in all recursive contexts) * allocate stack size for top-level function * do normal TCE stuff (use existing stack for

Re: Explicit TCE

2012-10-12 Thread Dmitry Olshansky
On 12-Oct-12 22:49, Tyler Jameson Little wrote: That would work too. If scope() is disallowed, it doesn't matter where the stack comes from. It's only slightly cheaper to reuse the current stack (CPU), but making a new one would be lighter on memory. I see nice staff. My use case is

Bug in countUntil?

2012-10-12 Thread monarch_dodra
I was looking in countUntil to fix another issue, and I think the string support is broken This program: // import std.algorithm; import std.stdio; void main() { 日本語.countUntil('本').writeln(); } // Will produce 3. ... I'd have straight up said it was a bug, but the

Re: Bug in countUntil?

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 21:02:47 monarch_dodra wrote: I was looking in countUntil to fix another issue, and I think the string support is broken This program: // import std.algorithm; import std.stdio; void main() { 日本語.countUntil('本').writeln(); } // Will

Re: Bug in countUntil?

2012-10-12 Thread monarch_dodra
On Friday, 12 October 2012 at 19:17:13 UTC, Jonathan M Davis wrote: On Friday, October 12, 2012 21:02:47 monarch_dodra wrote: I was looking in countUntil to fix another issue, and I think the string support is broken This program: // import std.algorithm; import std.stdio; void main() {

Re: Explicit TCE

2012-10-12 Thread Tyler Jameson Little
Hey, that's dmd (compiler) using a ton of memory, not std.regex :( It actually flies with only a modest set of ram after CTFE (or rather 'if') succeeds that is :) My bad. Even then, TCE wouldn't hurt. The main problem I see is working with other compilers like GCC/LLVM. If this can be done

Re: Explicit TCE

2012-10-12 Thread bearophile
Dmitry Olshansky: Perhaps the biggest one would be convincing GCC/LLVM devs to accept patches :) From what I've seen LLVM devs seem open enough to good patches. They have accepted several changes to allow LLVM to become the back-end of GHC (Haskell compiler), and generally my enhancement

Re: BNF grammar for D?

2012-10-12 Thread Nick Sabalausky
On Fri, 12 Oct 2012 16:16:10 +0100 Russel Winder rus...@winder.org.uk wrote: On Fri, 2012-10-12 at 16:59 +0200, Paulo Pinto wrote: […] My grammar knowledge is a bit rusty, but isn't EBNF only possible for LR(K) languages? Mentioning EBNF turns out to be a red herring. Indeed mention

Re: #pragma comment (lib, ...)

2012-10-12 Thread Kagamin
It looks to be for arbitrary linker commands. ps I agree that building should be handled by a build system and/or a build script.

Re: #pragma comment (lib, ...)

2012-10-12 Thread Kagamin
From COFF spec: -- The .drectve Section (Object Only) A section is a “directive” section if it has the IMAGE_SCN_LNK_INFO flag set in the section header. By convention, such a section also has the name .drectve. The linker removes a .drectve section after processing the information, so the

Re: Explicit TCE

2012-10-12 Thread David Nadlinger
On Friday, 12 October 2012 at 17:39:53 UTC, Alex Rønne Petersen wrote: However, the primary problem with this approach is a really mundane one: The major compiler back ends (GCC and LLVM) don't have any means of guaranteeing TCE... LLVM shouldn't be as big a problem – there is some support

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread Era Scarecrow
On Friday, 12 October 2012 at 08:20:42 UTC, Jonathan M Davis wrote: Really, I think that it's a bad design decision to require that the invariant be called before opAssign. It does _not_ play nice with some of D's other features, and the result is likely to be that invariants get used less,

Re: What is the case against a struct post-blit default constructor?

2012-10-12 Thread monarch_dodra
On Friday, 12 October 2012 at 20:33:11 UTC, Era Scarecrow wrote: I'll say a @novariant is the better answer, and automatically used on the default copy/opAssign/postblitz (before the call, but still needed after). The language already states that the invariant is only called at the end of

Re: #pragma comment (lib, ...)

2012-10-12 Thread Jesse Phillips
On Thursday, 11 October 2012 at 07:10:57 UTC, Jacob Carlborg wrote: On 2012-10-11 04:54, Jesse Phillips wrote: I think it would be much better to work with packages and not individual libraries. You would just tell the build tool, compiler or whatever to use package foo. Then the package

Re: Error messages for newbies survey

2012-10-12 Thread bearophile
Don Clugston: Many of the things you report are examples of bug 8684. Please file bug reports for any others you think are important. I have added some cases here: http://d.puremagic.com/issues/show_bug.cgi?id=8684 Add added a new report: http://d.puremagic.com/issues/show_bug.cgi?id=8807

Re: Tips for debugging EXC_BAD_ACCESS

2012-10-12 Thread torhu
On 11.10.2012 08:52, Jacob Carlborg wrote: I didn't have any luck with this in the learn newsgroup so I'm trying here. I'm trying to debug the Mac OS X port of DWT. Almost as soon as a DWT application starts to process events I receive a segmentation fault. The error happens in the objc_msgSend

Re: toStringz for UTF-16

2012-10-12 Thread Jonathan M Davis
On Saturday, October 13, 2012 01:58:15 Katayama Hirofumi MZ wrote: Why doesn't D have toStringz function for UTF-16 encoding? It does. std.utf.toUTFz will do every combination of char type and constness. And std.utf.toUTF16z will convert any string to a null-terminated const(wchar)*. -

Re: toStringz for UTF-16

2012-10-12 Thread Jonathan M Davis
On Saturday, October 13, 2012 01:58:15 Katayama Hirofumi MZ wrote: Why doesn't D have toStringz function for UTF-16 encoding? std.utf.toUTFz will do every combination of char type and constness. And std.utf.toUTF16z will convert any string to a null-terminated const(wchar)*. - Jonathan M Davis

Re: toStringz for UTF-16

2012-10-12 Thread Katayama Hirofumi MZ
Thanks. END OF THREAD

Re: Explicit TCE

2012-10-12 Thread Tyler Jameson Little
On Friday, 12 October 2012 at 20:23:00 UTC, David Nadlinger wrote: On Friday, 12 October 2012 at 17:39:53 UTC, Alex Rønne Petersen wrote: However, the primary problem with this approach is a really mundane one: The major compiler back ends (GCC and LLVM) don't have any means of guaranteeing

Re: Calling un-overridden class method

2012-10-12 Thread H. S. Teoh
On Sat, Oct 13, 2012 at 05:00:40AM +0200, Andrej Mitrovic wrote: On 10/13/12, H. S. Teoh hst...@quickfur.ath.cx wrote: This seems to be a compiler bug to me? Has to be: http://dpaste.dzfl.pl/89a646b7 OK, filed an issue for it: http://d.puremagic.com/issues/show_bug.cgi?id=8809 T

Re: revamped candydoc

2012-10-12 Thread Jacob Carlborg
On 2012-10-11 22:16, Aziz K. wrote: Interesting, I didn't realize until now that you can do that with git. Is it possible to set the external git repo to a specific commit? I'll consider this option. Thanks! That's the whole point, it's locked to a specific commit and you need to force

Re: revamped candydoc

2012-10-12 Thread Jacob Carlborg
On 2012-10-11 22:16, Aziz K. wrote: On Thu, 11 Oct 2012 21:33:15 +0200, Jacob Carlborg d...@me.com wrote: If you're using git you could add Tango as a submodule. I'm talking about Tango-D2 here, I heard you're porting Dil to D2. It might be possible for D1 as well using git svn.

Re: revamped candydoc

2012-10-12 Thread Jakob Ovrum
On Thursday, 11 October 2012 at 14:26:54 UTC, Dan wrote: Also, pointers to any doc generation setup with decent styling that works out of the box would be great. bootDoc[1] uses Twitter's Bootstrap theme for styling, and has a lot of extra features implemented with JavaScript. It works right

Re: How many std.concurrency receivers?

2012-10-12 Thread Russel Winder
On Thu, 2012-10-11 at 20:30 -0700, Charles Hixson wrote: […] I'm not clear on what Fibers are. From Ruby they seem to mean co-routines, and that doesn't have much advantage. But it also seems as […] I think the emerging consensus is that threads allow for pre-emptive scheduling whereas

Re: Is there a thread safe single linked list?

2012-10-12 Thread denizzzka
or dynamic array with this methods

Re: revamped candydoc

2012-10-12 Thread Dan
On Thursday, 11 October 2012 at 18:08:47 UTC, Aziz K. wrote: I'll be happy to help you compile DIL yourself. That way I can see where my assumptions are false and my instructions are lacking and make it work for different platforms and needs. I've been considering just copying Tango's files to

Re: revamped candydoc

2012-10-12 Thread Aziz K.
On Fri, 12 Oct 2012 08:16:54 +0200, Jacob Carlborg d...@me.com wrote: Why is that? Tango is working just fine and Phobos is still missing some stuff that Tango has. Actually, I'm using both and there's nothing wrong with that. Tango is just yet another third party library. Yeah, no

Re: Save JSONValue binary in file?

2012-10-12 Thread Piotr Szturmaj
Chopin wrote: Hello! I got this 109 MB json file that I read... and it takes over 32 seconds for parseJSON() to finish it. So I was wondering if it was a way to save it as binary or something like that so I can read it super fast? Thanks for all suggestions :) Try this implementation:

LockingTextWriter/Reader

2012-10-12 Thread Adam D. Ruppe
std.stdio has a nice struct called LockingTextReader in the source. The thing is it isn't documented at all, and I don't think it even does its own interface. It claims to return dchars, but apparently reads bytes. Its counterpart, LockingTextWriter, seems to do a little more dchar related

In Expression for Static and DYnamic Arrays

2012-10-12 Thread Rizo Isrof
Hi, Why the `in` expression can only be applied to associative arrays and cannot be used with static or dynamic arrays as it is possible with, _e.g._, Python? The following code is not legal: int[] a = [1,2,3,4,5]; if (1 in a) { } Are there any technical explanation for this

Re: In Expression for Static and DYnamic Arrays

2012-10-12 Thread Jonathan M Davis
On Thursday, October 11, 2012 18:45:36 Rizo Isrof wrote: Hi, Why the `in` expression can only be applied to associative arrays and cannot be used with static or dynamic arrays as it is possible with, _e.g._, Python? The following code is not legal: int[] a = [1,2,3,4,5]; if (1 in

Re: Is there a thread safe single linked list?

2012-10-12 Thread denizzzka
Thanks for answer! After investigation came to the conclusion that here is needed not synchronized-based solution. I am need compare-and-swap single linked list because it will be used in callback proc from C, and it cannot be throwable, but synchronized contains throwable _d_monitorenter

Re: Save JSONValue binary in file?

2012-10-12 Thread Chopin
Thanks! I tried using it: auto document = parseJSON(content).array; // this works with std.json :) Using json.d from the link: auto j = JSONReader!string(content); auto document = j.value.whole.array; // this doesn't Error: undefined identifier 'array'

Re: Save JSONValue binary in file?

2012-10-12 Thread Piotr Szturmaj
Chopin wrote: Thanks! I tried using it: auto document = parseJSON(content).array; // this works with std.json :) Using json.d from the link: auto j = JSONReader!string(content); auto document = j.value.whole.array; // this doesn't Error: undefined identifier 'array' If you're sure that

Re: LockingTextWriter/Reader

2012-10-12 Thread Steven Schveighoffer
On Fri, 12 Oct 2012 13:06:16 -0400, Adam D. Ruppe destructiona...@gmail.com wrote: std.stdio has a nice struct called LockingTextReader in the source. The thing is it isn't documented at all, and I don't think it even does its own interface. It claims to return dchars, but apparently

Re: Is there a thread safe single linked list?

2012-10-12 Thread denizzzka
I would be grateful if someone share singly linked list based on cas() Ok, this is a good opportunity to learn how to write such by oneself :-)

Automated D code editing?

2012-10-12 Thread Lubos Pintes
Hi, I am still playing with DGUI library. Besides other things, I would like to convert enum names from THIS_STUPID_NAMING_CONVENTION_WHICH_I_ABSOLUTELY_HATE to thisGoodOne. Obviously I could do this by hand but it is a bit time consuming. Any tool / hack to help me with this? Thank

Re: In Expression for Static and DYnamic Arrays

2012-10-12 Thread bearophile
Jonathan M Davis: Because that would mean than in was O(n), whereas it's generally assumed to be at least o(log n) (which is what you'd get in a balanced binary tree such as red-black tree). AA's do it in O(1), so they're okay, but dynamic arrays can't do better than O(n). Time ago the

Re: revamped candydoc

2012-10-12 Thread Aziz K.
On Thu, 11 Oct 2012 21:30:11 +0200, Jacob Carlborg d...@me.com wrote: I liked the style that the Tango docs are using much better. What? You don't like my soft, green colours? Shame on you! :P Ok, I'm not happy with the style myself, but I want to concentrate on functionality more atm.

Re: Automated D code editing?

2012-10-12 Thread Aziz K.
On Fri, 12 Oct 2012 19:51:02 +0200, Lubos Pintes lubos.pin...@gmail.com wrote: Hi, I am still playing with DGUI library. Besides other things, I would like to convert enum names from THIS_STUPID_NAMING_CONVENTION_WHICH_I_ABSOLUTELY_HATE to thisGoodOne. Obviously I could do this by hand but

  1   2   >