On Tuesday, 4 July 2017 at 03:13:14 UTC, Filip Bystricky wrote:
Oh and I forgot to mention: another use-case for this would be
for arrays. For manually managed arrays like
std.container.array, it would make it possible to transfer
ownership of individual objects from the array back to the
prog
On Monday, 3 July 2017 at 22:34:51 UTC, FoxyBrown wrote:
On Monday, 3 July 2017 at 20:45:19 UTC, bauss wrote:
On Monday, 3 July 2017 at 13:54:42 UTC, Jean-Louis Leroy wrote:
I know how to find all the classes:
foreach (mod; ModuleInfo) {
foreach (c; mod.localClasses) {
// use
On Tuesday, 4 July 2017 at 02:53:00 UTC, Filip Bystricky wrote:
On Tuesday, 4 July 2017 at 01:56:11 UTC, Moritz Maxeiner wrote:
[...]
However, in many cases it is unacceptable to have to prevent
the whole block from being freed (especially if the memory is
managed by a compacting gc).
Then
Oh and I forgot to mention: another use-case for this would be
for arrays. For manually managed arrays like std.container.array,
it would make it possible to transfer ownership of individual
objects from the array back to the program after the array goes
out of scope. For gc slices, it could en
On Tuesday, 4 July 2017 at 01:56:11 UTC, Moritz Maxeiner wrote:
On Monday, 3 July 2017 at 17:06:10 UTC, Ali Çehreli wrote:
On 07/02/2017 07:56 PM, Stefan Koch wrote:
On Monday, 3 July 2017 at 02:51:49 UTC, Filip Bystricky wrote:
Anyone?
The answer is no.
Partial deallocation in an arbitrary
On Monday, 3 July 2017 at 17:06:10 UTC, Ali Çehreli wrote:
On 07/02/2017 07:56 PM, Stefan Koch wrote:
On Monday, 3 July 2017 at 02:51:49 UTC, Filip Bystricky wrote:
Anyone?
The answer is no.
Partial deallocation in an arbitrary fashion is not advisable.
And there are no standard library mec
On Mon, Jul 03, 2017 at 07:13:45AM +, Era Scarecrow via Digitalmars-d-learn
wrote:
> On Monday, 3 July 2017 at 06:20:22 UTC, H. S. Teoh wrote:
[...]
> > I don't think there's a way to change how the FPU works -- the
> > hardware is coded that way and can't be changed. You'd have to
> > build
On Monday, 3 July 2017 at 20:45:19 UTC, bauss wrote:
On Monday, 3 July 2017 at 13:54:42 UTC, Jean-Louis Leroy wrote:
I know how to find all the classes:
foreach (mod; ModuleInfo) {
foreach (c; mod.localClasses) {
// use c.base to construct inheritance graph
}
}
Can
On Monday, 3 July 2017 at 13:54:42 UTC, Jean-Louis Leroy wrote:
I know how to find all the classes:
foreach (mod; ModuleInfo) {
foreach (c; mod.localClasses) {
// use c.base to construct inheritance graph
}
}
Can I do the same with all the interfaces? Looking at obje
On Monday, 3 July 2017 at 17:30:51 UTC, Ali Çehreli wrote:
hOn 07/03/2017 10:13 AM, Paolo Invernizzi wrote:
> [...]
struct with
> [...]
I had difficulty understanding the requirements. For example,
it's not clear whether you want the literal "first" and
"second" names.
[...]
Thanks Ali,
hOn 07/03/2017 10:13 AM, Paolo Invernizzi wrote:
> It's not exactly the same, as first and second should be struct with
> partial fields from Foo, of different types.
I had difficulty understanding the requirements. For example, it's not
clear whether you want the literal "first" and "second" n
On Monday, 3 July 2017 at 16:41:51 UTC, vit wrote:
On Monday, 3 July 2017 at 13:53:45 UTC, Paolo Invernizzi wrote:
[...]
//https://dpaste.dzfl.pl/d59469c264b2
import std.algorithm : map, copy, equal;
import std.range : iota;
struct Foo {
int[3] a;
string[2] b;
}
ref T first(R : T[],
On 07/02/2017 07:56 PM, Stefan Koch wrote:
On Monday, 3 July 2017 at 02:51:49 UTC, Filip Bystricky wrote:
Anyone?
The answer is no.
Partial deallocation in an arbitrary fashion is not advisable.
And there are no standard library mechanisms for it.
Would it be possible to write a custom std
On Monday, 3 July 2017 at 13:53:45 UTC, Paolo Invernizzi wrote:
I've struct like that:
struct Foo {
int a_1; float a_2; string a_3;
string b_1; double b_2;
}
I would like to transparently access that like:
foo.a.first
foo.b.second = "baz";
with an helper like:
auto a(...) { ... }
aut
Yuri wrote:
On Monday, 3 July 2017 at 14:04:47 UTC, ketmar wrote:
Yuri wrote:
On Sunday, 2 July 2017 at 21:15:41 UTC, ketmar wrote:
[...]
I share your sentiment in relation to std.json, ketmar.
On a side note, what would be a better way to serialize/deserialize
objects in D if std.json d
On Monday, 3 July 2017 at 14:04:47 UTC, ketmar wrote:
Yuri wrote:
On Sunday, 2 July 2017 at 21:15:41 UTC, ketmar wrote:
[...]
I share your sentiment in relation to std.json, ketmar.
On a side note, what would be a better way to
serialize/deserialize objects in D if std.json does not cut
i
On Monday, 3 July 2017 at 13:34:50 UTC, Adam D. Ruppe wrote:
On Monday, 3 July 2017 at 13:26:52 UTC, Yuri wrote:
Yes, when accessing .integer instead of .floating then it
works, unfortunately that is not suitable for the task at
hand, it has to be a float.
Just write a helper function that ca
Yuri wrote:
On Sunday, 2 July 2017 at 21:15:41 UTC, ketmar wrote:
so, write your own wrapper that will convert INTEGER/UINTEGER/FLOAT to
`double`. i think this is the best solution (if there can be "best
solution" with std.json at all).
I share your sentiment in relation to std.json, ketmar.
I know how to find all the classes:
foreach (mod; ModuleInfo) {
foreach (c; mod.localClasses) {
// use c.base to construct inheritance graph
}
}
Can I do the same with all the interfaces? Looking at object.d
gives no clue...
I've struct like that:
struct Foo {
int a_1; float a_2; string a_3;
string b_1; double b_2;
}
I would like to transparently access that like:
foo.a.first
foo.b.second = "baz";
with an helper like:
auto a(...) { ... }
auto b(...) { ... }
that can be used also in functions that are exp
On Monday, 3 July 2017 at 13:26:52 UTC, Yuri wrote:
Yes, when accessing .integer instead of .floating then it
works, unfortunately that is not suitable for the task at hand,
it has to be a float.
Just write a helper function that casts it yourself:
double numeric(JSONValue v) {
if(v.type =
On Sunday, 2 July 2017 at 21:15:41 UTC, ketmar wrote:
so, write your own wrapper that will convert
INTEGER/UINTEGER/FLOAT to `double`. i think this is the best
solution (if there can be "best solution" with std.json at all).
I share your sentiment in relation to std.json, ketmar.
On a side no
On Sunday, 2 July 2017 at 21:12:48 UTC, Adam D. Ruppe wrote:
On Sunday, 2 July 2017 at 21:07:40 UTC, Yuri wrote:
It is expected to print '2' in the console, however an
exception is thrown:
std.json.JSONException@/build/ldc-I3nwWj/ldc-0.17.1/runtime/phobos/std/json.d(235):
JSONValue is not a f
On Monday, 3 July 2017 at 05:38:56 UTC, Era Scarecrow wrote:
On Monday, 3 July 2017 at 03:57:25 UTC, Basile B wrote:
6.251 has no perfect double representation. It's real value is:
I almost wonder if a BCD, fixed length or alternative for
floating point should be an option... Either library,
On Monday, 3 July 2017 at 09:24:35 UTC, Guillaume Piolat wrote:
On Monday, 3 July 2017 at 08:55:20 UTC, Martin Tschierschke
wrote:
Hello for a simple game I would like to add some very simple
sound, not much different than the beeps of "PAC Man". Is
there anything I can use for this?
Derelict
On Monday, 3 July 2017 at 04:06:23 UTC, Saurabh Das wrote:
On Monday, 3 July 2017 at 03:57:25 UTC, Basile B wrote:
On Monday, 3 July 2017 at 03:50:14 UTC, Saurabh Das wrote:
[...]
6.251 has no perfect double representation. It's real value is:
6.215099962483343551867E0
Hence whe
On Monday, 3 July 2017 at 08:55:20 UTC, Martin Tschierschke wrote:
Hello for a simple game I would like to add some very simple
sound, not much different than the beeps of "PAC Man". Is there
anything I can use for this?
DerelictSDL supports the loading of SDL_mixer, which makes it
very pract
Hello for a simple game I would like to add some very simple
sound, not much different than the beeps of "PAC Man". Is there
anything I can use for this?
On Monday, 3 July 2017 at 06:20:22 UTC, H. S. Teoh wrote:
On Mon, Jul 03, 2017 at 05:38:56AM +, Era Scarecrow via
Digitalmars-d-learn wrote:
I almost wonder if a BCD, fixed length or alternative for
floating point should be an option...
From what I've heard, word on the street is to avoid
29 matches
Mail list logo