Re: Where is COFFIMPLIB

2015-04-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-04-18 20:20, Darrell Gallion wrote: Thought there were other complications on Windows for 64bit? I don't know, I never used it. -- /Jacob Carlborg

Re: Building website from git master, why does it checkout DMD v2.066.1 and die?

2015-04-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-04-19 10:56, Jacob Carlborg wrote: The makefile isn't updated, see [1]. Trying adding "STABLE_DMD_VER=2.067.0" to the command you're running. Pull request: https://github.com/D-Programming-Language/dlang.org/pull/968 -- /Jacob Carlborg

Re: Building website from git master, why does it checkout DMD v2.066.1 and die?

2015-04-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-04-19 10:56, Jacob Carlborg wrote: The makefile isn't updated, see [1]. Trying adding "STABLE_DMD_VER=2.067.0" to the command you're running. That won't work because someone thought it was a good idea to split the download site per year :( . Try overr

Re: Building website from git master, why does it checkout DMD v2.066.1 and die?

2015-04-19 Thread Jacob Carlborg via Digitalmars-d-learn
ot; to the command you're running. [1] https://github.com/D-Programming-Language/dlang.org/blob/master/posix.mak#L29-L31 -- /Jacob Carlborg

Re: About @ and UDA

2015-04-18 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-04-17 21:35, Jacob Carlborg wrote: UDA's were available when these attributes/keywords were created. Reasons why they're still not UDA's are probably a mix of avoiding code breakage and someone that needs to make the change. Were _not_ available ... -- /Jacob Carlborg

Re: About @ and UDA

2015-04-17 Thread Jacob Carlborg via Digitalmars-d-learn
y're still not UDA's are probably a mix of avoiding code breakage and someone that needs to make the change. -- /Jacob Carlborg

Re: Where is COFFIMPLIB

2015-04-17 Thread Jacob Carlborg via Digitalmars-d-learn
sword. ftp://digitalmars.com/coffimplib.zip If you compile as 64bit or with the -m32mscoff flag the compiler will output object files in the COFF format. -- /Jacob Carlborg

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-17 Thread Jacob Carlborg via Digitalmars-d-learn
On Linux that is GCC, on OS X it's Clang/GCC, on Windows it's either DMC or VS depending on what object format is used, I guess. DMC is not even available for any other platform than Windows. -- /Jacob Carlborg

Re: Linking C++ standard library works with GDC... but not DMD. (Linux)

2015-04-16 Thread Jacob Carlborg via Digitalmars-d-learn
incompatible because rely on different compiler built-ins. The title says (Linux), where DMD uses GCC and not DMC. -- /Jacob Carlborg

Re: About @ and UDA

2015-04-15 Thread Jacob Carlborg via Digitalmars-d-learn
ny new attributes, not as keywords but as compiler recognized UDA's. Then it's possible to use the fully qualified name of the UDA to disambiguate. -- /Jacob Carlborg

Re: Trouble in converting C code to D

2015-04-12 Thread Jacob Carlborg via Digitalmars-d-learn
luded from the cpl_progress.h file. -- /Jacob Carlborg

Re: Trouble in converting C code to D

2015-04-12 Thread Jacob Carlborg via Digitalmars-d-learn
if( GDALGetGeoTransform( hDataset, adfGeoTransform.ptr ) == CE_None ) { } } -- /Jacob Carlborg

Re: Trouble in converting C code to D

2015-04-12 Thread Jacob Carlborg via Digitalmars-d-learn
ubles. Static arrays are stack allocated and passed by value, the function expects an array which is passed by reference. Try adding ".ptr" to "adfGeoTransform" in the call to GDALGetGeoTransform. [1] http://dlang.org/arrays.html#static-arrays -- /Jacob Carlborg

Re: D + .NET

2015-03-12 Thread Jacob Carlborg via Digitalmars-d-learn
e.com/library/mac/documentation/Cocoa/Reference/ObjCRuntimeRef/index.html [2] https://github.com/D-Programming-Language/dmd/pull/4321 -- /Jacob Carlborg

Re: DMD Zip for Mac OS X

