Re: D on other platforms than Win,Lin,Mac?

2011-09-06 Thread Trass3r
I've heard that our company is considering the T20 from Toradex.com for a new project with remote hardware. The platform runs on Nvidia Tegra and Linux. Since I have been very impressed by the D programming language, for some years now, could it be possible to use D in such projects?

Re: Out of Source Unittests

2011-09-06 Thread Trass3r
If you really need that you could use the import expression to mixin your unittests. But you should really put the unittests next to the tested code. A good editor could fold it anyway.

Re: D on other platforms than Win,Lin,Mac?

2011-09-06 Thread Trass3r
For a language that aims at C/C++'s domain, it's extremely depressing that this is still the case. I *really* think this needs to be one of D's top priorities at this point. I honestly see it as D's #1 biggest glaring hole We have much bigger problems that need attention. And there's

Re: D on other platforms than Win,Lin,Mac?

2011-09-06 Thread Trass3r
At least for gdc only hello-world like code works. Real code hits this issue: https://bitbucket.org/goshawk/gdc/issue/215/alignment-of-struct-members-wrong-on-arm Did you ever try with LDC?

Re: get size of function

2011-08-31 Thread Trass3r
Am 31.08.2011, 12:05 Uhr, schrieb maarten van damme maartenvd1...@gmail.com: Am I sure those functions aren't shift around during optimization? No. It's just an ugly hack and likely to go up in flames. Also what you try could only work with PIC but even then... for now the function is

Re: Reading by character and by line from stdin

2011-08-25 Thread Trass3r
I'd like to know how to read from stdin one character at a time, read with whitespace as a delimiter, and read line by line. A nifty way of reading by byte is the undocumented (only the writer is documented): import std.stdio; void main() { foreach(c; LockingTextReader(stdin))

Re: Reading by character and by line from stdin

2011-08-25 Thread Trass3r
A nifty way of reading by byte is Of course I mean by character.

Re: making a really simple dll.

2011-08-18 Thread Trass3r
I looked at the dll documentation and I'm baffled by the time I get to the first line: __gshared HINSTANCE g_hInst; and then it starts talking about dll_process_attach. I don't want to attach processes, I want to compute an integer. The Dllmain is needed so the D runtime is properly

Re: making a really simple dll.

2011-08-18 Thread Trass3r
Example: https://bitbucket.org/trass3r/matd/src/tip/examples/mmfile/

Re: making a really simple dll.

2011-08-18 Thread Trass3r
Am 18.08.2011, 21:17 Uhr, schrieb Adam D. Ruppe destructiona...@gmail.com: We should make a mixin template DllMain that has a generic main. We should also have a -shared switch that transparently includes all of the boilerplate crap: particularly the .def file, maybe even a default DllMain

Re: making a really simple dll.

2011-08-18 Thread Trass3r
Am 18.08.2011, 21:42 Uhr, schrieb Kai Meyer k...@unixlords.com: 2) check if there are any exported functions (via .def or export()), if not, export them all That's insane. Larger projects have tons of functions and may only need to export a few. The language includes the export keyword to

Re: htod

2011-08-12 Thread Trass3r
Am 12.08.2011, 13:35 Uhr, schrieb Jacob Carlborg d...@me.com: On 2011-08-12 11:36, simendsjo wrote: htod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly? Is the source public? Would it be better to use gcc or clang instead? htod is

Re: htod

2011-08-12 Thread Trass3r
htod is a fork of dmc or something, right? Yep. How difficult is it to update the program to make it more user friendly? Only Walter can. Is the source public? No. Would it be better to use gcc or clang instead? Hell yeah. Clang's predestined for that.

Re: htod

2011-08-12 Thread Trass3r
I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project. I also played with the idea. Clang's Rewrite facilities should be perfect for that. Yeah, I'm using Rewrite, if I recall correctly. Should really be a community effort

Re: Anybody seen *working* postgresql client library binding?

2011-08-11 Thread Trass3r
Maybe http://arsdnet.net/dcode/postgres.d

Re: Something weird with threads.

2011-08-07 Thread Trass3r
- Error: template std.concurrency.spawn(T...) cannot deduce template function from argument types !()(void delegate()) As the message already tells a class method yields a delegate and not a function. Check if that method could be made static. But if you really need to do it this way, you

Re: Using templates to declare function prototypes

2011-07-31 Thread Trass3r
Am 31.07.2011, 17:34 Uhr, schrieb Andrej Mitrovic andrej.mitrov...@gmail.com: Why is there both a System and Windows linkage type if they're the same? Is this a C++ legacy? Well Windows always means stdcall while System changes its meaning on Posix.

