Re: Using D in Android App

2016-04-18 Thread Dan Olson via Digitalmars-d-learn
Justice writes: > On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote: >> Is it difficult to create a D business like app and connect it to >> android through java for the interface? >> >> I'd rather create all the complex stuff in D and either use it >> natively through java(I need a UI).

Re: GC configuration docs

2016-01-05 Thread Dan Olson via Digitalmars-d-learn
Rainer Schuetze writes: > On 05.01.2016 01:39, Dan Olson wrote: >> I haven't played with any of the new GC configuration options introduced >> in 2.067, but now need to. An application on watchOS currently has >> about 30 MB of RAM. Is there any more documentation than the web page >> https://d

GC configuration docs

2016-01-04 Thread Dan Olson via Digitalmars-d-learn
I haven't played with any of the new GC configuration options introduced in 2.067, but now need to. An application on watchOS currently has about 30 MB of RAM. Is there any more documentation than the web page https://dlang.org/spec/garbage.html or should I just browse druntime code? Also pointe

Re: Is this expected? default to public members in private class

2015-05-04 Thread Dan Olson via Digitalmars-d-learn
ketmar writes: > On Sun, 03 May 2015 18:07:20 -0700, Dan Olson wrote: > >> It seems a private class or struct defaults to public members. Just >> curious if this is intended. I would have expected private all the way >> down unless overriden. > > i bet it is intended. protection of struct/class

Is this expected? default to public members in private class

2015-05-03 Thread Dan Olson via Digitalmars-d-learn
It seems a private class or struct defaults to public members. Just curious if this is intended. I would have expected private all the way down unless overriden. --- plugh.d module plugh; auto makeFoo() {return new Foo;} private: class Foo { void maybepriv() {} private void priv() {}

Re: std.json questions

2015-04-25 Thread Dan Olson via Digitalmars-d-learn
"tired_eyes" writes: > > First issue: what is the proper ("idiomatic") way to conver JSONValue > to the proper types? > > Second: what is the proper way of handling boolean values in JSON (how > to convert JSON_TYPE.TRUE and JSON_TYPE.FALSE to bool)? > > Righ now I'm doing is something like this:

Re: Weird OSX issue

2015-04-25 Thread Dan Olson via Digitalmars-d-learn
Jacob Carlborg writes: > On 2015-04-24 20:37, Steven Schveighoffer wrote: > >> So am I going crazy? Or is dmd doing things differently depending on >> where its environment is? Any compiler gurus out there understand why >> the symbol is different? >> >> I don't want to file a bug with this, beca

Re: extern(C++) linker errors

2015-04-21 Thread Dan Olson via Digitalmars-d-learn
bitwise writes: > I am trying to interface to C++, and getting linker errors. Below are > my 3 source files and 2 build scripts with their associated > errors. Can anyone see what I'm doing wrong? Hi, I think both examples need libstdc++ added when you link (-L-lstdc++). That should resolve the

Re: Are there any methods like isDestroyed or isDisposed to detect whether some object is destroyed or not?

2014-12-14 Thread Dan Olson via Digitalmars-d-learn
"Marc "Schütz\"" writes: > On Saturday, 13 December 2014 at 21:20:43 UTC, Andrey Derzhavin wrote: >>> >>> import std.stdio; >>> >>> class ObjectAType { >>>bool ok; >>>this() {ok = true;} >>> } >>> >>> void main() >>> { >>>auto a = new ObjectAType; >>>assert(a.ok); >>>destroy(a

Re: Are there any methods like isDestroyed or isDisposed to detect whether some object is destroyed or not?

2014-12-13 Thread Dan Olson via Digitalmars-d-learn
"Andrey Derzhavin" writes: > Hello! > > We have object, for example, objA. > > ObjectAType objA = new ObjectAType(...); > > // we have a many references to objA > > void someFunction1(...) > { >// destroying the objA >destroy(one_of_the_refToObjA); > >// > } > > > void someFun

Re: mixin template had error by calling shared function

2014-12-11 Thread Dan Olson via Digitalmars-d-learn
Here is a way that will work. "Vlasov Roman" writes: > I have this code > > mixin template Template(void function() func1, void function() func2) mixin template Template(alias func1, alias func2) > class SomeClass { > mixin Template!(&func, &func23); mixin Template!(func, func23)