Re: debugging on Mac OSX

2013-04-29 Thread Jacob Carlborg
On 2013-04-29 20:49, Dan wrote: Thanks. What is the takeaway? That it does not work and can not work until these two bugs are fixed? A simple "I don't think you can get there from here"? At least these bugs need to be fixed to get demangled symbol names. -- /Jacob Carlborg

Re: debugging on Mac OSX

2013-04-29 Thread Jacob Carlborg
On 2013-04-30 02:01, Timothee Cour wrote: C) stacktraces on OSX with some modifications I did involving wrapping atos, etc: { shows function name, full file, line numbers, and catches segfaults. 0 file: exception.d:356 pure @safe bool std.exception.enforce!(bool).enforce(bool, lazy

Re: debugging on Mac OSX

2013-04-29 Thread evilrat
On Tuesday, 30 April 2013 at 00:52:18 UTC, Timothee Cour wrote: were you able to use it ? if so on which platforms? and does it provide anything beyond what cgdb does? On Mon, Apr 29, 2013 at 5:41 PM, evilrat wrote: On Monday, 29 April 2013 at 18:49:46 UTC, 1100110 wrote: In my opinion,

Re: Arrays of functions, function signatures and template instantiation

2013-04-29 Thread anonymous
On Monday, 29 April 2013 at 23:49:18 UTC, JR wrote: [...] http://dpaste.dzfl.pl/9273fb92 Can't it be done neater than this? It *does* work now, but it's incredibly hacky and I'm not satisfied with it. The whole 'passing a function pointer to a function that casts the signature and invokes it'

Re: debugging on Mac OSX

2013-04-29 Thread Timothee Cour
were you able to use it ? if so on which platforms? and does it provide anything beyond what cgdb does? On Mon, Apr 29, 2013 at 5:41 PM, evilrat wrote: > On Monday, 29 April 2013 at 18:49:46 UTC, 1100110 wrote: > >> >> In my opinion, don't even bother going to the zerobugs website. >> It'll be a

Re: debugging on Mac OSX

2013-04-29 Thread evilrat
On Monday, 29 April 2013 at 18:49:46 UTC, 1100110 wrote: In my opinion, don't even bother going to the zerobugs website. It'll be a long, boring, annoying waste of time. i don't. zerobugs source is on codeplex

Re: debugging on Mac OSX

2013-04-29 Thread Timothee Cour
Having a proper debugging support of D programs on linux/OSX/windows should be a top priority, as it makes bug fixing really hard. I also spent some time with zerobugs route. It looks like a dead end and its developer will most likely not put more effort into it. Here's what I have: A) default st

Re: Internationalization vs. Unicode

2013-04-29 Thread Jesse Phillips
On Monday, 29 April 2013 at 18:36:32 UTC, Tyro[17] wrote: This might work. Not sure yet. The first thing that caught my eyes is You'll find the ported Java source: https://github.com/d-widget-toolkit/base/tree/master/src

Arrays of functions, function signatures and template instantiation

2013-04-29 Thread JR
I'm piecing together a small IRC bot as my second pet project, and next up is splitting the socket-listening/event handling into a separate thread. TL;DR: skip to the link at the bottom -- can't it be done neater? Raw IRC commands are strings whose format differs depending on the *type* of t

Re: debugging on Mac OSX

2013-04-29 Thread Dan
On Monday, 29 April 2013 at 16:48:27 UTC, Jacob Carlborg wrote: On 2013-04-29 14:45, Daniel Davidson wrote: Ho do you debug D executables on mac os x in which debug symbols are available (preferably a setup that works in emacs with gdb or gud-gdb)? This thread seems to bring up the issue I am

Re: debugging on Mac OSX

2013-04-29 Thread 1100110
On 04/29/2013 08:14 AM, evilrat wrote: > On Monday, 29 April 2013 at 12:46:01 UTC, Daniel Davidson wrote: >> Ho do you debug D executables on mac os x in which debug symbols are >> available (preferably a setup that works in emacs with gdb or gud-gdb)? >> > there is no solid solution as far as i kn

Re: Internationalization vs. Unicode

2013-04-29 Thread Tyro[17]
On 4/27/13 6:37 AM, Jacob Carlborg wrote: On 2013-04-27 00:09, Tyro[17] wrote: There are myriad encoding schemes. D natively supports Unicode and provide functionality via phobos. A byproduct of this is that since ASCII is a subset of Unicode, it also natively support ASCII. This is a plus for t

Re: lookahead on ranges

2013-04-29 Thread Sebastian Graf
On Monday, 29 April 2013 at 16:39:21 UTC, bearophile wrote: I think there isn't something like that in Phobos (I can't be fully sure because std.algorithm and std.range contain lot of powerful stuff, and it's not easy to know every possible combination of them). So I think you should use zi

Re: debugging on Mac OSX

2013-04-29 Thread Jacob Carlborg
On 2013-04-29 14:45, Daniel Davidson wrote: Ho do you debug D executables on mac os x in which debug symbols are available (preferably a setup that works in emacs with gdb or gud-gdb)? This thread seems to bring up the issue I am seeing: http://forum.dlang.org/thread/k55tiv$28u3$1...@digitalmar

Re: lookahead on ranges

2013-04-29 Thread bearophile
Sebastian Graf: is there any way to to something like auto arr = [1,2,3,4,5]; auto delta = arr.lookahead!"b-a"(1); // or probably pass 1 as template arg assert(equal(delta[], [1,1,1,1][]); or like // lookahead returns range of tuples (template arg) or arrays (runtime arg)

lookahead on ranges

2013-04-29 Thread Sebastian Graf
Hi, is there any way to to something like auto arr = [1,2,3,4,5]; auto delta = arr.lookahead!"b-a"(1); // or probably pass 1 as template arg assert(equal(delta[], [1,1,1,1][]); or like // lookahead returns range of tuples (template arg) or arrays (runtime arg) foreach (

Re: how hash_t toHash() works?

2013-04-29 Thread Ivan Kazmenko
one more question What is the type of cont? auto cont = redBlackTree !("a.key < b.key", true, MyRecord) (); I want to use this as a property in a class and i can't use there auto keyword... I tried different types but it did not work. For me, the following declaration works: - import st

Re: how hash_t toHash() works?

2013-04-29 Thread gedaiu
On Sunday, 28 April 2013 at 13:18:04 UTC, Ivan Kazmenko wrote: Hi, I have a class which I want to use as key in an assoc array like this: string["KeyString"] myArray; What i want is to preserve the order in the array. I want always to have "1" before "2" if the string is a numeric value.

Re: function overrides but is not covariant

2013-04-29 Thread Namespace
On Monday, 29 April 2013 at 11:40:45 UTC, Timon Gehr wrote: On 04/28/2013 09:45 PM, Namespace wrote: That surprised me a bit. Is that expected? import std.stdio; struct A { } interface IFoo { void bar(ref const A); } class Foo : IFoo { void bar(ref const A a) { } void

Re: function overrides but is not covariant

2013-04-29 Thread Ali Çehreli
On 04/28/2013 12:45 PM, Namespace wrote: > That surprised me a bit. Is that expected? > > > import std.stdio; > > struct A { } > > interface IFoo { > void bar(ref const A); > } > > class Foo : IFoo { > void bar(ref const A a) { > > } > > void bar(const A a) { > r

Re: function overrides but is not covariant

2013-04-29 Thread John Colvin
On Monday, 29 April 2013 at 09:23:01 UTC, Namespace wrote: Not surprising to me at all. Why would ref be covariant with non-ref? I do not understand the error fully. Why I cannot overload the method in the class with non-ref? Sorry, my mistake, it looks like a bug. Dmd thinks that you're tr

Re: debugging on Mac OSX

2013-04-29 Thread evilrat
On Monday, 29 April 2013 at 12:46:01 UTC, Daniel Davidson wrote: Ho do you debug D executables on mac os x in which debug symbols are available (preferably a setup that works in emacs with gdb or gud-gdb)? there is no solid solution as far as i know. you can try build zerobugs debugger from s

Re: C to D conversion for function

2013-04-29 Thread Timon Gehr
On 04/29/2013 02:24 PM, Sumit Raja wrote: On Monday, 29 April 2013 at 11:50:21 UTC, Timon Gehr wrote: In case you want to preserve the attribute: struct av_printf_format{ int fmtpos, attrpos; } @av_printf_format(2, 3) void av_log_ask_for_sample(void* avc, const(char)* msg, ...); Thanks. Wha

debugging on Mac OSX

2013-04-29 Thread Daniel Davidson
Ho do you debug D executables on mac os x in which debug symbols are available (preferably a setup that works in emacs with gdb or gud-gdb)? This thread seems to bring up the issue I am seeing: http://forum.dlang.org/thread/k55tiv$28u3$1...@digitalmars.com but no solution is provided. Also, t

Re: C to D conversion for function

2013-04-29 Thread Sumit Raja
On Monday, 29 April 2013 at 11:50:21 UTC, Timon Gehr wrote: In case you want to preserve the attribute: struct av_printf_format{ int fmtpos, attrpos; } @av_printf_format(2, 3) void av_log_ask_for_sample(void* avc, const(char)* msg, ...); Thanks. What does @av_printf_format(2, 3) do to the f

Re: C to D conversion for function

2013-04-29 Thread Timon Gehr
On 04/29/2013 02:17 PM, 1100110 wrote: ... What is the difference between const(char)*, and const(char*)? I have seen them used pretty much interchangeably... Are they? Somehow I don't think they are. Variables of type const(char)* can be mutated, while const(char*) cannot be. void main(){

Re: C to D conversion for function

2013-04-29 Thread 1100110
On 04/29/2013 06:50 AM, Timon Gehr wrote: > On 04/29/2013 12:57 PM, Sumit Raja wrote: >> Hi, >> >> I wanted some help in converting this >> >> void av_log_ask_for_sample(void *avc, const char *msg, ...) >> av_printf_format(2, 3); >> >> from C to D. >> >> I don't know what it means or is called in C

Re: C to D conversion for function

2013-04-29 Thread Timon Gehr
On 04/29/2013 12:57 PM, Sumit Raja wrote: Hi, I wanted some help in converting this void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3); from C to D. I don't know what it means or is called in C to start with so I am a bit lost on what to search for. Thanks Su

Re: function overrides but is not covariant

2013-04-29 Thread Timon Gehr
On 04/28/2013 09:45 PM, Namespace wrote: That surprised me a bit. Is that expected? import std.stdio; struct A { } interface IFoo { void bar(ref const A); } class Foo : IFoo { void bar(ref const A a) { } void bar(const A a) { return this.bar(a); } } --

C to D conversion for function

2013-04-29 Thread Sumit Raja
Hi, I wanted some help in converting this void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3); from C to D. I don't know what it means or is called in C to start with so I am a bit lost on what to search for. Thanks Sumit

Re: function overrides but is not covariant

2013-04-29 Thread Namespace
Not surprising to me at all. Why would ref be covariant with non-ref? I do not understand the error fully. Why I cannot overload the method in the class with non-ref?

Re: function overrides but is not covariant

2013-04-29 Thread John Colvin
On Sunday, 28 April 2013 at 19:45:41 UTC, Namespace wrote: That surprised me a bit. Is that expected? import std.stdio; struct A { } interface IFoo { void bar(ref const A); } class Foo : IFoo { void bar(ref const A a) { } void bar

Re: GtkD "No GSettings schemas installed"

2013-04-29 Thread QAston
On Sunday, 28 April 2013 at 17:18:48 UTC, Mike Wey wrote: On 04/28/2013 04:32 PM, QAston wrote: On Monday, 15 April 2013 at 18:10:00 UTC, Mike Wey wrote: On 04/15/2013 05:45 PM, Josh wrote: On Sunday, 14 April 2013 at 13:34:07 UTC, Mike Wey wrote: So it looks like the shemas are installed pr

Re: function overrides but is not covariant

2013-04-29 Thread Namespace
Nobody knows?