2015-02-28 Thread Jacob Carlborg via Digitalmars-d-learn
iversal binary containing both the 32 and 64bit version. All system libraries on OS X are universal binaries, so cross-compiling is usually no problem. -- /Jacob Carlborg

Re: Will D have a standard cross platform GUI toolkit?

2015-02-26 Thread Jacob Carlborg via Digitalmars-d-learn
your favorite languages I can recommend DWT [1], a port of SWT to D. It works for Windows and Linux, a port of OS X is being worked on. [1] https://github.com/d-widget-toolkit/dwt -- /Jacob Carlborg

Re: Deprecation process documented?

2015-02-25 Thread Jacob Carlborg via Digitalmars-d-learn
the case with symbols that are actually deprecated. Thank you for the explanation. -- /Jacob Carlborg

Re: Deprecation process documented?

2015-02-24 Thread Jacob Carlborg via Digitalmars-d-learn
t get around to moving it along when I was supposed to or because someone else deprecated it and didn't mark it the way that I normally mark them, in which case, I sometimes miss those. Ok, thanks. -- /Jacob Carlborg

Deprecation process documented?

2015-02-23 Thread Jacob Carlborg via Digitalmars-d-learn
Is the deprecation process used for Phobos and druntime code documented somewhere? I.e. how long after a deprecation is a symbols removed and so on. -- /Jacob Carlborg

Re: Conditional Compilation for Specific Windows

2015-01-07 Thread Jacob Carlborg via Digitalmars-d-learn
s would be ideal, thanks. You can either: 1. Convert an up to date user32.lib to OMF 2. Create your own user32.lib from the DLL 3. Compile using the COFF format and use the Visual Studio runtime instead. This has been recently added (I'm not sure if it's released yet) and requires using a flag -- /Jacob Carlborg

Re: Conditional Compilation for Specific Windows

2015-01-07 Thread Jacob Carlborg via Digitalmars-d-learn
king about runtime because I want the same binary to run on all windows versions so I have to support both and determine which one I am running on at runtime. Use the regular system API's as you would in C. Should be easy to find if you search the web. -- /Jacob Carlborg

Re: vibe.d + dub dynamic library

2015-01-03 Thread Jacob Carlborg via Digitalmars-d-learn
dub use the dynamic version of phobos. I'm not sure how Dub builds vibe.d but if a shared library is present isn't that usually preferred to static libraries? -- /Jacob Carlborg

Re: dub dustmite

2014-12-11 Thread Jacob Carlborg via Digitalmars-d-learn
lease via Dub. -- /Jacob Carlborg

Re: How to ensure a thread cannot be blocked by the GC?

2014-12-04 Thread Jacob Carlborg via Digitalmars-d-learn
t know anything about threads created outside of D, unless you explicitly register them with the runtime. -- /Jacob Carlborg

Re: Tagged enums why reserved words are not permitted ?

2014-10-28 Thread Jacob Carlborg via Digitalmars-d-learn
uts "calling foo bar" end end Bar.new.send("foo bar") # calls the method "foo bar" CoffeeScript: class Foo bar: -> console.log "bar" a = { class: "foo" } console.log a.class # prints "foo" -- /Jacob Carlborg

Re: Base class with member parameterized on type of extending class

