On Thursday, 15 March 2018 at 00:10:28 UTC, Cecil Ward wrote:
On Thursday, 15 March 2018 at 00:06:49 UTC, Cecil Ward wrote:
Can anyone point me in the direction of a library that
provides very very lightweight (minimum overhead) asynchronous
i/o routines for - shopping list
[...]
Actually
On Thursday, March 15, 2018 02:06:23 Marc via Digitalmars-d-learn wrote:
> Can I make it work?
>
> >struct S
> >{
> >
> > int[] l;
> >
> >}
>
> then
>
> >auto s = S();
> >s.l ~= 1; // ok
> >s.l = []; // error
It's not possible to do anything like that, and it really doesn't make sense
when you
Can I make it work?
struct S
{
int[] l;
}
then
auto s = S();
s.l ~= 1; // ok
s.l = []; // error
On Thursday, 15 March 2018 at 00:06:49 UTC, Cecil Ward wrote:
Can anyone point me in the direction of a library that provides
very very lightweight (minimum overhead) asynchronous i/o
routines for - shopping list
[...]
Actually I realise that if I could simply write a wrapper pretty
On Wednesday, 14 March 2018 at 01:17:54 UTC, rikki cattermole
wrote:
You will still need DllMain, that is a platform requirement.
I am not sure about that because when DllAnalyser don't see it in
the opengl32.dll from the system32 directory. And the
documentation indicate that it is
Can anyone point me in the direction of a library that provides
very very lightweight (minimum overhead) asynchronous i/o
routines for - shopping list
1. sending and receiving IPv4 / IPv6 packets,
2. sending receiving ICMP and
3, handling incoming outgoing TCP connections and
4. handling SCTP
On 03/14/2018 11:23 PM, Cecil Ward wrote:
say in C I have a function with a pointer argument
foo( const sometype_t * p )
I have asked about this D nightmare before. Using the same pattern in D
or the in argument qualifier as far as I can see the value of the
pointer is then itself
On Wednesday, March 14, 2018 22:23:47 Cecil Ward via Digitalmars-d-learn
wrote:
> say in C I have a function with a pointer argument
> foo( const sometype_t * p )
>
> I have asked about this D nightmare before. Using the same
> pattern in D or the in argument qualifier as far as I can see
On 03/14/2018 11:13 PM, James Blachly wrote:
Suppose I have a struct (which is really a memory map of a data file I
am reading in) with too many data members to reasonably code
getters/setters for by hand. I wish to either retrieve individual
values or set individual values, which could be
say in C I have a function with a pointer argument
foo( const sometype_t * p )
I have asked about this D nightmare before. Using the same
pattern in D or the in argument qualifier as far as I can see the
value of the pointer is then itself effectively locked made
constant. Without
For context, please keep in mind I am coming from a python
background, but am very much enjoying strong typing, although it
is taking some significant adjustment.
Suppose I have a struct (which is really a memory map of a data
file I am reading in) with too many data members to reasonably
On Wednesday, 14 March 2018 at 15:17:54 UTC, Jonathan M Davis
wrote:
On Wednesday, March 14, 2018 13:36:51 Andre Pany via
Digitalmars-d-learn wrote:
[...]
Well, I think that you have two issues here:
1. Struct literals work in only a few, specific circumstances.
Why, I don't know, but IIRC,
On Wednesday, 14 March 2018 at 15:17:54 UTC, Jonathan M Davis
wrote:
On Wednesday, March 14, 2018 13:36:51 Andre Pany via
Digitalmars-d-learn wrote:
[...]
Well, I think that you have two issues here:
1. Struct literals work in only a few, specific circumstances.
Why, I don't know, but IIRC,
On Wednesday, 14 March 2018 at 14:44:24 UTC, Marc wrote:
assume the files:
app.d
void main() {
import myModule : foo;
writeln(foo(...));
}
myModule.d
module myModule;
int foo(int n) { }
the following fail:
dmd -run app.d mymodule.d
give error like this:
Error: module
On Wednesday, March 14, 2018 13:36:51 Andre Pany via Digitalmars-d-learn
wrote:
> Hi,
>
> I do not understand why struct initializer works for arrays but
> not for
> associative arrays:
>
> struct Bar
> {
> string s;
> }
>
> struct Foo
> {
> Bar[string] asso;
> Bar[] arr;
> }
>
>
On Wednesday, 14 March 2018 at 13:36:51 UTC, Andre Pany wrote:
Hi,
I do not understand why struct initializer works for arrays but
not for
associative arrays:
struct Bar
{
string s;
}
struct Foo
{
Bar[string] asso;
Bar[] arr;
}
void main()
{
Foo foo = {
arr: [{s:
On Wednesday, March 14, 2018 07:11:49 Nathan S. via Digitalmars-d-learn
wrote:
> On Tuesday, 13 March 2018 at 22:33:56 UTC, Jonathan M Davis wrote:
> > And you can't get rid of it, because the object can still be
> > moved, which would invalidate the pointer that you have
> > referring to the
On Wednesday, 14 March 2018 at 14:44:24 UTC, Marc wrote:
Why does -run fail here? I thought it was a shorthand to this
batch:
Check the help text:
$ dmd -h
dmd [...] -run [...]
Argument to pass when running the resulting
program
Notice that there's only one file there.
assume the files:
app.d
void main() {
import myModule : foo;
writeln(foo(...));
}
myModule.d
module myModule;
int foo(int n) { }
the following fail:
dmd -run app.d mymodule.d
give error like this:
Error: module `myModule` is in file 'myModule.d' which cannot
be read
Hi,
I do not understand why struct initializer works for arrays but
not for
associative arrays:
struct Bar
{
string s;
}
struct Foo
{
Bar[string] asso;
Bar[] arr;
}
void main()
{
Foo foo = {
arr: [{s: "123"}],
asso: ["0": {s: "123"}] // does not work
};
}
On Wednesday, 14 March 2018 at 04:30:17 UTC, Amorphorious wrote:
On Wednesday, 14 March 2018 at 01:41:33 UTC, psychoticRabbit
wrote:
On Tuesday, 13 March 2018 at 21:38:59 UTC, Amorphorious wrote:
You are a moron...etc..etc..etc..etc.
See. This is what happens when you have
On Wednesday, 14 March 2018 at 10:22:45 UTC, Alex wrote:
Is there a simple workaround, maybe?
ok, the workaround would be to enumerate the member and to use
the former notation.
Hi all,
given this:
´´´
import std.range;
size_t[] arr;
struct S
{
RefRange!(size_t[]) member;
}
void fun(ref size_t numByRef){}
void main()
{
arr.length = 42;
S s;
s.member = refRange();
static assert(__traits(compiles, fun(s.member[0])));
On Tuesday, 13 March 2018 at 22:33:56 UTC, Jonathan M Davis wrote:
And you can't get rid of it, because the object can still be
moved, which would invalidate the pointer that you have
referring to the static array.
...
https://issues.dlang.org/show_bug.cgi?id=17448
Thanks for the info.
24 matches
Mail list logo