Re: Versioned extern?

2011-07-29 Thread Trass3r
http://d.puremagic.com/issues/show_bug.cgi?id=5739#c3

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
atk = DD-atk DD-atk_static.rf: No such file or directory Command c:\d\dsss-0.78-x86-windows\bin\rebuild.exe returned with code 1, aborting. Error: Command failed, aborting. Doesn't dsss have some kind of verbose mode? Did you try with another build tool?

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
What is the command line? rdmd segfaults on me using this: c:\temprdmd --build-only --chatty -I\d\ext\gtkd\src t.d dmd -I\d\ext\gtkd\src -v -o- t.d -I. t.d.deps dmd -I~/coding/gtkD/src/ -L-ldl -v -o- 'test.d' -I'.' test.d.deps dmd '@/tmp/.rdmd/rdmd.6FC1F920EA8D2136FC5ECC4E5ED4404A.rsp' with

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
So your command line is simply rdmd --build-only --chatty -I\d\ext\gtkd\src -L-ldl t.d? Yes, and in theory that would be enough. (if it didn't put 'dmd' in the .rsp) rdmd calls dmd -I\d\ext\gtkd\src -L-ldl -v -o- t.d -I. t.d.deps, and then segfaults (win7x64). Doesn't segfault on Linux

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
dmd.d...? That's what I was talking about. it calls dmd @...rsp and rsp contains dmd again. So it in fact calls dmd dmd ... We should really get rid of the response file crap and call dmd directly. This would also clean up rdmd --dry-run

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
The -L-ldl isn't recognized by optlink. OPTLINK : Warning 9: Unknown Option : LDL What's the equivalent? I think you don't need it on Windows. But according to the demo dsss.conf files you might need -lladvapi32 Might also be -L-Ladvapi32. It tries to pick up zlib1.dll from my Intel WiFi

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
Seems I could use github direcly: https://github.com/D-Programming-Language/tools/pull/3 Thanks! But we should really also try to track down why rdmd crashes on Windows.

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
There is something wrong with either dmd or rdmd though.. If I compile rdmd (with my patch, haven't tried the original) without -g, it crashes when trying to compile anything... Does this also happen if you compile it with -g and then run cv2pdb on it?

Re: D and MySQL

2011-07-19 Thread Trass3r
http://prowiki.org/wiki4d/wiki.cgi?DatabaseBindings There is some information, but it's probably outdated. Please update that wiki once you know more :) Apart from that I only know of this binding: http://dsource.org/projects/ddbi

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
I cannot compile anything without first compiling rdmd with -g. Compiling rdmd with -g and running cv2pdb on it works. Really strange. If we just had a stack trace.

Re: D and MySQL

2011-07-19 Thread Trass3r
Am 19.07.2011, 20:49 Uhr, schrieb Adam Ruppe destructiona...@gmail.com: foreach(line; mysql.query(select id, name from users where id ?, 5)) { // access to columns by name writefln(%s: %s, line[id], line[name]); // alternatively, you can write:

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
Whats the best way to debug this? Sprinkle printf's around? Probably. Should happen in that getDependencies function, shouldn't it?

Re: gtkD doesn't compile on windows

2011-07-19 Thread Trass3r
Someone want to look at the assembly? The .exe is to large for the newsgroup, so only the code is attached. I've only tried compiling with dmd 2.054 Maybe you could post only rdmd.obj?

Re: D and MySQL

2011-07-19 Thread Trass3r
The DataObject is found in database.d - it is meant to work generically with any database backend. Damn, we should really have a common project for database stuff.

Re: Problems with static linking of c libraries

2011-07-14 Thread Trass3r
Am 14.07.2011, 16:36 Uhr, schrieb Danny Arends danny.are...@gmail.com: Hey all, I'm trying to build a D application which statically links in the the blas and lapack libraries (from http://icl.cs.utk.edu/lapack-for-windows/clapack/index.html ). When downloading the pre-build libraries

Re: template instance cannot use local 'f' as parameter to non-global template

2011-07-13 Thread Trass3r
Anybody an idea?

Re: template instance cannot use local 'f' as parameter to non-global template

2011-07-13 Thread Trass3r
Am 13.07.2011, 16:02 Uhr, schrieb Steven Schveighoffer schvei...@yahoo.com: void h() {} class Bla { mixin wrap!h; } mixin template wrap(alias f) { void blub(alias g = f)() { g(); } } As a workaround, is there a reason you need blub to be

Re: template instance cannot use local 'f' as parameter to non-global template

2011-07-13 Thread Trass3r
Am 13.07.2011, 16:58 Uhr, schrieb Tyro[a.c.edwards] nos...@home.com: Don't know it this is the right answer or a possible bug but it does the trick: void h() { import std.stdio; write(h()); } class Bla { mixin wrap!h; } mixin template wrap(alias f) { void blub(typeof(f) g = f)

Re: template instance cannot use local 'f' as parameter to non-global template

2011-07-13 Thread Trass3r
I've seen this error before... *searches memory and old code* Here you go: http://d.puremagic.com/issues/show_bug.cgi?id=3051 I think this is yet another issue. The inner template argument is not something on the stack but it is a template argument.

Re: Declaring a D pointer to a C function

2011-07-12 Thread Trass3r
You should declare the function pointer without the extern(C). Example: alias int function(void* test) FTInitFunc; extern(C) int foo(void* test){ } FTInitFunc foo_ptr = foo; This worked for me. That's a bug.

template instance cannot use local 'f' as parameter to non-global template

2011-07-12 Thread Trass3r
Is this a bug? If not, how do you make it work? void h() {} class Bla { mixin wrap!h; } mixin template wrap(alias f) { void blub(alias g = f)() { } } void main() { Bla b = new Bla(); b.blub(); } test.d(18): Error: template instance cannot use

Re: Running DMD tests

2011-07-12 Thread Trass3r
Am 13.06.2011, 23:55 Uhr, schrieb Peter Alexander peter.alexander...@gmail.com: I'm trying to run the test suite for DMD, but I'm running into issues. Do I need to set up my environment differently to run dmd in development? How can I get around this? To quote IRC: In theory it's simple:

Re: Running DMD tests

2011-07-12 Thread Trass3r
Am 12.07.2011, 20:57 Uhr, schrieb David Nadlinger s...@klickverbot.at: or use your normal system-wide installation which probably has all the paths set up correctly by specifying the DMD variable: »make DMD=/usr/local/bin/dmd«. Thanks a lot for that hint!

Re: Declaring a D pointer to a C function

2011-07-12 Thread Trass3r
Is this going to be fixed any time soon? Allowing callbacks with D calling convention where a C callback is expected should be an error, and this is like the 10th time I've ran into this bug. http://d.puremagic.com/issues/show_bug.cgi?id=3797

Re: translate a macro to D

2011-07-06 Thread Trass3r
Am 06.07.2011, 16:15 Uhr, schrieb teo teo.ubu...@yahoo.com: What is the best way to translate following to D? #define MAKELONG(a, b) \ ((LONG) (((WORD) (a)) | ((DWORD) ((WORD) (b))) 16)) The point is I would like to be able to use that at compile-time. The macro is supposed to define

Re: Dynamic multidimensional arrays

2011-07-05 Thread Trass3r
If you want it to by dynamic all the way, you need to put the dimensions in the parens like above. Personally, I _never_ put them in the brackets, even when the dynamic array has just one dimension. It's just simpler to always put them in the parens and not worry about it. Maybe we should

how to reduce a debug symbol error?

2011-06-28 Thread Trass3r
Starting my cl4d executable with 'gdb main -readnow' results in Reading symbols from main...expanding to full symbols...Die: DW_TAG_type_unit (abbrev 4, offset 0x6a) parent at offset: 0xb has children: FALSE attributes: DW_AT_byte_size (DW_FORM_data1) constant: 16 DW_AT_type

Re: how to reduce a debug symbol error?

2011-06-28 Thread Trass3r
First: are you compiling *all* modules with -gc rather than -g? Ah ok, somehow I was mislead into thinking that the gdb patches allow you to use -g. It works now though line numbers are more messed up than I'm used to from cv2pdb + VS. There I only have the usual problems with mixins but

Re: Undefined function, even though imported

2011-06-14 Thread Trass3r
Am 14.06.2011, 02:43 Uhr, schrieb Loopback elliott.darf...@gmail.com: Thanks for all the answers! Seems like rdmd did the trick. I don't see why this isn't built in to dmd though No one does ;) I've also stumbled upon an additional error with the win32 DirectX bindings, but this seems D

Re: Undefined function, even though imported

2011-06-13 Thread Trass3r
Importing it means dmd knows about the function and emits a call but doesn't automatically generate the function code. This is only done if you also pass the file containing it to dmd.

Re: Undefined function, even though imported

2011-06-13 Thread Trass3r
Shouldn't the linker/compiler be able to solve this on its own then? Use rdmd or xfBuild to automatically compile all needed modules.

Re: Is it reasonable to learn D

2011-06-08 Thread Trass3r
http://h3.gd/code/nucleus/ I lol'd at the suggestion to upgrade my FF4 to a modern HTML5-compliant browser. ^^ No problems with Opera.

Re: Problem with dsss 0.78 rebuild error: out of memory

2011-06-07 Thread Trass3r
Both tools are dead.

Re: Is it reasonable to learn D

2011-06-07 Thread Trass3r
Am 07.06.2011, 23:02 Uhr, schrieb Fabian contact-...@freenet.de: I can't see any changes on this web page: http://www.dsource.org/projects/dwt/wiki That doesn't mean anything. Development sometimes takes place behind the scenes or in forks at github or bitbucket.

Re: Is it reasonable to learn D

2011-06-07 Thread Trass3r
- The D compiler has only bad code optimization Yep, but there is LDC and GDC which use LLVM and GCC as backends respectively. - There are no maintained GUI libraries I wouldn't agree with that. Some people are still working on GtkD, QtD and DWT. - The development of the compiler is

Re: Linking with/Debugging static C/C++ libraries

2011-05-30 Thread Trass3r
Am 30.05.2011, 04:09 Uhr, schrieb Jeff Slutter mrmust...@gmail.com: One of the things that's important to us is being able to link against some existing C/C++ static libraries (built with VS 2008, so PE COFF format). Good luck with that. DLLs are no problem but static libraries are another

Re: What are the reasons for this syntax??

2011-05-24 Thread Trass3r
Read about import types here: http://www.digitalmars.com/d/2.0/module.html#ImportDeclaration

Re: web development in D

2011-05-22 Thread Trass3r
Very interesting benchmarks!

Re: web development in D

2011-05-21 Thread Trass3r
Have a look at the recent thread titled 'How To Dynamic Web Rendering?' Adam Ruppe has created a package for web development with D and it seems to work like a charm.

Re: status of shared-libs on Windows?

2011-05-20 Thread Trass3r
Thanks, Trass3r et al! I'll give it a try in D, then. Of course you can't create 64Bit dlls though ;)

Re: status of shared-libs on Windows?

2011-05-19 Thread Trass3r
Am 19.05.2011, 22:28 Uhr, schrieb Graham Fawcett fawc...@uwindsor.ca: Hi folks, I've only used D on Linux so far, so I'm not clear on the current shared-library story on Windows. Consider an existing C++ application that can be extended by writing plugins, which are usually written in C or

Re: status of shared-libs on Windows?

2011-05-19 Thread Trass3r
(I've already successfully created and used Matlab .mex/.dll plugins with D)

Re: Memory corruption rant.

2011-05-17 Thread Trass3r
Could it be a stack corruption?

Re: correct way to create boiler plate code

2011-05-16 Thread Trass3r
string[] funcs = [tan]; calling mixin a compile time has the following error... Error 1 Error: variable func cannot be read at compile time C:\D\SVNProjects\trunk\xcellD\xcell1\trig.d 22 That's because funcs is mutable. Try to make it immutable or enum.

Re: correct way to create boiler plate code

2011-05-16 Thread Trass3r
foreach runs at runtime, while mixin is expanded at compile time. Not the whole truth though. foreach over tuples gets unrolled at compile time so you can do stuff like: // +=, -=, ... Vector opOpAssign(string op, U)(U s) { foreach (i, _; tuple) mixin(tuple[i] ~ op ~

Re: object.d: Error: module object is in file 'object.d' which cannot be read

2011-03-27 Thread Trass3r
object.d: Error: module object is in file 'object.d' which cannot be read import path[0] = /etc/../../src/phobos import path[1] = /etc/../../src/druntime/import As you can see dmd.conf uses relative paths. That guide needs an overhaul. The easiest way is to copy the contents of the zip archive

Re: object.d: Error: module object is in file 'object.d' which cannot be read

2011-03-27 Thread Trass3r
object.d: Error: module object is in file 'object.d' which cannot be read Specify path to file 'object.d' with -I switch Could it be you also deleted the dmd.conf in the local dmd/linux/bin?

Re: Want to help DMD bugfixing? Write a simple utility.

2011-03-24 Thread Trass3r
Is there a copy of the official D grammar somewhere online? I wrote a lexer for my Compiler class and would love to try and apply it to another grammar. The official D grammar is spread among the specification. But I recall that someone compiled a complete grammar for D1 some time ago.

Re: Best practice for strings across D1 and D2

2011-03-17 Thread Trass3r
nedbrek Wrote: 2) What is the best way to make the same declarations work for D1 and D2? It seems everything inside a version statement must parse correctly, and D1 doesn't want to parse immutable(char)... You may also use versioned aliases. Just include the D2 code via a string mixin to

Re: Help passing D strings to C libs

2011-03-14 Thread Trass3r
I'm having trouble passing D strings (char[]) to SDL, in particular SDL_LoadBMP(), I keep receiving a segfault. Heres the code: void setImg(string path) { // concat null terminating char to string and cast to c type string when // passing to SDL_LoadBMP() path ~= \0; image =

Re: enum with classes/structs

2011-03-10 Thread Trass3r
... or does enumerations only support constant-expressions? Thanks! Yep, enum is a compile-time thing.

Re: Iterating a typle tuple of templates

2011-03-04 Thread Trass3r
bearophile Wrote: It seems t is not useful... Yep, foreach over tuples is kinda messed up. Same with reference tuple foreach: http://d.puremagic.com/issues/show_bug.cgi?id=2411 Direct access doesn't work but accessing via [i] does.

Re: About const and C functions

2011-03-02 Thread Trass3r
Am 01.03.2011, 23:33 Uhr, schrieb bearophile bearophileh...@lycos.com: Do you know why DMD doesn't give a compilation error here? import core.stdc.stdio: sscanf; immutable int value = 5; void main() { sscanf(10.ptr, %d.ptr, value); } What's the D signature of sscanf?

Re: Ini parsing library in D ?

2011-02-28 Thread Trass3r
http://www.dprogramming.com/ini.php

Re: How-to manipulate a C array with D2 vector operations?

2011-02-28 Thread Trass3r
I am trying to implement a D2 function that has this C signature (it gets called from a C module and I cannot change the caller): extern(C) read_into(char *buffer, size_t buf_len); I would like to use D's vector (or array-wise according to TDPL) operations on buffer but I cannot find a way, how

%x and floats

2011-02-24 Thread Trass3r
Why doesn't this work: import std.stdio; void main() { float a,b=0; writefln(%x %x, a, b); } std.format.FormatError: std.format floating

Re: OpenGL in D2

2011-02-21 Thread Trass3r
I've found a few OpenGL projects, like bindings (http://www.dsource.org/projects/bindings/) and derelict (http://www.dsource.org/projects/derelict/), but I still can't find any way to easily use or install them (for D2 on Ubuntu). Use derelict2 from svn and xfBuild. Then you just need to tell

Re: Invoke garbage collector?

2011-02-09 Thread Trass3r
However, I need the resources to be freed more quickly than the GC is apparently doing You could use scoped instances if you need to clean them up soon after creation.

Re: Debugging D?

2011-02-06 Thread Trass3r
Are debug symbols compiled with -gc stored in a separate file? Visual Studio refuses to debug my things Nope. Plus you need to use cv2pdb to debug with Visual

Re: C# interop

2011-01-30 Thread Trass3r
As Simen said, there was an attempt to create an IL backend but it hasn't been updated since Aug 2009 and even it compiled you probably wouldn't have much fun with it. You could try to use a C bridge. But even then, I don't see the benefit.

Re: How can you read and understand the source of *naryFun in functional.d?

2011-01-29 Thread Trass3r
Save this somewhere or it will be lost here ;)