2014-10-20 Thread Jacob Carlborg via Digitalmars-d-learn
MachineMixin (T) { private StateMachine!T _stateMachine; // other code that need access to _stateMachine } class MainMenu : Scene { mixin StateMachineMixin!(typeof(this)); } -- /Jacob Carlborg

Re: Base class with member parameterized on type of extending class

2014-10-19 Thread Jacob Carlborg via Digitalmars-d-learn
I'm guessing you like to avoid that if possible. -- /Jacob Carlborg

Re: Recommended GUI library?

2014-10-18 Thread Jacob Carlborg via Digitalmars-d-learn
ve any dependencies except for system libraries. [1] https://github.com/d-widget-toolkit/dwt -- /Jacob Carlborg

Re: object hijacked ?

2014-10-09 Thread Jacob Carlborg via Digitalmars-d-learn
i does not get imported and you get lot of different issues from missing declarations. So it just picks the first filename matching "object" and doesn't care about its module name. -- /Jacob Carlborg

object hijacked ?

2014-10-09 Thread Jacob Carlborg via Digitalmars-d-learn
ng dmd to get the dependencies. But the module system should still prevent it. It seems like the compiler uses the filename instead of the declared module name as the module name. -- /Jacob Carlborg

Re: How to detect start of Unicode symbol and count amount of graphemes

2014-10-06 Thread Jacob Carlborg via Digitalmars-d-learn
On 06/10/14 19:48, H. S. Teoh via Digitalmars-d-learn wrote: This looks wrong to me. Are you sure this finds *all* possible graphemes? No, the data I gave was to detect a complete code unit. Graphemes are something else, I think Uranuz is mixing up the Unicode terms. -- /Jacob Carlborg

Re: How to detect start of Unicode symbol and count amount of graphemes

2014-10-05 Thread Jacob Carlborg via Digitalmars-d-learn
new sequence started? Have a look here [1]. For example, if you have a byte that is between U+0080 and U+07FF you know that you need two bytes to get that whole code point. [1] http://en.wikipedia.org/wiki/UTF-8#Description -- /Jacob Carlborg

Re: Hunting down rogue memory allocations?

2014-10-03 Thread Jacob Carlborg via Digitalmars-d-learn
If you have OS X, you can use Instruments that comes installed with Xcode. -- /Jacob Carlborg

Re: find all public properties at compile time

2014-09-30 Thread Jacob Carlborg via Digitalmars-d-learn
On 2014-09-30 22:19, anonymous wrote: import std.typetuple: staticMap; enum stringOf(alias thing) = thing.stringof; It's better to use __traits(identifier) instead of .stringof. -- /Jacob Carlborg

Re: Dynamically loading a D dynamic library from a c++ program

2014-09-27 Thread Jacob Carlborg via Digitalmars-d-learn
On 2014-09-26 21:52, John Colvin wrote: Yes, but it depends on the complexity of the headers. C++ templates aren't supported for example. Templates are supported, if they're already instantiated. -- /Jacob Carlborg

Re: Object.factory from shared libraries

2014-09-26 Thread Jacob Carlborg via Digitalmars-d-learn
s has nothing to do with Object.factory. -- /Jacob Carlborg

Re: Object.factory from shared libraries

2014-09-26 Thread Jacob Carlborg via Digitalmars-d-learn
lly only working on Linux. -- /Jacob Carlborg

Re: Interop with C++ library - what toolchain do you use?

2014-09-17 Thread Jacob Carlborg via Digitalmars-d-learn
support for COFF in 32bit. I don't think this has been released yet, but it's available in git master. -- /Jacob Carlborg

Re: How do I properly exit from a D program (outside main)?

2014-09-15 Thread Jacob Carlborg via Digitalmars-d-learn
, throw an exception instead. -- /Jacob Carlborg

Re: Downloading Files in D

2014-09-11 Thread Jacob Carlborg via Digitalmars-d-learn
es in DVM [3] [1] https://github.com/SiegeLord/Tango-D2 [2] http://siegelord.github.io/Tango-D2/tango.net.http.HttpGet.html [3] https://github.com/jacob-carlborg/dvm/blob/master/dvm/commands/Fetch.d#L80 -- /Jacob Carlborg

Re: How to get nogc to work with manual memory allocation

2014-09-04 Thread Jacob Carlborg via Digitalmars-d-learn
On 04/09/14 22:30, Kagamin wrote: emplace calls constructor, and constructor can't be realistically required to be nogc. It depends on the constructor. Similar for destroy. But if the constructor is @nogc or if there's a default constructor. -- /Jacob Carlborg

Re: D1: Error: duplicate union initialization for size

2014-08-31 Thread Jacob Carlborg via Digitalmars-d-learn
github.com/D-Programming-Language/dmd/commit/840d88a6e539e9817cffdc4abe8ad6357897d54a -- /Jacob Carlborg

Re: D1: Error: duplicate union initialization for size

2014-08-27 Thread Jacob Carlborg via Digitalmars-d-learn
On 27/08/14 23:48, jicman wrote: On Wednesday, 27 August 2014 at 06:20:24 UTC, Jacob Carlborg wrote: On 23/08/14 19:50, jicman wrote: This is line 7634: const Size DEFAULT_SCALE = { 5, 13 }; What does the error say and how can I fix it? Thanks. Does the following make any difference

Re: D1: Error: duplicate union initialization for size

2014-08-26 Thread Jacob Carlborg via Digitalmars-d-learn
it, I think. It's declared in "drawing.d". Well, at least I found one declared there. But that's not a union, it's a struct. I don't understand why it complains about a struct. -- /Jacob Carlborg

Re: D1: Error: duplicate union initialization for size

2014-08-26 Thread Jacob Carlborg via Digitalmars-d-learn
On 23/08/14 19:50, jicman wrote: This is line 7634: const Size DEFAULT_SCALE = { 5, 13 }; What does the error say and how can I fix it? Thanks. Does the following make any difference? const Size DEFAULT_SCAL = Size(5, 13) -- /Jacob Carlborg

Re: D1: Error: duplicate union initialization for size

2014-08-25 Thread Jacob Carlborg via Digitalmars-d-learn
On 26/08/14 00:57, jicman wrote: Ok, let's try something simpler... Where can I find the D1 v1.076 compiler error meaning of, Error: duplicate union initialization for size for this line, const Size DEFAULT_SCALE = { 5, 13 }; How does the code for Size look like? -- /Jacob Carlborg

Re: How to get nogc to work with manual memory allocation

2014-08-24 Thread Jacob Carlborg via Digitalmars-d-learn
code for these functions so I don't know if there's anything stopping them from begin @nogc. -- /Jacob Carlborg

Re: How to get nogc to work with manual memory allocation

2014-08-24 Thread Jacob Carlborg via Digitalmars-d-learn
re a way to get around this? @nogc is a very new attribute. The runtime and standard library have not been properly annotated with this attribute yet. As a workaround you could try copy implementation of these functions to you're own code and annotate them as appropriate. -- /Jacob Carlborg

Re: Identifying 32 vs 64 bit OS?

2014-08-10 Thread Jacob Carlborg via Digitalmars-d-learn
running in 32 vs 64 bits? Use "D_LP64". This indicates pointers are 64 bits. -- /Jacob Carlborg

Re: Passing Command Line Arguments to a new Thread

2014-08-07 Thread Jacob Carlborg via Digitalmars-d-learn
On 2014-08-07 20:23, "Nordlöw" wrote: What is the best way to forward a string[] as argument to a function called through std.concurrency.spawn(). What about just accessing core.runtime.Runtime.args from the new thread? -- /Jacob Carlborg

Re: Using enum constant from different modules

2014-07-10 Thread Jacob Carlborg via Digitalmars-d-learn
cally allocated. -- /Jacob Carlborg

Re: Using enum constant from different modules

2014-07-10 Thread Jacob Carlborg via Digitalmars-d-learn
the module boundary. I'd guess that's because of the separate compilation model. That seems to be the case. I just got confused about the different behavior when put in a single or two modules. -- /Jacob Carlborg

Re: Using enum constant from different modules

2014-07-10 Thread Jacob Carlborg via Digitalmars-d-learn
able data. I'm sure there's something in the spec about it... Sounds reasonable. -- /Jacob Carlborg

Using enum constant from different modules

2014-07-10 Thread Jacob Carlborg via Digitalmars-d-learn
quot;. But if I move the function "asd" into the "main" module and completely skip the "foo" module the assert passes. I don't know if I'm thinking completely wrong here but this seems like a bug to me. -- /Jacob Carlborg

Re: Bizarre compile error in GtkD

2014-06-30 Thread Jacob Carlborg via Digitalmars-d-learn
On 2014-06-29 22:28, Evan Davis wrote: I have no idea how this error exists. Can anyone help me fix it? Perhaps some mismatch between mutable/const/immutable? -- /Jacob Carlborg

Re: Why is the Win32 boilerplate the way it is?

2014-06-29 Thread Jacob Carlborg via Digitalmars-d-learn
d try some different value. If you search on Google I'm sure you'll find something. -- /Jacob Carlborg

Re: Why is the Win32 boilerplate the way it is?

2014-06-29 Thread Jacob Carlborg via Digitalmars-d-learn
quot; link flag to suppress the console. There are API's to get access to the arguments passed to WinMain, if necessary. -- /Jacob Carlborg

Re: Is their a way for a Child process to modify its Parent's environment?

2014-06-25 Thread Jacob Carlborg via Digitalmars-d-learn
works for Windows but you can have a look at the code [1], or perhaps Nick can explain it. [1] https://github.com/jacob-carlborg/dvm/blob/master/dvm/commands/Use.d#L34 -- /Jacob Carlborg

Re: Another rambling musing by a Dynamic Programmer - map!

2014-06-24 Thread Jacob Carlborg via Digitalmars-d-learn
lower than the eager ones. -- /Jacob Carlborg

Re: D1: UTF8 char[] casting to wchar[] array cast misalignment ERROR

2014-06-16 Thread Jacob Carlborg via Digitalmars-d-learn
e [2] to help with this sort of things. [1] http://dsource.org/projects/tango [2] http://dsource.org/projects/tango/docs/stable/tango.io.UnicodeFile.html -- /Jacob Carlborg

Re: Version() for unittest OR debug?

2014-06-10 Thread Jacob Carlborg via Digitalmars-d-learn
On 10/06/14 16:06, bearophile wrote: You can define a enum boolean value in the version unittest block, and another inside the debug {} else {}. And then you can use "if (b1 || b2) { ... }". "static if" is probably what's needed. -- /Jacob Carlborg

Re: Fighting compiler - experienced programmer but D novice

2014-06-02 Thread Jacob Carlborg via Digitalmars-d-learn
f the array. -- /Jacob Carlborg

Re: How to detect a lambda expression get it is signature

2014-06-01 Thread Jacob Carlborg via Digitalmars-d-learn
) ); // error } Have a look at this thread: http://forum.dlang.org/thread/lkl0lp$204h$1...@digitalmars.com -- /Jacob Carlborg

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Jacob Carlborg via Digitalmars-d-learn
On 16/05/14 11:19, John Colvin wrote: Any plans to get any preprocessor stuff working? Presumably libclang can make this feasible. Yes, eventually. Although, currently libclang doesn't really provide an API for the preprocessor, so that needs to be added. -- /Jacob Carlborg

