d plugin for Intelij Idea debuging support

2016-01-29 Thread Pavel via Digitalmars-d-learn
Hello! Is there any debuging support for Intelij Idea's D plugin? Thanks!

interface is interface

2014-06-17 Thread Pavel via Digitalmars-d-learn
Hello! import std.stdio; interface I { } interface B : I { void test(); } interface C : I { void test1(); } class A : B, C { override void test() {} override void test1() {} } void main() { A a = new A(); I b = cast(B)a; I c = cast(C)a; w

Problem with trying sample from doc page

2014-07-16 Thread Pavel via Digitalmars-d-learn
Hi! I've been experimenting with D functions, and found this piece of code: // int abc(int delegate(long i)); int def(int function(long s)); void test() { int b = 3; abc( (long c) { return 6 + b; } ); // inferred to delegate def( (long c) { return c * 2; } ); // inferred to function } /

Re: Problem with trying sample from doc page

2014-07-16 Thread Pavel via Digitalmars-d-learn
On Wednesday, 16 July 2014 at 15:12:58 UTC, Pavel wrote: Hi! I've been experimenting with D functions, and found this piece of code: // int abc(int delegate(long i)); int def(int function(long s)); void test() { int b = 3; abc( (long c) { return 6 + b; } ); // inferred to delegate def(

D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
Ok, let me start with the sample code: import std.stdio; import std.json; void main() { scope(failure) writeln("FaILED!!"); string jsonStr = `{ "name": "1", "type": "r" }`; auto parsed = parseJSON(jsonStr); string s = parsed["fail"].str; writeln(s == ""); writeln(s is null); writel

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:22:46 UTC, Adam D. Ruppe wrote: On Thursday, 24 July 2014 at 15:15:37 UTC, Pavel wrote: string s = parsed["fail"].str; Since there is no entry "fail" in the object, it returns a null JSON_VALUE pointer. Trying to get the string out of it is then seen as a nul

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:31:30 UTC, Daniel Gibson wrote: Am 24.07.2014 17:29, schrieb Pavel: On Thursday, 24 July 2014 at 15:22:46 UTC, Adam D. Ruppe wrote: On Thursday, 24 July 2014 at 15:15:37 UTC, Pavel wrote: string s = parsed["fail"].str; Since there is no entry "fail" in the obj

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:20:58 UTC, Justin Whear wrote: On Thu, 24 Jul 2014 15:15:36 +, Pavel wrote: Ok, let me start with the sample code: import std.stdio; import std.json; void main() { scope(failure) writeln("FaILED!!"); string jsonStr = `{ "name": "1", "type": "r" }`;

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:34:22 UTC, Ali Çehreli wrote: On 07/24/2014 08:29 AM, Pavel wrote: writeln(parsed["fail"] == null); Now compiler complains: Error: incompatible types for ((parsed.opIndex("fail")) == (null)): 'JSONValue' and 'typeof(null)' WAT?! Comparing against null sho

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:32:29 UTC, John Colvin wrote: On Thursday, 24 July 2014 at 15:15:37 UTC, Pavel wrote: Ok, let me start with the sample code: import std.stdio; import std.json; void main() { scope(failure) writeln("FaILED!!"); string jsonStr = `{ "name": "1", "type": "r" }`;

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:42:58 UTC, Pavel wrote: On Thursday, 24 July 2014 at 15:38:06 UTC, John Colvin wrote: On Thursday, 24 July 2014 at 15:32:29 UTC, John Colvin wrote: On Thursday, 24 July 2014 at 15:15:37 UTC, Pavel wrote: Ok, let me start with the sample code: import std.stdio;

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:38:06 UTC, John Colvin wrote: On Thursday, 24 July 2014 at 15:32:29 UTC, John Colvin wrote: On Thursday, 24 July 2014 at 15:15:37 UTC, Pavel wrote: Ok, let me start with the sample code: import std.stdio; import std.json; void main() { scope(failure) writeln("F

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:48:32 UTC, Edwin van Leeuwen wrote: On Thursday, 24 July 2014 at 15:42:58 UTC, Pavel wrote: On Thursday, 24 July 2014 at 15:38:06 UTC, John Colvin wrote: On Thursday, 24 July 2014 at 15:32:29 UTC, John Colvin wrote: On Thursday, 24 July 2014 at 15:15:37 UTC, Pav

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 15:59:52 UTC, Daniel Gibson wrote: Am 24.07.2014 17:54, schrieb Pavel: Guess what, here's a new snippet: import std.stdio; import std.json; void main() { scope(failure) writeln("FaILED!!"); string jsonStr = `{ "name": "1", "type": "r" }`; auto parsed = parse

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 16:02:12 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Thu, Jul 24, 2014 at 03:54:20PM +, Pavel via Digitalmars-d-learn wrote: [...] Guess what, here's a new snippet: import std.stdio; import std.json; void main() { scope(failure) writeln(&q

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 16:09:25 UTC, Justin Whear wrote: On Thu, 24 Jul 2014 16:04:01 +, Pavel wrote: Thanks to all you folks who explained "in" operator for me. My bad. Let's focus on the real problem, which is JSON wrapper class. Is it needed? Wouldn't it be better to get AA from

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 18:49:27 UTC, Ary Borenszweig wrote: On 7/24/14, 1:58 PM, Justin Whear wrote: On Thu, 24 Jul 2014 13:49:27 -0300, Ary Borenszweig wrote: Nope, a JSON can only be an array or an object (hash). Ary, can you point out the place in the spec where this is specified?

Re: D JSON (WAT?!)

2014-07-24 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 16:09:25 UTC, Justin Whear wrote: On Thu, 24 Jul 2014 16:04:01 +, Pavel wrote: Thanks to all you folks who explained "in" operator for me. My bad. Let's focus on the real problem, which is JSON wrapper class. Is it needed? Wouldn't it be better to get AA from

Re: D JSON (WAT?!)

2014-08-08 Thread Pavel via Digitalmars-d-learn
On Thursday, 24 July 2014 at 16:09:25 UTC, Justin Whear wrote: On Thu, 24 Jul 2014 16:04:01 +, Pavel wrote: Thanks to all you folks who explained "in" operator for me. My bad. Let's focus on the real problem, which is JSON wrapper class. Is it needed? Wouldn't it be better to get AA from