Re: How do I create a fileWatcher with an onFileChange event using spawn?

2017-08-28 Thread Jacob Carlborg via Digitalmars-d-learn
not sure how to send the onFiledChange event. A delegate perhaps? Or you can look at any of the existing event driven libraries that do this: http://code.dlang.org/packages/vibe-core http://code.dlang.org/packages/libasync -- /Jacob Carlborg

Re: Choosing between enum arrays or AliasSeqs

2017-08-25 Thread Jacob Carlborg via Digitalmars-d-learn
to be give as separate arguments. -- /Jacob Carlborg

Re: Web servers in D

2017-08-25 Thread Jacob Carlborg via Digitalmars-d-learn
b [2] http://code.dlang.org/packages/mysql-native [3] http://vibed.org/api/vibe.data.serialization -- /Jacob Carlborg

Re: dmd (v2.075.0): fully static linking: undefined reference to `__tls_get_addr'

2017-08-21 Thread Jacob Carlborg via Digitalmars-d-learn
/archives/digitalmars/D/learn/Static_linking_on_Linux_with_dmd_or_gcc_74954.html Any hints? You can use LDC to statically link the binary. -- /Jacob Carlborg

Re: Create class on stack

2017-08-07 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-08-06 17:47, Moritz Maxeiner wrote: If you use this option, do be aware that this feature has been scheduled for future deprecation [1]. It's likely going to continue working for quite a while (years), though. It's used all over the place in the DMD code base. -- /Jacob Carlborg

Re: Create class on stack

2017-08-06 Thread Jacob Carlborg via Digitalmars-d-learn
allocations. Is there any way to get D to allocate a class on the stack like a local struct? Prefix the variable declaration with "scope": scope foo = new Object; -- /Jacob Carlborg

Re: How to build GUI-based applications in D ?

2017-08-05 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-08-01 17:45, ashit wrote: thank you James i should try that. i was always enjoy the pure and efficiency of C. that made me stubborn to learn java. Just to be clear, there's no Java code in DWT. Everything is ported to D. -- /Jacob Carlborg

Re: Profiling after exit()

2017-07-28 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-07-28 11:30, Mario Kröplin wrote: Our programs are intended to run "forever". 24/7 servers. What's wrong with having a bool that determines if the loop should continue running? -- /Jacob Carlborg

Re: Profiling after exit()

2017-07-28 Thread Jacob Carlborg via Digitalmars-d-learn
As others have mentioned, you should in general avoid calling "exit" in a D program. There's a C function called "atexit" that allows to register a callback that is called after calling "exit". You could perhaps join the threads there. I don't know if that helps

Re: Cast to subclass in the dmd compiler

2017-07-26 Thread Jacob Carlborg via Digitalmars-d-learn
h can used in combination with a cast. -- /Jacob Carlborg

Re: Get UDA of unit tests during Runtime.moduleUnitTester

2017-07-26 Thread Jacob Carlborg via Digitalmars-d-learn
are combined into one function per module, which is what Runtime.moduleUnitTester is running. The separate unit test blocks are gone at runtime so there's nothing to connect the UDAs to. -- /Jacob Carlborg

Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-25 Thread Jacob Carlborg via Digitalmars-d-learn
problem. I think it was agreed that everything should be accessible through introspection. -- /Jacob Carlborg

Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-19 Thread Jacob Carlborg via Digitalmars-d-learn
1] https://is.gd/segmDD -- /Jacob Carlborg

Re: C style 'static' functions

2017-07-19 Thread Jacob Carlborg via Digitalmars-d-learn
sorted it out. -- /Jacob Carlborg

Re: C style 'static' functions

2017-07-19 Thread Jacob Carlborg via Digitalmars-d-learn
be easier if you provide a small code example of what you want to achieve. -- /Jacob Carlborg

Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-19 Thread Jacob Carlborg via Digitalmars-d-learn
/xlld/wrap.d#L686 And https://dlang.org/spec/traits.html#allMembers to iterate all members in a module. -- /Jacob Carlborg

Re: Appending static arrays

2017-07-18 Thread Jacob Carlborg via Digitalmars-d-learn
you go with "concatenate". -- /Jacob Carlborg

Re: Silly struct behaviour

2017-07-14 Thread Jacob Carlborg via Digitalmars-d-learn
}));// fail } Wh D? It makes no sense, the compiler knows what is the type of the first processFoo arg anyway... https://github.com/dlang/DIPs/pull/71 -- /Jacob Carlborg

Re: 2D game physics, macOS

2017-07-13 Thread Jacob Carlborg via Digitalmars-d-learn
, just import and dub dependency). You can try creating your own bindings. DStep [1] is a tool that can help with that. Make sure you build DStep from master. [1] http://github.com/jacob-carlborg/dstep -- /Jacob Carlborg

Re: Foreign threads in D code.

2017-07-12 Thread Jacob Carlborg via Digitalmars-d-learn
not allocated via the GC). It will not collect memory allocated by other means, but that Foo* you got from D and are using in C++ might point to a Bar soon after the GC runs. Yes, that can happen. -- /Jacob Carlborg

Re: 2D game physics, macOS

2017-07-12 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-07-12 12:18, Joel wrote: Is there a 2D physics library I can use on macOS, with D? I already use a multimedia library for graphics, sound and input. Box2D [1] perhaps. I think I've seen bindings for it, somewhere. [1] http://box2d.org -- /Jacob Carlborg

Re: Foreign threads in D code.

2017-07-12 Thread Jacob Carlborg via Digitalmars-d-learn
from happening, either * reallocate and copy the object using the foreign code's storage allocator or using the C runtime library's malloc/free." [2]. [1] http://dlang.org/spec/garbage.html#how_gc_works [2] http://dlang.org/spec/garbage.html#gc_foreign_obj -- /Jacob Carlborg

Re: Fiber based UI-Toolkit

2017-07-11 Thread Jacob Carlborg via Digitalmars-d-learn
n you need the result of an aysnc function call. -- /Jacob Carlborg

Re: Fiber based UI-Toolkit

2017-07-10 Thread Jacob Carlborg via Digitalmars-d-learn
doesn't work well for UI applications. It's that basically the whole idea of async/await? Seems like Microsoft is pushing quite heavily for that in GUI code. -- /Jacob Carlborg

Re: Application settings

2017-07-10 Thread Jacob Carlborg via Digitalmars-d-learn
l [3] http://sdlang.org -- /Jacob Carlborg

Re: Fiber based UI-Toolkit

2017-07-10 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-07-09 23:12, bauss wrote: I believe OSX (possibly macOS too.) only allows it from the main thread. Yes, that's correct. But what's the difference between OSX and macOS ;) -- /Jacob Carlborg

Re: Fiber based UI-Toolkit

2017-07-10 Thread Jacob Carlborg via Digitalmars-d-learn
on Windows. -- /Jacob Carlborg

Re: D and .lib files. C++/Other?

2017-07-02 Thread Jacob Carlborg via Digitalmars-d-learn
he different formats in the dlang blog [1] and here [2]. [1] http://dlang.org/blog/2017/06/26/project-highlight-derelict/ [2] http://derelictorg.github.io/bindings/ -- /Jacob Carlborg

Re: D and .lib files. C++/Other?

2017-07-01 Thread Jacob Carlborg via Digitalmars-d-learn
able to find anything if there is anything. Mixing C++ and D DLLs should work. If you're statically linking the DLL, which requires import libraries on Windows, you might have the above issue. -- /Jacob Carlborg

Re: Advice wanted on garbage collection of sockets for c++ programmer using D

2017-06-28 Thread Jacob Carlborg via Digitalmars-d-learn
lly lead to problems. Sounds like you need a connection pool. The vibe.d [1] framework contains connection pools. It's also possible to manually disable the GC for a while and then enable it again. [1] http://vibed.org -- /Jacob Carlborg

Re: Advice wanted on garbage collection of sockets for c++ programmer using D

2017-06-28 Thread Jacob Carlborg via Digitalmars-d-learn
class was allocated on the stack, i.e. with the "scope" keyword. -- /Jacob Carlborg

Re: libc dependency

2017-06-21 Thread Jacob Carlborg via Digitalmars-d-learn
this as easy as possible for users. Perhaps not when targeting Windows but when targeting Linux. Can you target a specific version of libc or do you need to use static linking? -- /Jacob Carlborg

Re: libc dependency

2017-06-21 Thread Jacob Carlborg via Digitalmars-d-learn
is required for linking with other existing C libraries. -- /Jacob Carlborg

Re: libc dependency

2017-06-20 Thread Jacob Carlborg via Digitalmars-d-learn
a fully working cross-compiler tool chain. You might need some extra libraries as well, depending on what you need. [1] https://lld.llvm.org -- /Jacob Carlborg

Re: libc dependency

2017-06-20 Thread Jacob Carlborg via Digitalmars-d-learn
l it would be a lot easier to create our own tool chain (and get full support for static liking). Avoiding the need to download the C tool chain to be able to use D. I've heard that many times, especially on macOS: "oh, you need to download Xcode to use D?". -- /Jacob Carlborg

Re: libc dependency

2017-06-20 Thread Jacob Carlborg via Digitalmars-d-learn
-- /Jacob Carlborg

Re: D and memory mapped devices

2017-06-14 Thread Jacob Carlborg via Digitalmars-d-learn
constructor or the struct initializer syntax to bypass the generate methods and set the underlying storage field directly. [1] https://github.com/jacob-carlborg/dstep/issues/151 -- /Jacob Carlborg

Re: D for Web Development?

2017-06-08 Thread Jacob Carlborg via Digitalmars-d-learn
is that that good a creating abstractions. [1] http://code.dlang.org/packages/ddb -- /Jacob Carlborg

Re: Linker cannot find malloc and free on OS X

2017-06-05 Thread Jacob Carlborg via Digitalmars-d-learn
as extern(C) we're actually calling C functions using the D calling conventions, which just happens to work in this case because the C and D calling conventions are mostly the same. [1] https://github.com/nordlow/gmp-d/blob/master/src/gmp/z.d#L1164-L1165 -- /Jacob Carlborg

Re: Linker cannot find malloc and free on OS X

2017-06-05 Thread Jacob Carlborg via Digitalmars-d-learn
no point in looking for "-lc" since the C standard library on macOS is placed in /usr/lib/libSystem.B.dylib. -- /Jacob Carlborg

Re: D and GDB

2017-06-04 Thread Jacob Carlborg via Digitalmars-d-learn
the is going on. :-( #0 0x7fffc770 in ?? () If you refer to ??, I'm guessing that's inside libdvbv5.so which might not have been compiled with debug information enabled. -- /Jacob Carlborg

Re: std.path.buildPath

2017-06-04 Thread Jacob Carlborg via Digitalmars-d-learn
to (without using sudo). I expected the result of buildPath to be "result/usr/include/libxml2/libxml". -- /Jacob Carlborg

Re: Linker cannot find malloc and free on OS X

2017-06-04 Thread Jacob Carlborg via Digitalmars-d-learn
rdlow/gmp-d/issues/4#issuecomment-305974761 I would recommend adding the --verbose flag to see the exact commands invoked. That will print how the D compiler was invoked. The copy-paste the exact command and add the -v flag (for verbose). To the same with the C compiler and the linker. -- /Jacob Carlborg

Re: std.path.buildPath

2017-06-04 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-06-04 07:44, Jesse Phillips wrote: What is your expected behavior? Throw an exception? You can't really append an absolute path to another. Of course you can. I expect buildPath("/foo", "/bar") to result in "/foo/bar". That's how Ruby behaves. -- /Jacob Carlborg

Re: C macros vs D can't do the right thing

2017-06-03 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-06-03 16:22, David Nadlinger wrote: We could also finally fix the frontend to get around this. At DConf 2015, Walter officially agreed that this is a bug that needs fixing. ;) That would be nice. -- /Jacob Carlborg

Re: std.path.buildPath

2017-06-03 Thread Jacob Carlborg via Digitalmars-d-learn
bsolute), the preceding segments will be dropped." I cannot find any excuse for this to be even remotely reasonable. Unfortunately it's been like this since forever. I mean, I checked the git history, it's been like this for as long as we have history, including when it was called "join". -- /Jacob Carlborg

Re: C macros vs D can't do the right thing

2017-06-03 Thread Jacob Carlborg via Digitalmars-d-learn
not match template declaration foo(alias a)() Perhaps using the variadic template with a constraint on one element trick will work. Ugly, but I think that will work. -- /Jacob Carlborg

Re: No tempFile() in std.file

2017-05-16 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-16 09:39, Anonymouse wrote: Linker --gc-sections IIRC that only works with LDC. With DMD it's possible that it removes sections that are used but not directly referenced. -- /Jacob Carlborg

Re: Lookahead in unittest

2017-05-11 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-10 18:17, Stefan Koch wrote: It looks like this unitest-test block are treated like a function. unittest blocks are lowered to functions. -- /Jacob Carlborg

Re: Structure of platform specific vs non platform specific code

2017-05-10 Thread Jacob Carlborg via Digitalmars-d-learn
API across all platforms. -- /Jacob Carlborg

Re: Structure of platform specific vs non platform specific code

2017-05-09 Thread Jacob Carlborg via Digitalmars-d-learn
way around. -- /Jacob Carlborg

Re: get vtable size

2017-05-08 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-07 06:01, Mike B Johnson wrote: how many elements(virtual functions) are in the __vptr? I guess you can use __traits(allMembers) and __traits(isVirtualMethod) [1]. [1] http://dlang.org/spec/traits.html -- /Jacob Carlborg

Re: Why does this compile (method in class without return type)

2017-05-08 Thread Jacob Carlborg via Digitalmars-d-learn
t; I see. -- /Jacob Carlborg

Re: Why does this compile (method in class without return type)

2017-05-03 Thread Jacob Carlborg via Digitalmars-d-learn
nst auto b = 4; // here "auto" is redundant const c = 5; In your case you have "final" as the attribute. -- /Jacob Carlborg

Re: Top level associative arrays

2017-05-02 Thread Jacob Carlborg via Digitalmars-d-learn
o define this array using enum. What is key difference between them in this case? Thanks. Sorry if my English is not clear. Note that when declared as "enum", all places it's referenced, a new associative array will be allocated. -- /Jacob Carlborg

Re: Porting Java code to D that uses << and >>> operators

2017-05-02 Thread Jacob Carlborg via Digitalmars-d-learn
ments and AssignExpression". -- /Jacob Carlborg

Re: Porting Java code to D that uses << and >>> operators

2017-05-01 Thread Jacob Carlborg via Digitalmars-d-learn
tion order defined but Java does. [1] http://dsource.org/projects/dwt/wiki/Porting#Evaluationorder -- /Jacob Carlborg

Re: interfacing Cpp - GCC Dual ABI abi_tag in name mangling

2017-04-30 Thread Jacob Carlborg via Digitalmars-d-learn
uot;); to set the mangled name of a symbol. -- /Jacob Carlborg

Re: Stuck with DMD, and Unit-Threaded

2017-04-17 Thread Jacob Carlborg via Digitalmars-d-learn
for "sourceFiles". Perhaps remove "source/main.d"? [1] https://github.com/jacob-carlborg/kiwi/blob/dev/dub.sdl#L11-L22 -- /Jacob Carlborg

Re: SFML gcc - MacOS

2017-04-17 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-04-16 10:11, Joel wrote: I've got Xcode, do I enter `xcode-select --install` in the terminal? Yes. That will get you access to Clang, the linker and other tools on the command line. It will also create /usr/include needed to build C/C++ code from the command line. -- /Jacob

Re: SFML gcc - MacOS

2017-04-16 Thread Jacob Carlborg via Digitalmars-d-learn
for a while now. I would appreciate any help. For macOS I highly recommend installing Xcode from the app store and install the command line developer tools (xcode-select --install). -- /Jacob Carlborg

Re: Duplicated functions not reported?

2017-04-15 Thread Jacob Carlborg via Digitalmars-d-learn
the name and the number of parameters (shouldn't require semantic analyze?) and only do the check for those functions that match. I would guess that would be quite few functions that falls within that criteria. Also, only within a single module. -- /Jacob Carlborg

Duplicated functions not reported?

2017-04-15 Thread Jacob Carlborg via Digitalmars-d-learn
function overloading works? Is it possible to for the compiler to report this error? At least this example is pretty obvious for a human to see. -- /Jacob Carlborg

Re: Function names and lambdas

2017-04-08 Thread Jacob Carlborg via Digitalmars-d-learn
. It's more difficult to know if the function should be called or if the address of the function should be taken. -- /Jacob Carlborg

Re: Undefined Reference calling D from C using static linking

2017-03-23 Thread Jacob Carlborg via Digitalmars-d-learn
As an ugly workaround, you can defined the "_d_dso_registry" symbol yourself. To be sure, it should match the signature in the runtime. -- /Jacob Carlborg

Re: Does "dub test" run tests?

2017-03-20 Thread Jacob Carlborg via Digitalmars-d-learn
flags that Dub uses when invoking DMD when "dub test --verbose" is run: -debug -g -unittest -w -- /Jacob Carlborg

Re: exceptions thrown when running app with failed unittests

2017-03-20 Thread Jacob Carlborg via Digitalmars-d-learn
useless and ought to just be removed (or at least shortened to just the top few lines). Thx Adam. You might want to look at using some unit test framework/library, as unit-threaded [1], which might give you a better experience. [1] http://code.dlang.org/packages/unit-threaded -- /Jacob

Re: Inplace toLower()

2017-03-20 Thread Jacob Carlborg via Digitalmars-d-learn
. -- /Jacob Carlborg

Re: What is PostgreSQL driver is most stable?

2017-03-17 Thread Jacob Carlborg via Digitalmars-d-learn
.length]); assert(foo.name == row["name"]); } executeQuery - for returning a set of rows executeRow - for returning a single executeNonQuery - for executing a query without any result See the examples for more information [1]. [1] https://github.com/pszturmaj/ddb/blob/master/examples/basic.d -- /Jacob Carlborg

Re: What is PostgreSQL driver is most stable?

2017-03-16 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-03-14 14:32, Suliman wrote: Does it work fine on Linux with x64 Postgres? I've tested it on macOS and Linux 64bit. Works great. -- /Jacob Carlborg

Re: Is it possible to use std.experimental.allocator without the runtime or with the runtime disabled?

2017-03-08 Thread Jacob Carlborg via Digitalmars-d-learn
places. Exceptions seem to only be used in the free_list module. It also uses compile time features from Phobos. -- /Jacob Carlborg

Re: Writing pattern matching macros in D.

2017-03-06 Thread Jacob Carlborg via Digitalmars-d-learn
be possible: 1.match( 3, e => writeln("value is 3"), (int e) => writeln("value is an integer"), () => writeln("fallback") ); -- /Jacob Carlborg

Re: Recommend: IDE and GUI library

2017-02-25 Thread Jacob Carlborg via Digitalmars-d-learn
the same on all platforms, there might be other better suited alternatives. -- /Jacob Carlborg

Re: Serializer class

2017-02-25 Thread Jacob Carlborg via Digitalmars-d-learn
-carlborg/orange -- /Jacob Carlborg

Re: Serializer class

2017-02-24 Thread Jacob Carlborg via Digitalmars-d-learn
ue.tupleof[i][0]" instead of "mm[0]" as well. -- /Jacob Carlborg

Re: Class Order Style

2017-02-24 Thread Jacob Carlborg via Digitalmars-d-learn
enum b = 2; static int c = 3; static int d = 4; private int e_; private int f_; this(int e, int f) {} static void g(); static void h(); int e() { return e_; } int f() { return f_; } void i(); void j(); private: void k(); void l(); } -- /Jacob Carlborg

Re: Getting nice print of struct for debugging

2017-02-24 Thread Jacob Carlborg via Digitalmars-d-learn
pends. You can create a template mixin containing the implementation of toString, which need to be mixed in in all structs. Or you can create a new function that can convert any passed in structs in a generic way. It depends on what you need the string for. -- /Jacob Carlborg

Re: How do I use CTFE to generate an immutable associative array at compile time?

2017-02-22 Thread Jacob Carlborg via Digitalmars-d-learn
would only use to the immutable variable and never the enum. enum aa = [1 : 2]; immutable int[int] iaa; static this() { iaa = aa; } -- /Jacob Carlborg

Re: Getting nice print of struct for debugging

2017-02-21 Thread Jacob Carlborg via Digitalmars-d-learn
uot;, name, mixin("s." ~ name)); The string mixin example works for methods, opDispatch and similar as well. The tupleof example, the first one, works only for fields. -- /Jacob Carlborg

Re: Hello, folks! Newbie to D, have some questions!

2017-02-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-02-19 13:45, ketmar wrote: nogc doesn't turn it off, if says that compiler must ensure that *your* *code* doesn't allocate, Just to clarify, allocate using the GC. It's perfectly fine to allocate using malloc in a @nogc function. -- /Jacob Carlborg

Re: Get the address of an object, within the object itself

2017-02-16 Thread Jacob Carlborg via Digitalmars-d-learn
g: import core.stdc.stdio; class Node { this() { printf("%p\n", this); } } void main() { new Node; } -- /Jacob Carlborg

Re: Creating an array of immutable objects

2017-02-14 Thread Jacob Carlborg via Digitalmars-d-learn
gt; new FileDesc(t.value, t.index)); } static this() { import std.experimental.allocator; _fileDesc2 = theAllocator.makeArray!(FileDesc)(makeFileDescs(paths)); } -- /Jacob Carlborg

Re: Creating an array of immutable objects

2017-02-14 Thread Jacob Carlborg via Digitalmars-d-learn
makeFileDescs(const string[] paths) { return paths.enumerate!uint.map!(t => FileDesc(t.value, t.index)); } static this() { import std.experimental.allocator; _fileDesc2 = theAllocator.makeArray!FileDesc(makeFileDescs(paths)); } -- /Jacob Carlborg

Re: Minimum PR size

2017-01-31 Thread Jacob Carlborg via Digitalmars-d-learn
of code, e.g. one assert () in a unittest block, would be considered not worth the time to consider as a PR? The smaller PR the better :). There's more of an issue if the PR is too big. But adding one assert to one unit test block in ten different PR's might not be appropriate. -- /Jacob Carlborg

Re: What do you use to generate documentation?

2017-01-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-01-19 19:45, Suliman wrote: It's seems that there is no any big changes in this deal. The upcoming 2.073.0 (now in release candidate) has a completely new default Ddoc theme. -- /Jacob Carlborg

Re: What do you use to generate documentation?

2017-01-19 Thread Jacob Carlborg via Digitalmars-d-learn
. -- /Jacob Carlborg

Re: version identifier hygiene

2017-01-16 Thread Jacob Carlborg via Digitalmars-d-learn
n. Or if the user of the library could supply the config file from the beginning then no version statements are needed. Not sure if that's possible though. -- /Jacob Carlborg

Re: Delegate parameter name shadows type name

2017-01-09 Thread Jacob Carlborg via Digitalmars-d-learn
or function parameter I always think that the syntax is the same as the declaring a regular function, but replacing the function name with "delegate". -- /Jacob Carlborg

Re: Delegate parameter name shadows type name

2017-01-09 Thread Jacob Carlborg via Digitalmars-d-learn
taking an int, no parameter name auto b = (Foo) => 3; // error, cannot infer type of template lambda alias b = (Foo) => 3; // works, since this is an alias, Foo is the parameter name of an unknown type -- /Jacob Carlborg

Re: Selective unittesting in DUB

2016-12-21 Thread Jacob Carlborg via Digitalmars-d-learn
ut I don't think you can disable some of the unittest blocks in a single module. There's also unit-threaded [1] which allows you to run specific unit tests. [1] https://github.com/atilaneves/unit-threaded -- /Jacob Carlborg

Re: Is it possbile to specify a remote git repo as dub dependency?

2016-12-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-12-19 13:11, biocyberman wrote: I can write a short script to clone the remote git repo and use it as a submodule. But if it is possible to do with dub, it will be more convenient. It's not currently possible. -- /Jacob Carlborg

Re: Using tango with dub

2016-12-18 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-12-17 21:15, bauss wrote: I thought Tango was obsolete a long time ago. It's a third party library like any other library. -- /Jacob Carlborg

Re: Using tango with dub

2016-12-18 Thread Jacob Carlborg via Digitalmars-d-learn
no luck. Is it possible to get around them? I don't know. Seems like the -Werror flag is passed, somewhere. -- /Jacob Carlborg

Re: Using tango with dub

2016-12-17 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-12-17 16:51, albert-j wrote: Since I just do "dub build", I assume it invokes dmd? I have v2.072.0. Try an older version. -- /Jacob Carlborg

Re: Using tango with dub

2016-12-17 Thread Jacob Carlborg via Digitalmars-d-learn
/Log.d(349,51): Error: undefined identifier '__va_argsave', did you mean struct '__va_argsave_t'? What am I missing? It might not be compatible with that version of the compiler. Or are you using something that is not DMD? -- /Jacob Carlborg

Re: Get fils at compile-time

2016-12-15 Thread Jacob Carlborg via Digitalmars-d-learn
enerateCommands" build setting. You can write the script in D and invoke it using "dmd -run generate_files.d". Remember to add -J with the path to the folder to your build script, or use the "importPaths" build setting if you're using Dub. -- /Jacob Carlborg

Re: Check whether function/delegate uses any shared or global variables

2016-12-12 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-12-12 12:15, Nicholas Wilson wrote: there is the pure function attribute, how ever this still allows you to use globals *if you pass them as parameters to the function*. And it can access immutable global data. -- /Jacob Carlborg

Re: How to use library compiled with Microsoft Visual Studio 2015 in D?

2016-12-04 Thread Jacob Carlborg via Digitalmars-d-learn
l produce COFF objects and use the Visual Studio tool chain (linker and runtime). Compiling for 64bit (-m64) will always produce COFF objects. -- /Jacob Carlborg

Re: how to catch D Throwables (or exceptions) from C++?

2016-12-02 Thread Jacob Carlborg via Digitalmars-d-learn
("foo"); } extern(C++) immutable(char)* getExceptionMessage(void* e) { if (e) { auto t = cast(Throwable) e; return t.msg.ptr; } return null; } I'm compiling the C++ code with clang++ and I need to link with libc++abi. -- /Jacob Carlborg

Re: Parsing a string to instantiate classes at runtime

2016-11-28 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-11-29 07:46, Marduk wrote: Aha! Interesting. Thanks. Then you can call a custom method that acts as a constructor when the instance is created this way, if there's a need for it. -- /Jacob Carlborg

<    1   2   3   4   5   6   7   8   9   10   >