Re: Objects(from classes) at Compile time? no gc

2014-05-15 Thread Jacob Carlborg via Digitalmars-d-learn
it.getvalue); // will print 5 at compile time return myfruit.getvalue(); } Although, I don't know if it will allocate it during runtime as well. -- /Jacob Carlborg

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-15 Thread Jacob Carlborg via Digitalmars-d-learn
o the best method. You can use DStep [1] to automatically generate bindings. It requires some manual tweaking afterwards but it will give you a good start. [1] https://github.com/jacob-carlborg/dstep -- /Jacob Carlborg

Re: DFL is the best UIcontrols for D, compare it to dwt, tkd, dtk, dlangui, anchovy......

2014-05-13 Thread Jacob Carlborg via Digitalmars-d-learn
supports more features. -- /Jacob Carlborg

Re: DFL is the best UIcontrols for D, compare it to dwt, tkd, dtk, dlangui, anchovy......

2014-05-13 Thread Jacob Carlborg via Digitalmars-d-learn
is capable to do. I know that at least in DWT, many widgets contain quite a lot of code to customize them, to make them behave similarly on all platforms. -- /Jacob Carlborg

Re: naming a variable at runtime

2014-05-12 Thread Jacob Carlborg via Digitalmars-d-learn
On 13/05/14 06:32, InfinityPlusB wrote: yup, that will work. If I wasn't hell bent on naming variables, I probably would have figured this out. :P Perhaps you could use an associative array. Then you get sort of named variables. -- /Jacob Carlborg

