Just found that wonderful Detours package from Microsoft:
http://research.microsoft.com/en-us/projects/detours/
Is there something like this for Linux, maybe even written in/available for D?
Mike Parker wrote:
> Jonathan M Davis wrote:
>> With gcc, you can pass it the -static flag and it will statically link
>> everything. Normally, with dmd (on linux at least), it dynamically links
>> all of the C/C++ libraries that it uses. So, if I run ldd (well, ldd32
>> technically) on one of my
sclytrack wrote:
gc1thread1
thread2
thread3
gc2thread4
thread5
when the gc1 cycles it does not block the gc2 threads. Would that be of
any use?
Or possible. And only use communication like between two processes, some
interprocess communication message passing t
Why a generic code have to be ugly?
At this age of compilers and languages, and the capabilities of DMD?
Why that many casts? or implicit casts?
DMD already doing it behind the scenes with constant folding,
not sure but i think literals stay that way mostly because of C
compatibility!
Thanks.
so Wrote:
> Basically what i am asking is hmmm, ability to write generic constants? :)
>
> Thanks!
Hi,
When writing generic FP code i always use real literals and cast to T, or int.
I suggest doing this.
Like:
T exp3(T)(T x)
{
if (x < cast(T)(-1.15365L))
{
retu
I can't think of any solution they might provide sorry.
You know there are C++ equivalents, for years and they didn't solve any
problems above.
Maybe i can use them to disable implicit casting, but then again program
won't compile. :P
Thanks!
On Sun, 28 Mar 2010 18:09:21 +0400, biozic wrot
Le 28/03/10 10:57, so a écrit :
Well, i am having hard time explaining, it is not a surprise that you
don't understand.
To make things clearer, lets forget floats for a seconds and change your
code to standard unsigned types.
import std.stdio: writeln;
struct Vector(T) {
this(T m) { mm = m; }
On 28/03/10 12:35, Robert Clipsham wrote:
I don't think dmd offers a way to do this by default, your best bet
would be to add -static to the makefile and see how it goes.
I just saw Mike's reply, I notice I misread your question, sorry. I'd
also try what he said, -L-static should do it.
On 28/03/10 10:28, Jonathan M Davis wrote:
With gcc, you can pass it the -static flag and it will statically link
everything. Normally, with dmd (on linux at least), it dynamically links all
of the C/C++ libraries that it uses. So, if I run ldd (well, ldd32
technically) on one of my programs I ge
Jonathan M Davis wrote:
With gcc, you can pass it the -static flag and it will statically link
everything. Normally, with dmd (on linux at least), it dynamically links all
of the C/C++ libraries that it uses. So, if I run ldd (well, ldd32
technically) on one of my programs I get:
linu
You didn't change anything there, just back to original code, now just
enabled implicit cast again!
Please read my next replies, everything should be clear now. :)
Thanks!
On Sun, 28 Mar 2010 14:32:21 +0400, bearophile
wrote:
so:
Well, i am having hard time explaining, it is not a surp
so:
> Well, i am having hard time explaining, it is not a surprise that you
> don't understand.
I think I have understood you this time. Writing skills are important for a
programmer :-)
Is this what you are asking for? But it's not very good code:
import std.stdio: writeln;
struct Vector(T)
Everything comes to this...
Why "3" is an int?
Why "0.3 is a double?
I guess these constraints was there before generic coding comes out, and
we are just stuck with it!
If these sound so naive, sorry about it, I don't know compiler/language
history.
Thanks!
On Sun, 28 Mar 2010 12:29:17 +04
Basically what i am asking is hmmm, ability to write generic constants? :)
Thanks!
On Sun, 28 Mar 2010 12:29:17 +0400, bearophile
wrote:
so:
With one exception yes, i want all 3 test pass with your fix to implicit
cast.
You know, we are trying to write generic code.
I don't understand
Well, i am having hard time explaining, it is not a surprise that you
don't understand.
To make things clearer, lets forget floats for a seconds and change your
code to standard unsigned types.
import std.stdio: writeln;
struct Vector(T) {
this(T m) { mm = m; }
Vector opBinary(strin
With gcc, you can pass it the -static flag and it will statically link
everything. Normally, with dmd (on linux at least), it dynamically links all
of the C/C++ libraries that it uses. So, if I run ldd (well, ldd32
technically) on one of my programs I get:
linux-gate.so.1 => (0xf779400
so:
> With one exception yes, i want all 3 test pass with your fix to implicit
> cast.
> You know, we are trying to write generic code.
I don't understand your problem/needs, sorry.
Bye,
bearophile
17 matches
Mail list logo