On Friday, 7 September 2012 at 17:32:43 UTC, Ellery Newcomer
wrote:
On 09/07/2012 10:31 AM, Ellery Newcomer wrote:
I have a struct buffer, and I want to print out its members'
offsetof.
This:
foreach(i,_t; buffer.tupleof) {
writefln(%s@: %s, _t.stringof, _t.offsetof);
}
In C++ (not C), when you wanted to parse a string, you were
supposed to put the string inside a stream (std::stringstream),
and then parse that new stream stream.
As a general rule, stringstream also allowed abstracting a string
into a more generic stream.
I did not find anything equivalent
On Saturday, September 08, 2012 11:01:50 monarch_dodra wrote:
In C++ (not C), when you wanted to parse a string, you were
supposed to put the string inside a stream (std::stringstream),
and then parse that new stream stream.
As a general rule, stringstream also allowed abstracting a string
On Sat, 2012-09-08 at 00:58 +0200, bearophile wrote:
[…]
If you support NumPy well and efficiently through Pyd, I think
some people will start using the D language just for this :-)
NumPy is good but it usually forces you to program vectorially,
like Matlab. Sometimes this is not nice, so
On Fri, 2012-09-07 at 15:21 -0700, Ellery Newcomer wrote:
On 09/06/2012 12:07 AM, Russel Winder wrote:
[…]
just used your scons fork to build the pyd embedded unittests. works
pretty nice
Splendid :-)
If you see any problems or glitches, let me know and/or post a bug
report. Although I said
Am Fri, 07 Sep 2012 16:13:28 -0700
schrieb Ellery Newcomer ellery-newco...@utulsa.edu:
playing with some old headers I had lying around,
dmd libdw_test.d {{header files}} -L-ldw
gives me
/usr/bin/ld: /usr/lib64/dmd-2.060/libphobos2.a(memory_4a8_620.o):
undefined reference to symbol
On 09/08/12 05:27, Timon Gehr wrote:
On 09/08/2012 04:19 AM, bearophile wrote:
Ellery Newcomer:
alright what's the deal?
This is one of the clean ways to do it:
void main () {
static struct Mat {
int[3][4] m;
alias m this;
}
Mat* fooz = new Mat;
Timon Gehr:
This may corrupt your heap.
I usually don't put the alis this...
I prefer this:
void main(){
alias int[3][4] fooz;
int[3][4]* i = (new fooz[1]).ptr;
}
This allocates past the size of the array, the information to
append to the array of fooz. It's a very little
On 09/08/2012 01:21 PM, bearophile wrote:
Timon Gehr:
This may corrupt your heap.
I usually don't put the alis this...
I prefer this:
void main(){
alias int[3][4] fooz;
int[3][4]* i = (new fooz[1]).ptr;
}
This allocates past the size of the array, the information to append to
On 09/08/2012 03:39 AM, Johannes Pfau wrote:
-L-llzmadec
Woot! it worked!
alias enum int e;
On 09/08/2012 03:09 AM, Russel Winder wrote:
On Fri, 2012-09-07 at 15:21 -0700, Ellery Newcomer wrote:
On 09/06/2012 12:07 AM, Russel Winder wrote:
[…]
just used your scons fork to build the pyd embedded unittests. works
pretty nice
Splendid :-)
Okay, here:
On Sat, 2012-09-08 at 07:20 -0700, Ellery Newcomer wrote:
[…]
Okay, here: https://bitbucket.org/ariovistus/deimos-elfutils/overview
I have some code with a working makefile and a nonworking SConstruct file.
I believe the issue is the header files have pragma(lib, X) in them, and
a single
On 09/08/2012 04:11 PM, Ellery Newcomer wrote:
alias enum int e;
It is valid according to the grammar and DMD ignores meaningless attributes.
scope shared @disable @trusted package final override deprecated extern
__gshared synchronized pure nothrow ref static abstract immutable alias
auto
Timon Gehr:
It is valid according to the grammar and DMD ignores
meaningless attributes.
Do you know why? Is it just a unfinished part of dmd, or Walter
believes this is an acceptable design for a compiler? In years I
have never heard a comment from him on this bad situation.
Bye,
On Saturday, 8 September 2012 at 16:00:44 UTC, Timon Gehr wrote:
scope shared @disable @trusted package final override
deprecated extern __gshared synchronized pure nothrow ref
static abstract immutable alias auto final override deprecated
extern __gshared synchronized enum pure nothrow ref
On 09/08/2012 06:44 PM, bearophile wrote:
Timon Gehr:
It is valid according to the grammar and DMD ignores meaningless
attributes.
Do you know why?
No reason.
Is it just a unfinished part of dmd, or Walter believes
this is an acceptable design for a compiler?
Jonathan would say he has
On Saturday, 8 September 2012 at 16:00:44 UTC, Timon Gehr wrote:
On 09/08/2012 04:11 PM, Ellery Newcomer wrote:
alias enum int e;
It is valid according to the grammar and DMD ignores
meaningless attributes.
scope shared @disable @trusted package final override
deprecated extern __gshared
On 09/08/2012 09:25 PM, Maxim Fomin wrote:
On Saturday, 8 September 2012 at 16:00:44 UTC, Timon Gehr wrote:
On 09/08/2012 04:11 PM, Ellery Newcomer wrote:
alias enum int e;
It is valid according to the grammar and DMD ignores meaningless
attributes.
scope shared @disable @trusted package
On Saturday, September 08, 2012 20:25:38 Timon Gehr wrote:
Jonathan would say he has more important things to do.
If someone else did it and had good enough arguments why the change should be
made, then it might make it in, but on top of Walter's time issues, this
strikes me as the sort of
On Saturday, 8 September 2012 at 18:16:33 UTC, Chris Cain wrote:
Time to hold an obfuscated D contest!
Hmmm... A little more difficult compared to C, since you don't
have the pre-processor.
I recall TCC (Tiny C Compiler) was originally done in a
obfuscation contest where he got the main
2012/9/8 Timon Gehr timon.g...@gmx.ch:
On 09/08/2012 09:25 PM, Maxim Fomin wrote:
On Saturday, 8 September 2012 at 16:00:44 UTC, Timon Gehr wrote:
On 09/08/2012 04:11 PM, Ellery Newcomer wrote:
alias enum int e;
It is valid according to the grammar and DMD ignores meaningless
Why fail this code?
without const on Name it works fine.
http://dpaste.dzfl.pl/9fa0986a
On 09/09/2012 01:16 AM, Namespace wrote:
Why fail this code?
without const on Name it works fine.
http://dpaste.dzfl.pl/9fa0986a
const fields cannot be written to. This includes the case when the
entire struct is written to at once.
24 matches
Mail list logo