Re: DFL is the best UIcontrols for D, compare it to dwt, tkd, dtk, dlangui, anchovy......

2014-05-12 Thread Jacob Carlborg via Digitalmars-d-learn
features, I'm guessing it's not as comprehensive as DWT, Gtk or Qt. -- /Jacob Carlborg

Re: Templating everything? One module per function/struct/class/etc, grouped by package?

2014-05-12 Thread Jacob Carlborg via Digitalmars-d-learn
when I instantiated it with "wchar" it didn't compile. -- /Jacob Carlborg

Re: Inspecting lambda parameters

2014-05-10 Thread Jacob Carlborg via Digitalmars-d-learn
an turn it into a function by doing: void foo (alias func) () { alias Types = ParameterTypeTuple!(func!int); } Unfortunately I don't know the types it's going to be instantiated with. That's part of the introspecting to figure out. [1] https://github.com/D-Programming-Language

Inspecting lambda parameters

2014-05-10 Thread Jacob Carlborg via Digitalmars-d-learn
g hacks like .stringof. I know there's __parameters as well, but that doesn't work either. -- /Jacob Carlborg

Re: Recommendation on option parsing

2014-05-10 Thread Jacob Carlborg via Digitalmars-d-learn
7;t consider it stable, but it will automatically generate the help text. You can see some of it's uses here [3]. [1] https://github.com/SiegeLord/Tango-D2 [2] https://github.com/jacob-carlborg/mambo/tree/master/mambo/arguments [3] https://github.com/jacob-carlborg/dstep/blob/master/dstep/driver/Application.d#L53 -- /Jacob Carlborg

