Re: OPTLINK Error 45 "Too Much DEBUG Data for Old CodeView format"

2015-03-21 Thread Trass3r via Digitalmars-d-learn
Just save yourself lots of headaches and abandon the optlink/omf crap with -m64 resp. -m32mscoff.

Re: dsource and WinAPI

2014-10-14 Thread Trass3r via Digitalmars-d-learn
the long-term solution is to include the [win32] headers in druntime ™

Re: How do I write __simd(void16*, void16) ?

2014-10-09 Thread Trass3r via Digitalmars-d-learn
On Wednesday, 8 October 2014 at 18:56:31 UTC, Etienne wrote: I can't seem to find this function anywhere: __simd(void16*, void16) MOVDQU => void _mm_storeu_si128 ( __m128i *p, __m128i a) MOVDQU => __m128i _mm_loadu_si128 ( __m128i *p) Is there a module by now that allows to directly write In

Re: Installing LDC on Windows

2014-09-06 Thread Trass3r via Digitalmars-d-learn
On Saturday, 6 September 2014 at 21:54:00 UTC, David Nadlinger wrote: On Saturday, 6 September 2014 at 17:51:16 UTC, Trass3r wrote: SEH was patented, so llvm doesn't support it. That has changed. Has it? SEH on Win64 is something entirely different from the original (x86) SEH design

Re: Installing LDC on Windows

2014-09-06 Thread Trass3r via Digitalmars-d-learn
SEH was patented, so llvm doesn't support it. That has changed.

Re: Showing a user specified error message when no overloads match

2014-07-26 Thread Trass3r via Digitalmars-d-learn
Yeah that's the price we pay for the simplicity. Also most constraints directly or indirectly consist of a complex boolean expressions and you don't get any hint which part failed and why.

Re: Question about @nogc in D 2.066

2014-07-11 Thread Trass3r via Digitalmars-d-learn
http://forum.dlang.org/thread/pxotrowaqcenrpnnw...@forum.dlang.org

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

2014-06-29 Thread Trass3r via Digitalmars-d-learn
The only question I have is what happens when you use SUBSYSTEM:WINDOWS:4.0 (Which I understand means XP or higher) and the program runs on something older?

Re: what is going on with cgcs.c:351?

2014-06-17 Thread Trass3r via Digitalmars-d-learn
I think it should be possible to run DustMite on some big project like phobos to actually search for such internal errors.

Re: Debugging compiler crashes?

2012-07-02 Thread Trass3r
... the order of files matters? Yuck. Yep it's a bug.

Re: Debugging compiler crashes?

