On Sunday, August 11, 2013 07:24:52 captaindet wrote:
I'm pretty sure that this is just a bad error message.
void main(){
writeln(ok: , ok, ok[0]: , ok[0]);
// ok: Tuple!(string, string, string)(one, two, three)
ok[0]:
one
writeln(er: , er, er[0]: , er[0]);
// er:
On 11.08.2013 06:25, JS wrote:
Given an object, is there a built in way to get the size of the class
the object represents? The object may be instantiated with a derived
instance of the object type, so using classInstanceSize doesn't work on
the type of the object.
I can obviously go through
10.08.2013 00:59, H. S. Teoh пишет:
On Fri, Aug 09, 2013 at 11:39:41PM +0700, Alexandr Druzhinin wrote:
-profile switch doesn't work for me (nothing happens), so I'm
curious how to profile?
You've to run your program first. It will create a bunch of extra files
in your current working
10.08.2013 01:30, Gary Willoughby пишет:
On Friday, 9 August 2013 at 16:39:41 UTC, Alexandr Druzhinin wrote:
-profile switch doesn't work for me (nothing happens), so I'm curious
how to profile?
I had the same problem on Linux where -profile didn't seem to produce
anything. I had a program
On 08/11/2013 06:25 AM, JS wrote:
Given an object, is there a built in way to get the size of the class
the object represents?
Yes.
Thank you so much, that's exactly the kind of reply I was seeking!
On Sunday, 11 August 2013 at 00:13:10 UTC, Jonathan M Davis wrote:
On Saturday, August 10, 2013 19:34:20 Carl Sturtivant wrote:
On Saturday, 10 August 2013 at 17:09:29 UTC, Carl Sturtivant
wrote:
What's the simplest way in D
Greetings.
I am trying to learn Vibe.D and rewrite using it, my old project
I've wrote with my (already rotting) personal framework
Project been written as commercial project for one of my clients
so I can't really release source code here, but in tl;dr it is:
Proxy that gets file from
On 8/11/13, JS js.m...@gmail.com wrote:
Given an object, is there a built in way to get the size of the
class the object represents?
Try:
import core.memory;
auto size = GC.sizeOf(object);
On Sunday, 11 August 2013 at 13:40:41 UTC, Timon Gehr wrote:
On 08/11/2013 06:25 AM, JS wrote:
Given an object, is there a built in way to get the size of
the class
the object represents?
Yes.
Troll.
On Sunday, 11 August 2013 at 09:30:32 UTC, Tobias Pankrath wrote:
On 11.08.2013 06:25, JS wrote:
Given an object, is there a built in way to get the size of
the class
the object represents? The object may be instantiated with a
derived
instance of the object type, so using classInstanceSize
Is this a mathematical fact that you have proven for all
languages? I'd like to see your proof if it's not bigger than
what will fit in a post.
That's so obvious, that you should be able to come up with one
yourself. Maybe you never experienced a situation where it was
clear, but that
On Sunday, 11 August 2013 at 15:28:44 UTC, JS wrote:
On Sunday, 11 August 2013 at 13:40:41 UTC, Timon Gehr wrote:
On 08/11/2013 06:25 AM, JS wrote:
Given an object, is there a built in way to get the size of
the class
the object represents?
Yes.
Troll.
I guess he does not answer to the
Maxim Fomin:
GC.sizeOf seems to return size of allocated page which is
bigger than needed (for ex. it returns 16 for a new int which
is 4).
The object instance contains a pointer to the virtual table, so
there's a way to know what object it is. With that runtime
information it should be
On Sunday, 11 August 2013 at 15:38:04 UTC, Tobias Pankrath wrote:
Is this a mathematical fact that you have proven for all
languages? I'd like to see your proof if it's not bigger than
what will fit in a post.
That's so obvious, that you should be able to come up with one
yourself. Maybe you
But it still has some issues. It works great for small files
but for larger
(~150MB) VibeD just closes remote connection and web browsers
just keep trying to receive something until it timeouts.
Another issue which will probably come is the fact that Vibe.D
won't be able to serve more than 1
On Sunday, 11 August 2013 at 16:16:26 UTC, bearophile wrote:
Maxim Fomin:
GC.sizeOf seems to return size of allocated page which is
bigger than needed (for ex. it returns 16 for a new int which
is 4).
The object instance contains a pointer to the virtual table, so
there's a way to know
Though using 1Kb buffer to read/write large file _may_ be an
issue that results in such long processing time.
tl; dr: you need to make sure that no operation in your request
handler takes more than fraction of second to complete.
On Sunday, 11 August 2013 at 16:36:53 UTC, Adam D. Ruppe wrote:
On Sunday, 11 August 2013 at 04:25:21 UTC, JS wrote:
Given an object, is there a built in way to get the size of
the class the object represents?
try this:
Object obj = new Whatever();
auto size = typeid(obj).init.length;
On Sunday, 11 August 2013 at 16:36:53 UTC, Adam D. Ruppe wrote:
On Sunday, 11 August 2013 at 04:25:21 UTC, JS wrote:
Given an object, is there a built in way to get the size of
the class the object represents?
try this:
Object obj = new Whatever();
auto size = typeid(obj).init.length;
Yes,
On Sunday, 11 August 2013 at 16:43:09 UTC, Dicebot wrote:
On Sunday, 11 August 2013 at 16:40:48 UTC, Maxim Fomin wrote:
Yes, this is answer to the question. By the way, it can be
simply
enum S = typeid(Whatever).init.length;
If exact type is statically known, no ClassInfo is required:
enum
On Friday, 9 August 2013 at 17:35:18 UTC, monarch_dodra wrote:
On Friday, 9 August 2013 at 15:28:10 UTC, Manfred Nowak wrote:
michaelc37 wrote:
WTF - -1 is greater than 7
From the docs:
It is an error to have one operand be signed and the other
unsigned for a
, =, or = expression.
On 08/11/2013 05:28 PM, JS wrote:
On Sunday, 11 August 2013 at 13:40:41 UTC, Timon Gehr wrote:
On 08/11/2013 06:25 AM, JS wrote:
Given an object, is there a built in way to get the size of the class
the object represents?
Yes.
Troll.
http://en.wikipedia.org/wiki/Troll_(Internet)
On Sunday, 11 August 2013 at 17:03:04 UTC, JS wrote:
For those that care, here is a snippet of what I am doing.
What are you actually going to use the number for? If you are
going to write your own New function, you'll need the init
anyway, so you aren't really paying more to get the size
On Sunday, 11 August 2013 at 17:12:48 UTC, Timon Gehr wrote:
On 08/11/2013 05:28 PM, JS wrote:
On Sunday, 11 August 2013 at 13:40:41 UTC, Timon Gehr wrote:
On 08/11/2013 06:25 AM, JS wrote:
Given an object, is there a built in way to get the size of
the class
the object represents?
Yes.
On Sunday, 11 August 2013 at 17:19:21 UTC, Adam D. Ruppe wrote:
On Sunday, 11 August 2013 at 17:03:04 UTC, JS wrote:
For those that care, here is a snippet of what I am doing.
What are you actually going to use the number for? If you are
going to write your own New function, you'll need the
On Sunday, 11 August 2013 at 17:03:04 UTC, JS wrote:
This is essentially what I'm doing BUT I am trying to avoid
having to repeat the exact same crap in every class because it
is time consuming, verbose, and error prone.
I was answering to Maxim, I don't give a fuck about your problems.
On Sunday, 11 August 2013 at 18:15:28 UTC, Timon Gehr wrote:
On 08/11/2013 07:26 PM, JS wrote:
On Sunday, 11 August 2013 at 17:12:48 UTC, Timon Gehr wrote:
On 08/11/2013 05:28 PM, JS wrote:
On Sunday, 11 August 2013 at 13:40:41 UTC, Timon Gehr wrote:
On 08/11/2013 06:25 AM, JS wrote:
Given
On Sunday, 11 August 2013 at 18:18:22 UTC, Dicebot wrote:
On Sunday, 11 August 2013 at 17:03:04 UTC, JS wrote:
This is essentially what I'm doing BUT I am trying to avoid
having to repeat the exact same crap in every class because it
is time consuming, verbose, and error prone.
I was
On Sunday, 11 August 2013 at 18:29:15 UTC, JS wrote:
THEN WHY THE FUCK DO YOU POST ON MY THREAD?
Because you are so funny when you rage and I take pleasure in
stressing someone as retarded as you ;)
Well, actually not. It was just to clarify possible misconception
by Maxim. Still feels
On 2013-08-11, 20:33, JS wrote:
I think you're missing the point to some degree(I realize there is a
diff between an object and a type, but I should be able to easily get
the class size of an object at run time regardless if the object is
typed as a base class). The code below does this,
You seem to show a certain amount of sophistication in projecting your
own attributes on others. Why not retarget that creativity to achieve
something useful?
On Sunday, 11 August 2013 at 18:33:19 UTC, JS wrote:
The code below does this, but at a cost of verbosity.
I don't see what the difference is in functionality - it looks to
me that you just reimplemented what the compiler does
automatically with typeid.
The way typeid(obj) works is similar
On Sunday, 11 August 2013 at 19:08:58 UTC, Simen Kjaeraas wrote:
On 2013-08-11, 20:33, JS wrote:
I think you're missing the point to some degree(I realize
there is a diff between an object and a type, but I should be
able to easily get the class size of an object at run time
regardless if
BTW, I hope that if you want to be added to the ignore list on my
side, you use the script and do the same. I know some will want
everyone to see their irrelevant posts but I won't see it and so
you will never get a response from me and it just clutters up the
NG and distracts from D.
On Sunday, 11 August 2013 at 19:06:07 UTC, Adam D. Ruppe wrote:
On Sunday, 11 August 2013 at 18:33:19 UTC, JS wrote:
The code below does this, but at a cost of verbosity.
I don't see what the difference is in functionality - it looks
to me that you just reimplemented what the compiler does
On Sunday, 11 August 2013 at 19:33:43 UTC, JS wrote:
If you read Simen Kjaeraas's post you will see it doesn't work
directly with interfaces, which is what I was doing.
Oh, I see it now. I think typeid(interface) gives a different set
of info.
This seems to work though:
On Sunday, 11 August 2013 at 19:58:26 UTC, Adam D. Ruppe wrote:
Oh, I see it now. I think typeid(interface) gives a different
set of info.
Thinking about it a bit more, this makes sense because an
interface is not necessarily an Object - it might also be a C++
class, or a COM object, or
On 2013-08-11 03:57, Nick Sabalausky wrote:
I'm familiar with building DMD/Phobos on linux32/64 (and I assume
freebsd is much the same, aside from having to install GNU make), but I
know OSX is different in that the 32/64-bits bins are combined. I don't
have access to a modern OSX machine ATM,
On Sunday, 11 August 2013 at 20:03:27 UTC, Adam D. Ruppe wrote:
On Sunday, 11 August 2013 at 19:58:26 UTC, Adam D. Ruppe wrote:
Oh, I see it now. I think typeid(interface) gives a different
set of info.
Thinking about it a bit more, this makes sense because an
interface is not necessarily an
39 matches
Mail list logo