Re: Installing 32 bit libcurl.so.4 on Ubuntu

2014-04-08 Thread Jacob Carlborg
I think so. If you're on a 32bit machine you probably need to install a development package. Perhaps libcurl4-gnutls-dev or libcurl4-openssl-dev. -- /Jacob Carlborg

Re: When this will be freed?

2014-04-05 Thread Jacob Carlborg
the GC's view // --> GC collects here <-- printf(b); // the string may have been collected here } Of course, if the C function is storing the parameter in a global variable you got problems. You really need to be sure of what the C functions is doing. To be on the safe side there's always GC.addRoot. -- /Jacob Carlborg

Re: When this will be freed?

2014-04-05 Thread Jacob Carlborg
amiliar with calling conventions and how the stack and registers work. But take this as an example: extern (C) void foo (in char*); void bar () { string s = "asd"; foo(s.ptr); } Even if "s" is passed in a register to "foo", won't the stack of "bar" still be available until "foo" returns? -- /Jacob Carlborg

Re: When this will be freed?

2014-04-02 Thread Jacob Carlborg
t: extern(C) auto example() Same as above, extern(C) does not change how memory is collected. If it is a C function, then it depends entirely on that particular function. -- /Jacob Carlborg

Re: Transforming a C/C++ project to D

2014-03-26 Thread Jacob Carlborg
Dub, which will handle all dependencies automatically. -- /Jacob Carlborg

Re: Transforming a C/C++ project to D

2014-03-26 Thread Jacob Carlborg
e. You can also use DStep [2] to create D bindings for the C code. [1] http://forum.dlang.org/thread/lgspgg$2i8l$1...@digitalmars.com [2] https://github.com/jacob-carlborg/dstep -- /Jacob Carlborg

Re: Appending Text to SWT Textbox from multiple threads.

2014-03-18 Thread Jacob Carlborg
On Tuesday, 18 March 2014 at 07:19:05 UTC, Jacob Carlborg wrote: What exact problems do you have? Note that SWT is not thread safe. All UI changes need to be made on the UI thread. This is usually done using the "Display.asyncExec" method. Forgot the link to the exa

Re: Appending Text to SWT Textbox from multiple threads.

2014-03-18 Thread Jacob Carlborg
thread. This is usually done using the "Display.asyncExec" method. -- /Jacob Carlborg

Re: Objective-C runtime: bindings are possible?

2014-03-11 Thread Jacob Carlborg
veloper.apple.com/library/mac/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html [2] http://www.dsource.org/projects/dstep [3] http://wiki.dlang.org/DIP43 [4] https://github.com/jacob-carlborg/dmd/tree/d-objc -- /Jacob Carlborg

Re: Hacking DMD to Query Context Information at Source File Offset

2014-03-09 Thread Jacob Carlborg
ic", "semantic2" and "semantic3". For more information see: http://wiki.dlang.org/DMD_Source_Guide -- /Jacob Carlborg

Re: Custom default exception handler?

2014-02-11 Thread Jacob Carlborg
"mytool: ERROR: ...". Perhaps you can do something with core.runtime.Runtime.traceHandler. -- /Jacob Carlborg