2012-07-02 Thread Trass3r
dmd: glue.c:542: virtual void FuncDeclaration::toObjFile(int): Assertion `semanticRun == PASSsemantic3done' failed. Aborted wouter@carillon:~/code/d/DustMite$ ... and I'm not yet that fluent in D to understand what's going on. Any ideas? pass dustmite.d before dsplit.d known problem, but the

Re: Lack of warning messages

2012-06-21 Thread Trass3r
A notice for some unused imports would be great too... You could create a brute-force tool. Rip off an import statement at a time and see if it still compiles. One could probably modify DustMite to do that.

Re: Casting the Result of splitter() into a string array

2012-06-17 Thread Trass3r
If you want to convert a range to an array, use std.array.array This is a constant source of confusion and it also is a crappy design to use a function in a totally different module for this purpose imho. Can't these Result types get an eval() method and/or be made implicitly convertible to

Re: align(16) struct member throws an exception with movdqa

2012-06-14 Thread Trass3r
Cause align doesn't work the way you think it does. In fact I still don't understand how it works at all. The language align keyword can only reduce the alignment from the platform default (typically 8). A serious flaw if you ask me . . . . The doc page doesn't even clearly state this, it i

Re: align(16) struct member throws an exception with movdqa

2012-06-11 Thread Trass3r
I think it has been fixed for the next version of DMD already. Any idea why align isn't letting me use movdqa? Cause align doesn't work the way you think it does. In fact I still don't understand how it works at all.

Re: align(16) struct member throws an exception with movdqa

2012-06-11 Thread Trass3r
import std.stdio, core.simd; void main() { int4 v; } Internal error: ..\ztc\cgcod.c 1447 Building Debug\dtest1.exe failed! Works fine on Linux. Maybe the 32Bit check doesn't work for Windoze? -m32 on Linux yields Error: SIMD vector types not supported on this platform

Re: align(16) struct member throws an exception with movdqa

2012-06-11 Thread Trass3r
test code please

Re: std.mmfile issues

2012-05-14 Thread Trass3r
I found out that OpenFileMapping is not needed and CreateFileMapping is sufficient. I managed to code this with std.c.windows only however MmFile is not working even with simplest examlple maybe a bug under win 7? Possible. Feel free to file a bug report or create a pull request.

Re: undefined reference - Derelict2

2012-05-07 Thread Trass3r
Though I was under the impression that the new Derelict2 hierarchy / d interface files in Derelict2/import reduced the neccesity for command line arguments, that is a Derelict related question. You may try to use --chatty and compare the output.

Re: How to pass list of strings as compile-time parameters?

2012-04-24 Thread Trass3r
bool compareByMemb(string[] ignores, T)(T obj1, T obj2) { foreach (name; __traits(getAllMembers, T)) { ... } In this particular case you could try foo(T, U...)(T obj1, T obj2, U ignores)

Re: this() const

2012-04-15 Thread Trass3r
Am 15.04.2012, 21:20 Uhr, schrieb sclytrack : this( const size_t step) const { this.step = step; } Error: cannot modify const/immutable/inout expression this.step Is this the expected behavior? Thanks. Yep.

Re: D Dll injection problem

2012-03-28 Thread Trass3r
this works on every dll I try to inject apart from dll's written in D (starting with dmd version 2,054 or something like that). If this is a regression, please narrow it down to the exact version.

Re: D Dll injection problem

2012-03-27 Thread Trass3r
I inject it but it returns nothing and the App(where the dll is injected) is hanging( not responding). Could you try it maybe? I would like to know whether it's a Problem with D or with me. Are dlls without injection working?

Re: D Dll injection problem

2012-03-27 Thread Trass3r
Maybe it's because I have no def file. Very possible. Just pass it to dmd like the other files. Or try the new -shared flag.

Re: Vector operations optimization.

2012-03-23 Thread Trass3r
The flags you want are -O, -inline -release. If you don't have those, then that might explain some of the slow down on slicing, since -release drops a ton of runtime checks. -noboundscheck option can also speed up things.

Re: anything that would provide support for zip filesystem?

2012-03-22 Thread Trass3r
I guess Tango provides something like that via the VFS stuff. https://github.com/SiegeLord/Tango-D2 resp. https://github.com/mtachrono/tango

Re: Vector operations optimization.

2012-03-22 Thread Trass3r
What is the status at the moment? What compiler and with which compiler flags I should use to achieve maximum performance? In general gdc or ldc. Not sure how good vectorization is though, esp. auto-vectorization. On the other hand the so called vector operations like a[] = b[] + c[]; are l

Re: preprocessor pass equivalent?

2012-03-15 Thread Trass3r
There's a pull request to help with debugging string mixins: https://github.com/D-Programming-Language/dmd/pull/426

Re: htod - const

2012-03-06 Thread Trass3r
Am 06.03.2012, 20:13 Uhr, schrieb maarten van damme : I wouldn't say that it sucks. It has really helped a lot in porting some simple header files. It goes terribly bad on the more complex though. Sadly, using regular expressions is much more efficient. At least those don't destroy the so

Re: htod - const

2012-03-06 Thread Trass3r
Why is 'const' removed? cause htod sucks. D1 didn't have const and htod wasn't updated for ages.

Re: Dumb question about git

2012-03-01 Thread Trass3r
OK, so what's the right way to do it then? I have some changes in a branch, but master has been updated since, so I want to merge in the latest updates so that the branch changes are compatible with the latest code. I use a quite crappy way to rebase my feature branch: git stash && git checkout

Re: Random behavior using a wrapped C library

2012-02-28 Thread Trass3r
A blocker for using x64 on linux then. Use gdc. Better codegen anyway.

Re: Random behavior using a wrapped C library

2012-02-28 Thread Trass3r
http://d.puremagic.com/issues/show_bug.cgi?id=5570

Re: produced binary is quite big

2012-02-26 Thread Trass3r
You may try -L--gc-sections (in case of gdc in combination with -ffunction-sections -fdata-sections) and -L-s

Re: Make alias parameter optional?

2012-02-25 Thread Trass3r
void foo(T, T2, alias thing = (){})(T a, T2 b) { thing(); } void bar(){} void main() { foo!(int,int,bar)(1,2); foo(1,2); }

Re: Executable size when compiling with GDC

2012-02-21 Thread Trass3r
Lots of symbols and stuff. You can get it down with -ffunction-sections -fdata-sections -Wl,-s,--gc-sections Phobos should also be compiled with -ffunction-sections -fdata-sections to get the whole effect though.

Re: Everything on the Stack

2012-02-20 Thread Trass3r
scope auto e1 = new EntryInt(); Foo = e1.toFoo(); You don't need auto there. And scope is deprecated, use std.typecons' scoped

Re: Compiling Lua for D

2012-02-15 Thread Trass3r
I guess GDC uses COFF? That would definitely be handy... although I couldn't compile and debug from VS anymore in that case, and that would be unfortunate^^" Just recently Rainer added gdc support to cv2pdb.

Re: D for game Development

2012-02-15 Thread Trass3r
Can I use OpenGL or DirectX with D? Of course. E.g. there's a D1 game engine: http://yage3d.net I think http://3d.benjamin-thaut.de/?p=16 is D2, but it's rendering code only.

Re: Compiling Lua for D

2012-02-15 Thread Trass3r
LuaD works fine, but I'd rather learn to compile stuff like this myself. It will get me further in the long run^^ Try to switch to gdc. dmc, optlink & Co. must die a bloody death anyway :)

Re: Templated aliases name in compilation error output

2012-02-12 Thread Trass3r
dmd simply doesn't keep those information about aliases.

Re: Struct "inheritance"

2012-02-04 Thread Trass3r
So why not just use classes? I've understood it as there may be a performance gain by using structs over classes, and in my program Point and Coordinate are used heavily. The other big difference is value vs. reference type. You can use alias this to achieve something like "struct inheritance

Re: i18n

2012-02-03 Thread Trass3r
Thanks a lot, So I just need to "detect" user locale using How to do that? You can always use the functions you would use in C.

Re: linker @ meaning and how to compile static libs

2012-02-03 Thread Trass3r
The main question is how do I either compile the library with the right version suffix (@12) Or get the linker to use the right version suffix (@8) That's no version suffix. It's the number of bytes of the arguments IIRC. Windows calling convention.

Re: i18n

2012-02-03 Thread Trass3r
I deduce so that there is no "official" support for that. If it's, it's a pain. Pain? Writing such a system can be done in a couple of lines.

Re: opAssign and references

2012-01-31 Thread Trass3r
I am using DMD 2.057 on Ubuntu 64bit. Are you sure that it does not work? Can anyone reproduce the error? import std.variant; struct Foo { Variant a; ref Variant refA(){ return a; } } void main(){ Foo f1; f1.refA() = 24; } Compiles fine on Ubuntu x64 with git

Re: Class Initialization

2012-01-31 Thread Trass3r
*whispers gee dee c* windows binaries please... Seek and you shall find. https://bitbucket.org/goshawk/gdc/downloads

Re: Class Initialization

2012-01-31 Thread Trass3r
I was reading the C++ Object Model book recently (well, I'm still reading) and was amazed at how many edge-cases there are in C++, and how lucky I am to be using D. Well, minus the Optlink that is. :) *whispers gee dee c*

Re: regex: force entire string to match

2012-01-31 Thread Trass3r
I want to write a regex to check if a whole string is a number. With my current regex("[0-9]+") numbers will be carved out of things like "aaa456" (hit: 456) and I circumvent this by checking the lengths for inequality, which is stupid. My regex is surely missing something? Try ^ and $ if applic

Re: Scoped Class Instance

2012-01-31 Thread Trass3r
However, I cannot, by default, scope my custom allocations. Any ideas? std.typecons.scoped

Re: Chained Catch Statements

2012-01-30 Thread Trass3r
What is the idiom for handling a case where multiple exceptions of different types may be thrown? I think you could catch a common baseclass like Exception and test if it's a specific Exception by casting.

Re: dmd & gdc

2012-01-26 Thread Trass3r
I looked up ldc recently, and it seems that it hasn't been updated for years. Seems that gdc is the only other D compiler that's still actively maintained. Please don't spread such misinformation. https://github.com/ldc-developers/ldc/commits/master

Re: dmd & gdc

2012-01-26 Thread Trass3r
Building gcc in general is a pain. It's just a little less painful on *nix systems, but still painful. I can't agree. The build instructions contain everything. Has been straightforward for me right from the beginning.

Re: dmd & gdc

2012-01-26 Thread Trass3r
There is also gdmd : dmd front end that use gdc It's nothing but a perl script that translates dmd command line options into gdc ones.

Re: dmd & gdc

2012-01-26 Thread Trass3r
On Thursday, 26 January 2012 at 11:46:19 UTC, sami wrote: my question is if there thing i can do with dmd only and visa versa? what the feature of one of them over the other? what the different between them in term of inline assembly, performance, platform and bugs? They share the frontend, i

Re: Definition of extern(System)?

2012-01-25 Thread Trass3r
I was pretty sure it's somewhere in the spec.

Re: for loop

2012-01-23 Thread Trass3r
void main(){ for ({int x=0; short y=0;} x < 10; x++, y++){ } } wtf?

Re: for loop

2012-01-22 Thread Trass3r
for (int x = 0, int y = 0; .) for (int x=0, y=0; ...)

Re: Struct initialization, implicit conversions and delegates

2012-01-16 Thread Trass3r
StringHash sh = "SomeString"; // ok That's the only thing that works. An @implicit tag for constructors to allow all implicit conversions would really be helpful. In general we need finer control of implicit conversions. Just have a look at ProxyOf: https://github.com/D-Programming-Languag

Re: Problem with interfacing C code to D

2012-01-09 Thread Trass3r
What's the definition of Display?

Re: Ref local variables?

2012-01-08 Thread Trass3r
Sorry, didn't read the rest. ^^

Re: Ref local variables?

2012-01-08 Thread Trass3r
MapTile[] map; // It's a struct ref MapTile tile=map[y*w+x]; tile.id=something; tile.isWall=true; MapTile* tile = &map[y*w+x];

Re: typedef deprecated - now what ?

2011-12-31 Thread Trass3r
Basically it was deprecated because it's poorly defined and implemented. There are several types of typedefs that need to be available: parallel, opaque, supertype and subtype. See http://d.puremagic.com/issues/show_bug.cgi?id=5467

Re: typedef deprecated - now what ?

2011-12-30 Thread Trass3r
is there a template or something in phobos to get the same typesafe behaviour of good old typedef ? I've brought this up several times. People just don't give a shit. http://d.puremagic.com/issues/show_bug.cgi?id=5467

Re: Reading about D: few questions

2011-12-23 Thread Trass3r
5. Align attribute. http://dlang.org/attribute.html#align struct S { align(4) byte a; // placed at offset 0 align(4) byte b; // placed at offset 1 } Explain this please. align is a huge mess imo. "It matches the corresponding C compiler behavior" So what's the point of align in the firs

Re: test if object is instance of class at compile time

2011-12-22 Thread Trass3r
I'd really like to have 'if (instance is ClassType)' syntax in D.

Re: writing iterators without code duplication. inout?

2011-12-21 Thread Trass3r
Can't really answer your original question, but 1. Why don't you use opApply? 2. Why do you use ref int even in the const version? 3. You could also use alias this to allow iteration, don't know if that's what you want in general though.

Re: Allocating memory in D shared library when accessed from C++

2011-12-19 Thread Trass3r
Am 19.12.2011, 23:13 Uhr, schrieb Martin Drašar : Dne 19.12.2011 23:09, Trass3r napsal(a): It actualy returns a procedure address and the procedure is called. It lands inside export extern (C) int magicNumber() and crashes when attempting to allocate memory for Something. Did you properly

Re: Allocating memory in D shared library when accessed from C++

2011-12-19 Thread Trass3r
It actualy returns a procedure address and the procedure is called. It lands inside export extern (C) int magicNumber() and crashes when attempting to allocate memory for Something. Did you properly initialize druntime?

Re: Void initialization

2011-12-19 Thread Trass3r
Am 19.12.2011, 13:04 Uhr, schrieb Bear : Using D1, I have a program that creates tons of float[] ; for performance reasons, I would like them to be uninitialized. std.array.uninitializedArray

Re: -D option = Embedded documentation

2011-12-16 Thread Trass3r
Am 16.12.2011, 19:45 Uhr, schrieb dune : I didn't realize that stuff like this will not work as expected: [code] /*** * Brief summary of what * myfunc does, forming the summary section. * * First paragraph of synopsis description. * * Second paragraph of *

Re: -D option = Embedded documentation

2011-12-16 Thread Trass3r
Page generated by href="http://www.digitalmars.com/d/2.0/ddoc.html";>Ddoc. Ah looks like that must be updated to dlang.org too

Re: -D option = Embedded documentation

2011-12-16 Thread Trass3r
What I posted was an example, in reality there is tons of code inside the d file. Show the file, or part of it.

Re: -D option = Embedded documentation

2011-12-16 Thread Trass3r
Am 16.12.2011, 17:47 Uhr, schrieb dune : Never tried this before: Tried (with D2.057) to use the embedded documentation option with: /** * documentation here */ and the html files are generated but they only contain a html skeleton and no documentation. This comment doesn't refer to any

Re: Alias/Ref Tuples ?

2011-12-16 Thread Trass3r
I think something like this is implemented in a dmd pull request.

Re: D Grammar Specification

2011-11-29 Thread Trass3r
http://lists.puremagic.com/pipermail/digitalmars-d/2011-March/098950.html

Re: auto

2011-11-24 Thread Trass3r
The type has to be deduced anyway for type checking the assignment/initialization. Makes sense. Overseen that.

Re: auto

2011-11-24 Thread Trass3r
Well the runtime performance is equal but of course compilation takes slightly longer since it has to deduce the type first. Just curious: I would be surprised if there was actually a measurable difference between the two – did you ever try to measure it? Actually not. Would be interesting,

Re: auto

2011-11-24 Thread Trass3r
is there any performance gap using auto instead of int or other type? For example int[] ar1 = new int[1000]; auto[] ar2 = new int[1000]; are these equivalent by a perfomance point of view? Well the runtime performance is equal but of course compilation takes slightly longer since it has to d

Re: Internal error: ..\ztc\cgcs.c 352

2011-11-22 Thread Trass3r
Please check if your case is equal to http://d.puremagic.com/issues/show_bug.cgi?id=4414

Re: Make a variable single-assignment?

2011-11-21 Thread Trass3r
Don't think so. You could also wrap it in a struct with disabled opAssign, but this would also change the type.

Re: immutable & alias this

2011-11-09 Thread Trass3r
test.d(16): Error: cannot implicitly convert expression ([1,2,3]) of type int[] to immutable(Typedef!(int[])) OT: this shows another possible problem. See http://clang.llvm.org/diagnostics.html, section "Typedef Preservation and Selective Unwrapping"

Re: Spurious imports in Phobos ?

2011-11-09 Thread Trass3r
Phobos contains a lot of templates and if a template isn't instantiated it won't be compiled. Meaning there can be hidden compile errors if you start to remove imports and they will not show until a template that uses something from the import is instantiate. Wouldn't it be possible/better

Re: Spurious imports in Phobos ?

2011-11-09 Thread Trass3r
2. what is your opinion about public import ? In C++, "hidden" or "implicit" #includes is a common source of compilation problems (order of #includes), I tend to think it's a bad thing. It can be quite useful. I use it often for C library wrappers. As soon as you import the wrapper code you

Re: .Net

2011-11-09 Thread Trass3r
Am 09.11.2011, 13:39 Uhr, schrieb Reklen : Is there a project to export D in .Net world? I see this http://dnet.codeplex.com/ but it seems dead. Feel free to continue that project ;) Apart from that you are left with C interface dlls.

Re: web development in D programming

2011-11-09 Thread Trass3r
I am a little disapointed, so if you have many request for a web page this lib http://arsdnet.net/dcode/ is usable or not ? If they are any other method to do a web application in D2 programming do not hesitate and tell to me which lib used. There's also a project named Serenity http://www.dig

Re: extends and implements

2011-11-07 Thread Trass3r
You can do this and/or use the convention of extends first, implements second: class Rectangle : Drawable, IShape, IOtherInterface {} It's not a convention, the spec demands that. http://d-programming-language.org/class.html If you're really concerned about clarity, use comments: class Rect

Re: Is this actually valid code?

2011-11-07 Thread Trass3r
Cool stuff, thanks guys. This thing kicks some serious C++ ass. ^^ How? You can use using in C++ to do the same.

Re: Is this actually valid code?

2011-11-07 Thread Trass3r
class Foo { @property void test(int) {} @property int test() { return 1; } } class Bar : Foo { alias super.test test; override @property void test(int) {} void bartest() { auto x = test; } } And it actually works! Is this a documented feature? http://d-programming-language.

Re: template expressions in C++ to an equivalent in D

2011-10-30 Thread Trass3r
I was thinking about porting http://eigen.tuxfamily.org/index.php in D. Don't we have a LinAlg library now thx to that GSoC project? I'm currently on SFML2 but it goes quite fast (thanks to Trass3r for porting SFML to D2 so a big part of the job is done). You're welcome.

Re: char and string with umlauts

2011-10-20 Thread Trass3r
Make sure your source file is saved in UTF-8 format.

Re: Looking for documentation of D's lower-level aspects.

2011-10-19 Thread Trass3r
Am 20.10.2011, 00:06 Uhr, schrieb Sean Silva : == Quote from Jesse Phillips (jessekphillip...@gmail.com)'s article Right now D isn't ready to be used in this fashion It looks there's a more-or-less functional kernel written in D (and pretty well documented too): http://wiki.xomb.org/index.php?

Re: Looking for documentation of D's lower-level aspects.

2011-10-18 Thread Trass3r
ahead = n._next; The C/C++ equivalent of this is `ahead = n->next;`, or equivalently `ahead = (*n).next;`. This is a difference in semantics from C/C++ with respect to the `.`---it seems like D turns pointer to struct property accesses into property access with indirection. Yes. It w

Re: Calling D DLL from C# and passing/retrieving string variables

2011-10-12 Thread Trass3r
[DllImport("mydll.dll", CallingConvention = CallingConvention.Cdecl, SetLastError = false, CharSet = CharSet.Auto)] private static extern bool concatenate( string str1, // in string str2, // in StringBuilde

Re: operator "~" does not check type?

2011-10-12 Thread Trass3r
I believe that the primary reasoning for allowing the implicit conversion between int and dchar is so that code like this dchar c = 'a' + 7; That's a '+' though, not a '~'. I think it shouldn't be allowed with ~ since it's misleading. Newbies would probably expect "abc" ~ 10 to yield "abc10" r

Re: How convice people that D it's wonderfull in a hour ?

2011-10-09 Thread Trass3r
Talk about stuff that's hard to do or impossible in C++ (or just a PITA like the whole language) and compare it to some nifty D code. For example template metaprogramming. No easy way to do template constraints, no is expressions nor a proper typeof so you have to use specialization a lot.

Re: contrary of std.utf.toUTFz!(const(wchar)*)

2011-10-07 Thread Trass3r
Just wanted to point out how it's implemented with language tools.

Re: contrary of std.utf.toUTFz!(const(wchar)*)

2011-10-07 Thread Trass3r
I feel a little stupid, but how to convert a wchar* zero terminated string into a wstring (DMD 2.055)? wstring w = cstr[0 .. strlenw(cstr)];

Re: Why an abstract pointer cannot be used as value in an associate array?

2011-09-29 Thread Trass3r
Am 29.09.2011, 06:51 Uhr, schrieb Cheng Wei : extern(C) { struct ab; } ab*[int] map; void main() { map.clear(); } Cannot be compiled. Why? Thanks. Just use void* for opaque pointers in D.

Re: I can't build dsfml2 or derelict.sfml whit dsss

2011-09-22 Thread Trass3r
DSFML2's dsss file is just a remnant from the old DSFML. Also I don't really update DSFML2 anymore. A SWIG wrapper would be a better idea but it's hard to make it use our custom system module instead of wrapping the original one. In general using dsss isn't advisable, since rebuild is horrib

  1   2   3   4   >