On Tuesday, 29 May 2012 at 06:56:40 UTC, Dmitry Olshansky wrote:
On 29.05.2012 10:52, Era Scarecrow wrote:
I considered that, but then you actually limit your address
space to
2^63,
No you don't. Since pointer is already a pointer to word-sized
object. It has 2 last bits == 0. Always. There
On 29.05.2012 11:25, Era Scarecrow wrote:
On Tuesday, 29 May 2012 at 06:56:40 UTC, Dmitry Olshansky wrote:
On 29.05.2012 10:52, Era Scarecrow wrote:
I considered that, but then you actually limit your address space to
2^63,
No you don't. Since pointer is already a pointer to word-sized object
On Monday, 28 May 2012 at 18:53:50 UTC, Ali Çehreli wrote:
On 05/28/2012 11:50 AM, "Jarl André" "
wrote:
> 1. Is there a way to convert from string "INFO" to
LogLevel.INFO, by name?
conv.to can do that:
import std.conv;
enum LogLevel { ALL, INFO, WARNING }
void main()
{
enum l = to!LogL
Hi all!
I've spend several hours to solve my problem, and I did it!
But don't know why it is worked in this way:
I'd like to modify all fields of an object by a specific values
(for deserialization).
public ref T foo(T)() {
T *ret = new T;
// DON'T WORK
// Looping thro
On Tue, May 29, 2012 at 9:18 PM, Sharp wrote:
What does it give if you do:
> foreach(index, unused; fields) {
> fields[index] = 1;
>}
?
On 05/29/2012 12:18 PM, Sharp wrote:
> public ref T foo(T)() {
> T *ret = new T;
> // DON'T WORK
> // Looping through fields in this way doesn't modify the object
> auto fields = ret.tupleof;
Looks like fields is a local copy of ret.tupleof so the following
modifies just that copy.
> foreach(
Having solved Project Euler 300 I wanted to explore which of the
strictly superior fold set were redundant but started getting an
exception thrown after a few iterations.
I've changed the offending part to try to make it as impact-free
as possible (my code is not pretty :)), it's now pure and
It seems to leak memory with each iteration of the loop taking
another 100-200K until it crashes when going over 11 MB.
Thanks a lot Ali, I understand now!
Philippe, based on what Ali said, your code will give exactly the
same result because it looping through a local copy of
ret.tupleof.
On 05/29/2012 07:33 PM, ixid wrote:
Having solved Project Euler 300 I wanted to explore which of the
strictly superior fold set were redundant but started getting an
exception thrown after a few iterations.
I've changed the offending part to try to make it as impact-free as
possible (my code is
On 2012-05-29 21:18, Sharp wrote:
Hi all!
I've spend several hours to solve my problem, and I did it!
But don't know why it is worked in this way:
I'd like to modify all fields of an object by a specific values (for
deserialization).
If you want a serialization library:
https://github.com/ja
11 matches
Mail list logo