Re: core.stdc.config

2014-01-29 Thread Jacob Carlborg
ut it would be nice to at least see which modules and declarations are available. -- /Jacob Carlborg

Re: can't I use __traits(allMembers) recursivly ?

2014-01-23 Thread Jacob Carlborg
On 2014-01-24 07:11, Uplink_Coder wrote: I'm trying to serialize my struct through CT-Refelction Here's a serialization library if you need it [1]. It will hopefully be included as std.serialization in Phobos at some point. https://github.com/jacob-carlborg/orange -- /Jacob Carlborg

Re: getting Key:Value pairs of an enum at compile time ?

2014-01-23 Thread Jacob Carlborg
d be "Blue" or "Red". I can use __traits(allMembers,Enum) for the identifiers, but how do I get the Values ? Try getMember: http://dlang.org/traits.html#getMember -- /Jacob Carlborg

Re: Shared objects aka dynamic libraries

2014-01-21 Thread Jacob Carlborg
reliable enough. -- /Jacob Carlborg

Re: extern(C) function declarations and extra keywords.

2014-01-19 Thread Jacob Carlborg
ty do anything in terms of speed/safety here? It can access global variables. -- /Jacob Carlborg

Re: Is it possible to store properties via opDispatch using tuples?

2014-01-17 Thread Jacob Carlborg
On 2014-01-17 22:14, H. S. Teoh wrote: Is that because D doesn't have implicit casting via opCast? -- because, conceivably, if x = d.abc; gets lowered to x = d.opCast!(typeof(x))(d.abc); then the above can be made to work. I don't know, maybe.

Re: Is it possible to store properties via opDispatch using tuples?

2014-01-17 Thread Jacob Carlborg
t work. Variant doesn't retain the static type, which is needed in this case. -- /Jacob Carlborg

Re: thisExePath and rdmd

2014-01-17 Thread Jacob Carlborg
On 2014-01-17 15:29, Andrea Fontana wrote: I think it would be useful to put full path on __FILE__ or to add another constant. Anyone? I agree. Probably safest to add a new constant, to avoid breaking code. -- /Jacob Carlborg

Re: thisExePath and rdmd

2014-01-17 Thread Jacob Carlborg
On 2014-01-17 10:50, Andrea Fontana wrote: Hmm I thought It can be done reading __FILE__ at compile-time, but it gives me just the relative path. Right, forgot about __FILE__. -- /Jacob Carlborg

Re: thisExePath and rdmd

2014-01-17 Thread Jacob Carlborg
to have the path of source itself? That doesn't sound very easy to fix. When running the executable it's completely disconnected from the source file it was compiled from. Except for possibly some debug info. -- /Jacob Carlborg

Re: Is it possible to store properties via opDispatch using tuples?

2014-01-17 Thread Jacob Carlborg
e? All done dynamically without any property being pre-declared. I have no way of seeing this work. The problem is you need to somehow store the static type revived in opDispatch. But to store an unknown type as an instance variable you need to use a template class. -- /Jacob Carlborg

Re: Is it possible to store properties via opDispatch using tuples?

2014-01-16 Thread Jacob Carlborg
t the static type. But perhaps that's what you're saying. -- /Jacob Carlborg

Re: errors with filesystem operations

2014-01-15 Thread Jacob Carlborg
need to rename the file. As far as I know, Linux doesn't have any form of system attribute. [1] https://github.com/D-Programming-Language/phobos/commit/5ab8dae665c27ed45eced244720e23e53ef23457 -- /Jacob Carlborg

Re: std.xml

2014-01-14 Thread Jacob Carlborg
node class, so maybe that is the better option. The Tango XML parser is one of the fastest XML parser available: http://dotnot.org/blog/archives/2008/03/10/xml-benchmarks-updated-graphs-with-rapidxml/ -- /Jacob Carlborg

Re: std.xml

2014-01-13 Thread Jacob Carlborg
that a specific element (like "svg") should use a specific subclass, but "mapping" after building is ok too I suppose. I'm not sure what you're trying to do but the implementation in Tango uses structs for the nodes so you cannot subclass that. -- /Jacob Carlborg

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