template this parameters

2011-01-25 Thread Trass3r
Why do they exist and why does typeof(this) strip constness? import std.stdio; struct S { const void foo(this T)(int i) { writeln(typeid(T)); } const void bar() { writeln(typeid(typeof(this))); } } void main() { const(S) s; (s).foo(1); S s2;

Re: template magic

2011-01-25 Thread Trass3r
2. What is the reason for Phobos defining param funcs as template params? Correct me if I'm wrong but there's no way to pass an arbitrary function to a function in a type-safe way. If you use pointers and casts you can't check if the passed function meets certain requirements (parameters, return

Re: template magic

2011-01-25 Thread Trass3r
How do you not pass them in a safe manner? If you are casting things, of course you don't get type safety. Yep, I was talking about non-template functions. Only way to pass an arbitrary function is via void*

shared library loader (wrapper for GetProcAddress Co)

2011-01-25 Thread Trass3r
I can't seem to find something like that in phobos. Is it missing or am I overlooking it?

Re: Anyone have a clue how to download the Orange repository?

2011-01-23 Thread Trass3r
The problem is it uses a Mercurial repository.

Re: Assigning Interface to Object

2011-01-21 Thread Trass3r
Speaking of COM.. has anyone successfully used COM interfaces in D2? I once tried to create a DDraw proxy dll but I can't remember how good it worked. https://bitbucket.org/trass3r/ddrawproxy

Re: Assigning Interface to Object

2011-01-20 Thread Trass3r
Object is only the base class for all D classes. Interfaces may also represent COM objects or C++ classes, which are not subclasses of Object. Can't the compiler check if it is a normal D interface and then allow (implicit) casts to Object?

Re: Source code annotations alla Java

2011-01-20 Thread Trass3r
class Foo { int x; int y; int z; mixin NonSerialized!(z); } Had a quick look at http://dsource.org/projects/orange/browser/orange/serialization/Serializable.d 1. How come it works without 'mixin' in the template declaration (mixin template NonSerialized)? 2. What if

Re: Source code annotations alla Java

2011-01-20 Thread Trass3r
template foo (args...) {} Does that work with aliases? Well at least the following compiles: template Foo(T...,) { int i; } int a,b; alias Foo!(a,b) f;

Strange phobos errors

2011-01-19 Thread Trass3r
. Has anybody else encountered this? (dmd 2.051) I already disabled unittests but this didn't help. (my code is at http://bitbucket.org/trass3r/cl4d)

Re: Strange phobos errors

2011-01-19 Thread Trass3r
http://d.puremagic.com/issues/show_bug.cgi?id=5373

Re: Development blog? D news?

2011-01-17 Thread Trass3r
http://planet.dsource.org/ Problem is: it's not very active, and also, apparently people don't know about it :-) Yeah haven't heard of it in all those years!

Re: Using D libs in C

2011-01-17 Thread Trass3r
Also make sure you use globals properly if you use them (shared, __gshared, etc.)

Re: Link with C static library

2011-01-16 Thread Trass3r
Should I change my C compiler? Or, there is another way to covert static library from COFF to OMF?? coff2omf should work, but unfortunately it isn't free. coffimplib is free, but can only convert import libraries. You may try to use objconv: http://www.agner.org/optimize/#objconv Though it

Re: Link with C static library

2011-01-16 Thread Trass3r
I used it to convert static library, and it says the input library is not import library. That's coffimplib. coff2omf is in the Extended Utilities Package which is sold for 15$. Many existing C libraries are not written as dynamic libraries. Some C libraries can be compiled as DLL, but in

Re: How to get 'import' clauses from d file?

2011-01-15 Thread Trass3r
I'm trying to make some home-grown d build system, but and one of my tasks is to get module dependencies. Yes, I know about -deps DMD switch, but it works when all needed modules are given to compiler. But if some dependencies absent compiler just aborts with error module foo is in file

Re: Assigning Interface to Object

2011-01-15 Thread Trass3r
module testObj; public interface testInterface { void someMethod(); } public class testObj { Object someCaller; this(Object caller) { someCaller = caller; } this(testInterface tI, bool xyz) { someCaller = tI; } }

import inside a class overrides symbols imported in module scope?

2010-12-09 Thread Trass3r
It was quite hard to track that one down. In the following example the import statement was mixed into the class among other code so it wasn't as obvious as here. import std.traits; class Foo { import std.string; static assert(isNumeric!int); } foo.d(6): Error: template

Re: use of Class Invariants

2010-12-08 Thread Trass3r
That is what I am missing, a stack trace. How do I see a stack trace? dmd1(win) Well tango includes stack traces if you import the right module. For D2/Win use http://3d.benjamin-thaut.de/?p=15

Re: boost::ublas or linear algebra lib for D2?

2010-12-02 Thread Trass3r
hmm I remember http://www.dsource.org/projects/lyla There also were some others at dsource

Re: Why does 'string' alias immutable(char)[] and not immutable(char[]) ?

2010-12-01 Thread Trass3r
This, I do not understand. I thought immutable applies to the value, not to the variable. You need to read from right to left. immutable(char)[] is a mutable array of immutable chars. immutable(char[]) is an immutable array of immutable chars. Note the transitivity.

Re: Internal error: e2ir.c 4629

2010-11-27 Thread Trass3r
If this isn't in bugzilla, please file a bug report. http://d.puremagic.com/issues/query.cgi

<    1   2   3   4   >