On Wednesday, 23 March 2016 at 21:37:09 UTC, Lucien wrote:
When I remove the Thread.sleep, it doesn't find all adresses.
Why ?
Socket.select() will wait _at most_ 100 msecs. If a socket gets
ready before that timeout, it will return immediately. Therefore,
you might not get the full
On Wednesday, 23 March 2016 at 20:54:20 UTC, Yuxuan Shui wrote:
Say:
module one;
void func(int a){}
/
module two;
import one;
void func(float a){}
Is there a way to get both func() in module two?
Add in module two:
alias func = one.func;
On Thursday, 24 March 2016 at 08:24:46 UTC, Edwin van Leeuwen
wrote:
JSONValue only works with the build in types, not with user
defined types. Either you define a specific function for the
class that returns a JSONValue. Easiest way to do that would be
to build an associative array with
On Thursday, 24 March 2016 at 08:24:46 UTC, Edwin van Leeuwen
wrote:
Alternatively there are multiple serialization libraries that
will allow you to turn any user defined type from and to
JSONValues.
https://code.dlang.org/packages/painlessjson
https://code.dlang.org/packages/jsonizer
Could somebody briefly outline how the thread-locality
(non-GC-locked) of allocators relates to the purity of the
containers using them?
This because I want to move forward with optimizations in my
knowledge graph that requires GC-free array containers storing
value typed elements
On Thursday, 24 March 2016 at 12:11:33 UTC, Marc Schütz wrote:
On Wednesday, 23 March 2016 at 20:54:20 UTC, Yuxuan Shui wrote:
module one;
void func(int a){}
/
module two;
import one;
void func(float a){}
Add in module two:
alias func = one.func;
Indeed, the two funcs
On Thursday, 24 March 2016 at 08:24:15 UTC, eastanon wrote:
On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole
wrote:
As a little fun thing to do I implemented it for you.
It won't allocate. Making this perfect for you.
With a bit of work you could make Result have buffers for
On 3/23/16 6:25 PM, Ali Çehreli wrote:
On 03/23/2016 02:31 PM, cy wrote:
> struct Someop(Type) {
>Type thing;
>void foo() {
> thing.bar();
>}
> }
>
> struct Foo {
>void bar() {
> import std.stdio: writeln;
> writeln("bar");
>}
> }
>
> struct Bar
On Thursday, 24 March 2016 at 13:55:31 UTC, Adam D. Ruppe wrote:
On Thursday, 24 March 2016 at 12:11:33 UTC, Marc Schütz wrote:
On Wednesday, 23 March 2016 at 20:54:20 UTC, Yuxuan Shui wrote:
module one;
void func(int a){}
/
module two;
import one;
void func(float a){}
On Thursday, 24 March 2016 at 13:38:32 UTC, Marc Schütz wrote:
Yes, it's read into your processes memory. You can use
std.mmfile [1] to make things a bit more efficient. It will,
too, read the data into memory, but it will do so in a way
(memory mapping) that only loads what is actually
On Thursday, 24 March 2016 at 15:07:09 UTC, Yuxuan Shui wrote:
Is there a way to do this automatically?
No. You have to decide to bring them together if you want them to
overload.
On Thursday, 24 March 2016 at 11:39:13 UTC, arturg wrote:
isnt alias this supposed to do this implicitly?
convert this
auto jsValue = JSONValue(new MyClass());
into this
auto jsValue = JSONValue((new MyClass())._data);
Good point, I did not catch that. That indeed should work and
seems to
On Thursday, 24 March 2016 at 16:03:13 UTC, Edwin van Leeuwen
wrote:
On Thursday, 24 March 2016 at 11:39:13 UTC, arturg wrote:
isnt alias this supposed to do this implicitly?
convert this
auto jsValue = JSONValue(new MyClass());
into this
auto jsValue = JSONValue((new MyClass())._data);
On Thursday, 24 March 2016 at 11:18:06 UTC, Nordlöw wrote:
Could somebody briefly outline how the thread-locality
(non-GC-locked) of allocators relates to the purity of the
containers using them?
This because I want to move forward with optimizations in my
knowledge graph that requires
On Thursday, 24 March 2016 at 17:24:38 UTC, data pulverizer wrote:
I have been playing with the matrix example given at the end of
chapter 78 of Ali Çehreli's fabulous book and am having
problems with overloading the opAssign operator.
rows is a private int[][] in a Matrix struct.
I have
On 03/24/2016 10:24 AM, data pulverizer wrote:
> I have been playing with the matrix example given at the end of chapter
> 78 of Ali Çehreli's
For reference, it's "Multi-dimensional operator overloading example" here:
http://ddili.org/ders/d.en/templates_more.html
>having problems with
I have been playing with the matrix example given at the end of
chapter 78 of Ali Çehreli's fabulous book and am having problems
with overloading the opAssign operator.
rows is a private int[][] in a Matrix struct.
I have added the following ...
Matrix opAssign(int[][] arr)
{
this.rows =
On Thursday, 24 March 2016 at 17:03:25 UTC, Andre wrote:
I hoped there is some operator overloading for implicit
conversion of my
class to JSONValue.
I solved the issue with an toJSON method and a generic
functionality which
checks for this method.
Kind regards
André
Vibe.d has some
On Wednesday, 23 March 2016 at 17:29:50 UTC, Jacob Carlborg wrote:
On 2016-03-23 18:15, Jesse Phillips wrote:
Do you have an example of this being done in any other
language?
In Erlang it's possible to hot swap code. I'm not sure how it
works though. But if we're talking servers, the
On Thursday, 24 March 2016 at 11:18:06 UTC, Nordlöw wrote:
Could somebody briefly outline how the thread-locality
(non-GC-locked) of allocators relates to the purity of the
containers using them?
This because I want to move forward with optimizations in my
knowledge graph that requires
On Thursday, 24 March 2016 at 18:46:43 UTC, Jesse Phillips wrote:
On Wednesday, 23 March 2016 at 17:29:50 UTC, Jacob Carlborg
wrote:
On 2016-03-23 18:15, Jesse Phillips wrote:
Do you have an example of this being done in any other
language?
In Erlang it's possible to hot swap code. I'm not
On Thursday, 24 March 2016 at 21:00:36 UTC, Web Biz Owner wrote:
Hi group,
I'm interested in developing some GUI programs in D on Windows.
Looked into the various D GUI toolkit options a bit, on the D
sites and by googling a bit. Thinking of using GtkD. So would
like to know whether people
Hi group,
I'm interested in developing some GUI programs in D on Windows.
Looked into the various D GUI toolkit options a bit, on the D
sites and by googling a bit. Thinking of using GtkD. So would
like to know whether people think it is a good option for GUI app
dev on Windows.
Note: I
On Thursday, 24 March 2016 at 12:17:35 UTC, Marc Schütz wrote:
On Wednesday, 23 March 2016 at 21:37:09 UTC, Lucien wrote:
When I remove the Thread.sleep, it doesn't find all adresses.
Why ?
Socket.select() will wait _at most_ 100 msecs. If a socket gets
ready before that timeout, it will
I prefer to post this thing here because it could that I'm doing
something wrong.
I'm using std.stdio -> readln() to read whatever I'm typing in
the console.
BUT, if the line contains some UTF-8 characters, the data
obtained is EMPTY and
module runnable;
import std.stdio;
import
On 03/24/2016 05:54 PM, Jonathan Villa wrote:
> I'm using WCHAR instead of CHAR
> with the hope to get less problems in the future.
Try char:
char[] readerBuffer;
> Also I tried stdin.flush()
flush() has no effect on input streams.
Ali
On Friday, 25 March 2016 at 01:03:06 UTC, Ali Çehreli wrote:
On 03/24/2016 05:54 PM, Jonathan Villa wrote:
Try char:
char[] readerBuffer;
flush() has no effect on input streams.
Ali
Thankf fot he quick reply.
Unfortunately it behaves exactly as before with wchar.
On Friday, 25 March 2016 at 01:03:06 UTC, Ali Çehreli wrote:
>
Try char:
char[] readerBuffer;
Ali
Also tried with dchar ... there's no changes.
On Thursday, 24 March 2016 at 06:54:25 UTC, Alex wrote:
Hi everybody,
doing some optimization on my code, I faced some strange
question:
how to save a iota result in a class member?
Say I have
class A
{
??? member;
auto testIter4()
{
return iota(0,5);
}
}
void main()
Hi,
I have a class which has already an alias this to a string array,
so I can use it in a foreach loop.
class MyClass
{
string[] _data;
alias _data this;
// ...
}
void main()
{
import std.json;
auto jsValue = JSONValue(new MyClass());
}
For some
On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole
wrote:
As a little fun thing to do I implemented it for you.
It won't allocate. Making this perfect for you.
With a bit of work you could make Result have buffers for
result instead of using the input array allow for the source to
On Thursday, 24 March 2016 at 08:15:12 UTC, Andre wrote:
Hi,
I have a class which has already an alias this to a string
array,
so I can use it in a foreach loop.
class MyClass
{
string[] _data;
alias _data this;
// ...
}
void main()
{
import std.json;
On 24/03/16 9:24 PM, eastanon wrote:
On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole wrote:
As a little fun thing to do I implemented it for you.
It won't allocate. Making this perfect for you.
With a bit of work you could make Result have buffers for result
instead of using the
On Thursday, 24 March 2016 at 08:13:27 UTC, Edwin van Leeuwen
wrote:
Yeah this is one of the downsides of voldermort types. In these
cases typeof and ReturnType are your friend. It often takes me
a couple of tries to get it right, but the following seems to
work:
import std.traits :
Hi everybody,
doing some optimization on my code, I faced some strange question:
how to save a iota result in a class member?
Say I have
class A
{
??? member;
auto testIter4()
{
return iota(0,5);
}
}
void main()
{
A a = new A();
a.member = testIter4();
}
how
As a comment on my own post:
I’m aware, that there are some different return types from
functions like iota. And I’m also aware, that there are much less
different range types. I can, maybe, define what kind of range
type I want to have, the question is, how to map all the
different function
As a little fun thing to do I implemented it for you.
It won't allocate. Making this perfect for you.
With a bit of work you could make Result have buffers for result instead
of using the input array allow for the source to be an input range itself.
I made this up on dpaste and single quotes
On Wednesday, 23 March 2016 at 19:07:34 UTC, cym13 wrote:
In Scala, 'take' consumes bytes from the iterator. So the same
code would be
buffer = range.take(N).toArray
Then just do that!
import std.range, std.array;
auto buffer = range.take(N).array;
auto example = iota(0, 200,
38 matches
Mail list logo