simendsjo wrote:
Is there a way to print a stacktrace on segfaults on linux?
catchsegv (part of glibc, so should be available on just about all
Linux distros...)
Jerome
--
mailto:jeber...@free.fr
http://jeberger.free.fr
Jabber: jeber...@jabber.fr
signature.asc
Andrej Mitrovic wrote:
...snip...
I want to avoid writing check() twice. I only have to statically
check a field of a member if it's of a certain type (Foo).
One solution would be to use a boolean:
void test(T)(T t)
{
bool isTrue = true;
static if (is(T == Foo))
isTrue =
%u wrote:
I have 2 issue:
1- i can't install the package, there is problem I don't know what is it?
What is the error?
2-it is not updated.
It is not flagged out of date either. AFAIK it should compile and
since it downloads the latest source from Mercurial, there is no
need to
bearophile wrote:
I have not found a quick way to let GCC vectorize this code, using two
multiplications with one SSE instructions, I am not sure GCC is able to do
this automatically.
Even with -ftree-vectorize? AFAIK it is considered experimental and
needs to be turned on
%u wrote:
== Quote from %u (asm...@hotmail.com)'s article
i can't install it and i use this command
yaourt -R gdc
i mean yaourt -S gdc
The gdc package is woefully out of date. You should install either
gdc1-hg (for D1) or gdc2-hg (for D2) both of which are reasonably
maintained
%u wrote:
i can't install dmd or gdc in arch linux from AUR
i don't way?
For gdc, which package exactly are you trying to install? On what
platform (32 or 64 bits)? And what error do you get?
Jerome
--
mailto:jeber...@free.fr
http://jeberger.free.fr
Jabber:
simendsjo wrote:
On 05.03.2011 08:58, Jérôme M. Berger wrote:
simendsjo wrote:
On 04.03.2011 22:42, Jérôme M. Berger wrote:
int main(string[] args) {
auto s1 =(); // MH MH
auto s2 =(); // OK
s2.c =ull; // OK
return 0;
}
Is part of your message gone?
Uh, I did
simendsjo wrote:
This code confuses me... It's from the c mysql windows dll, libmysql.dll.
size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
const char *fmt,
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
You can safely ignore
Tarun Ramakrishna wrote:
Hi,
Do we have a ini parser in D somewhere ? If not, is there some
documentation anywhere that tells one how to wrap a simple C++ library
like simple ini ? (Of course it isn't difficult to build a quick
parser, just that someone would done this already)
Stewart Gordon wrote:
On 15/01/2011 17:44, Steven Schveighoffer wrote:
snip
Which unnecessarily complicates things. For example, you can't compare
two interfaces (try it!).
?
interface I {}
...
I a = ...;
I b = ...;
if (a == b) // -- ERROR
--
mailto:jeber...@free.fr
%u wrote:
Hi,
There's a question that's been lurking in the back of my mind ever since I
learned about D:
How does the GC distinguish code from data when determining the objects to
collect? (E.g. void[] from uint[], size_t from void*, etc.?)
If I have a large uint[], it's practically
Steven Schveighoffer wrote:
What I would suggest is static factory methods. The issue with any kind
of typedef (be it with the soon-to-be-deprecated typedef keyword or with
a proxy struct), is that what does this mean?
auto obj = new Foo([1, 2, 3], blah);
Is blah a filename or a message?
Peter Federighi wrote:
Jonathan M Davis wrote:
Did you wrap the C declarations in an extern(C) block? Without that, it's
going
to think that your variables are D variables not C variables. The same goes
for
any functions - _especially_ for the functions. In fact, a large portion of
- in
Bob Cowdery wrote:
Hi all,
This is a long shot but I'm out of ideas. I ported an app from Windows
to Linux and after many issues it is working but I'm left with a strange
problem. The app basically reads data streams from a USB device,
processes them and outputs real-time graphical data to
Nick Voronin wrote:
On Sat, 18 Dec 2010 23:19:47 +0100
Joost 't Hart joost.t.h...@planet.nl wrote:
Quoting the documentation:
/Suspends the calling thread for at least the supplied period./
What does at least mean here? Is there also an at most? I do not
want my friend to end up in
bearophile wrote:
Jonathan M Davis:
At present, I don't believe that associative arrays are valid CTFE
You are wrong, the current situation with AAs is not so simple :-)
string foo(string k) {
string[string] map = [bar : spam];
return map[k];
}
enum string v = foo(bar);
Steven Schveighoffer wrote:
On Wed, 27 Oct 2010 16:26:21 -0400, div0 d...@sourceforge.net wrote:
class Foo(T) {
this(T t) {
bar = t;
}
this(string x) {
}
this(int x) {
}
T bar;
}
autof0 = new Foo(wtf?);
autof1 = new
bearophile wrote:
Jonathan M Davis:
if the state couldn't have changed since the last public function call, the
running
the invariant before the function call is pointless.
The post-condition of a method doesn't need to make sure the class is in a
correct state, all it has to test is
bearophile wrote:
J. Berger:
Jonathan's point is not about running the post-condition and the
invariant. It is about running the invariant twice: both before and
after the function. This is completely independent from any pre- or
post-conditions there may be.
You are missing
Tom Kazimiers wrote:
Hi Simen,
On 09/26/2010 04:06 PM, Simen kjaeraas wrote:
Likely, it is this[1]:
[T]he order in which the garbage collector calls destructors for
unreference objects is not specified. This means that when the garbage
collector calls a destructor for an object of a class
Stewart Gordon wrote:
Ellery Newcomer wrote:
On 07/06/2010 07:05 PM, Stewart Gordon wrote:
snip
Just using uint, of course!
For enforcing a non-negative constraint, that is brain damaged.
Semantically, the two are very different.
So effectively, the edit wars would be between people
Daniel Keep wrote:
immutable means no one can modify this.
const means someone might be able to modify this, but not you can't.
So?
Basically, what the OP said, is that we need readers-writer locks
[1]. A const synchronized method would use the read lock (and
therefore
div0 wrote:
Jérôme M. Berger wrote:
div0 wrote:
Jérôme M. Berger wrote:
That depends. In C/C++, the default value for any global variable
is to have all bits set to 0 whatever that means for the actual data
type.
No it's not, it's always uninitialized.
According to the C89
div0 wrote:
Jérôme M. Berger wrote:
That depends. In C/C++, the default value for any global variable
is to have all bits set to 0 whatever that means for the actual data
type.
No it's not, it's always uninitialized.
According to the C89 standard and onwards it *must
bearophile wrote:
kai:
I was scared off by the warning that D 2.0 support is experimental.
LDC is D1 still, mostly :-(
And at the moment it uses LLVM 2.6.
LLVM 2.7 contains a new optimization that can improve that code some more.
Good to know, thanks (thats actually a great feature
Simen kjaeraas wrote:
Joseph Wakeling joseph.wakel...@webdrake.net wrote:
Maybe true, but I was thinking of it from a different angle -- why the
main D2 development does not switch backends.
So which do you suggest be used instead - the one that doesn't work on
Windows (no exceptions) or
Jonathan M Davis wrote:
Jesse Phillips wrote:
As you may have noticed by the comments to on bug 3158. exec()[1] calls
replace your process, this means it will not continue your program. To
get arround this you find that people will first fork()[2] and exec on
the child process.
Ah yes.
Don't forget that gcc adds a couple of system libraries (like
libgcc) to the linker command. You need to give the right path for
those too (you might want to try with --sysroot, or use --nostdlib
and specify -lgcc manually)
Jerome
--
mailto:jeber...@free.fr
Don wrote:
Steven Schveighoffer wrote:
That value should always be consistent. There has to be a way to
verify that the value was set properly. Otherwise, how do you verify
things
like communication protocols or expectations for runtime functions?
I think that sending an uninitialized
Rainer Deyke wrote:
Charles Hixson wrote:
I've read and re-read the documentation, but I can't decide whether a
UTF-8 character that takes multiple bytes to express counts as one or
multiple values in length and sizeof. Sizeof seems to presume that all
entries are the same length, but
div0 wrote:
Jérôme M. Berger wrote:
Max Samukha wrote:
Tom S wrote:
Max Samukha wrote:
COFF/ELF output would not be that bad though, at least if there's some
linker that supports these *and* its license allows it to be bundled
with DMD.
I doubt such a linker exists. And if it does, I doubt
downs wrote:
BCS wrote:
Hello AxelS,
BCS Wrote:
You can't. The D runtime (and most other runtimes) don't ever reduce
the amount of memory they keep in the heap. If you where to allocate
another 25MB right after that function you would see no change in the
memory usage. The good news is that
BCS wrote:
Hello Saaa,
You have to write it yourself. Here's a good starting point:
http://www.digitalmars.com/d/1.0/lex.html#identifier
Yes, that was my starting point and it seemed quite complex, thus my
question :)
I think I'll stay with my simple check for now as it isn't really
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Zoran Isailovski wrote:
I'm an experienced C#, Java and Python programmer, and have employed closures
(and C# delegates) upon numerous occasions. While experimenting with D
closures and delegates, I was stroke by a phenomenon I cannot explain.
34 matches
Mail list logo