On 2015-07-23 00:22, nurfz wrote:
I think you got overly complicated answers.
I guess I'm confused as to why the D code isn't acting similar to the
Python code in the sense that you would expect "this" to reference the
"speed" property of the current instance and not statically reference
the pa
On 2015-07-23 03:57, Mike Parker wrote:
In your case, rd_kafka_metadata is the name of the struct, but in C
instances would need to be declared like so:
struct rd_kafka_metadata instance;
Since the struct is declared directly in the typedef, is the struct name
actually available?
--
/Jacob
I have some code.
//client.d
import std.stdio;
import std.socket;
import std.conv;
void main() {
Socket client = new TcpSocket(AddressFamily.INET);
autoaddr = new InternetAddress("localhost", 2021);
autoaddrServer = new InternetAddress("localhost",
2017);
On Wednesday, July 22, 2015 23:19:35 nurfz via Digitalmars-d-learn wrote:
> Hmm, is there a specific reason aside from the encapsulation
> violation? It seems needlessly complicated. If you have
> someone/something that has direct access to your source code,
> isn't a getter/setter the least of y
On Tuesday, 21 July 2015 at 05:53:26 UTC, yawniek wrote:
i tried to automagically create bindings for librdkafka
(https://github.com/edenhill/librdkafka)
with dstep.
now the code contains typedefs structs with the same name as
methods:
```
typedef struct rd_kafka_metadata {
int
On Thursday, 23 July 2015 at 01:39:05 UTC, Mike Parker wrote:
post at [1] where Rainer shared the relevant bits of a batch
Gah, hate it when I forget the links.
[1] http://forum.dlang.org/post/m456t5$2jc4$1...@digitalmars.com
On Wednesday, 22 July 2015 at 23:39:46 UTC, Jonathan M Davis
wrote:
On Wednesday, July 22, 2015 20:27:35 Taylor Hillegeist via
Digitalmars-d-learn wrote:
I have tried to build this and failed miserably. I have some
questions?
What make do you use? digital mars, gnu. what tools do you
need?
is
On Wednesday, 22 July 2015 at 20:27:37 UTC, Taylor Hillegeist
wrote:
I have tried to build this and failed miserably. I have some
questions?
What make do you use? digital mars, gnu. what tools do you
need? is it possible? I also failed to build zlib32coff.lib
make[2]: *** No rule to make targe
On Wednesday, July 22, 2015 20:27:35 Taylor Hillegeist via Digitalmars-d-learn
wrote:
> I have tried to build this and failed miserably. I have some
> questions?
> What make do you use? digital mars, gnu. what tools do you need?
> is it possible? I also failed to build zlib32coff.lib
>
> make[2]:
Hmm, is there a specific reason aside from the encapsulation
violation? It seems needlessly complicated. If you have
someone/something that has direct access to your source code,
isn't a getter/setter the least of your concerns? Does the
@property decorator incur a large runtime cost?
On Wednesday, July 22, 2015 22:22:00 nurfz via Digitalmars-d-learn wrote:
> How could I get this D code to work similar to this Python code?
>
> So, here is the D code:
>
> import std.stdio;
>
> class Vehicle {
> int speed;
> void printSpeed() {
> writeln(th
On Wednesday, 22 July 2015 at 22:22:02 UTC, nurfz wrote:
How could I get this D code to work similar to this Python code?
So, here is the D code:
import std.stdio;
class Vehicle {
int speed;
void printSpeed() {
writeln(this.speed);
}
}
class
How could I get this D code to work similar to this Python code?
So, here is the D code:
import std.stdio;
class Vehicle {
int speed;
void printSpeed() {
writeln(this.speed);
}
}
class Airplane: Vehicle {
int speed = 100;
}
i
I have tried to build this and failed miserably. I have some
questions?
What make do you use? digital mars, gnu. what tools do you need?
is it possible? I also failed to build zlib32coff.lib
make[2]: *** No rule to make target `zlib32mscoff.lib'. Stop.
I could say more but it probably wouldn'
On Wednesday, 22 July 2015 at 17:17:17 UTC, Frank Pagliughi wrote:
On Wednesday, 22 July 2015 at 09:04:49 UTC, Marc Schütz wrote:
But as long as the original pointer is still on the stack,
that one _will_ keep the object alive. It is only a problem if
all pointers to a GC managed object are s
On Wednesday, 22 July 2015 at 09:04:49 UTC, Marc Schütz wrote:
But as long as the original pointer is still on the stack, that
one _will_ keep the object alive. It is only a problem if all
pointers to a GC managed object are stored in places the GC
isn't informed about.
Sorry, I have gotten
On Wednesday, 22 July 2015 at 16:16:36 UTC, John Colvin wrote:
On Wednesday, 22 July 2015 at 15:51:23 UTC, Chris wrote:
On Wednesday, 22 July 2015 at 15:41:06 UTC, Alex Parrill wrote:
[...]
Thanks. I'm dealing with "nested" threads at the moment.
main
{
spawn(thread1)
{
// Does some
On Wednesday, 22 July 2015 at 15:51:23 UTC, Chris wrote:
On Wednesday, 22 July 2015 at 15:41:06 UTC, Alex Parrill wrote:
On Wednesday, 22 July 2015 at 14:28:48 UTC, Chris wrote:
What would be the best way to manage different threads
(spawned via std.concurrency), e.g. to tell them to stop at
o
On Wednesday, 22 July 2015 at 15:41:06 UTC, Alex Parrill wrote:
On Wednesday, 22 July 2015 at 14:28:48 UTC, Chris wrote:
What would be the best way to manage different threads
(spawned via std.concurrency), e.g. to tell them to stop at
once, once a new command comes in? A thread pool? How would
On Wednesday, 22 July 2015 at 14:28:48 UTC, Chris wrote:
What would be the best way to manage different threads (spawned
via std.concurrency), e.g. to tell them to stop at once, once a
new command comes in? A thread pool? How would that look like
in D? I feel my knowledge of D threads is still
On Wednesday, 22 July 2015 at 09:04:49 UTC, Marc Schütz wrote:
On Tuesday, 21 July 2015 at 21:50:35 UTC, rsw0x wrote:
On Tuesday, 21 July 2015 at 21:44:07 UTC, rsw0x wrote:
[...]
addendum:
http://dlang.org/garbage.html
[...]
[...]
I believe this implies that it would *not* keep the obj
What would be the best way to manage different threads (spawned
via std.concurrency), e.g. to tell them to stop at once, once a
new command comes in? A thread pool? How would that look like in
D? I feel my knowledge of D threads is still a bit limited.
On Wednesday, 22 July 2015 at 09:32:15 UTC, John Colvin wrote:
On Wednesday, 22 July 2015 at 09:23:36 UTC, Clayton wrote:
[...]
The normal way of doing this would be using
std.datetime.StopWatch:
StopWatch sw;
sw.start();
algorithm();
long exec_ms = sw.peek().msecs;
Much a
It seems that PATCH http method is missing from std.net.curl http
methods.
No way to use it?
On Wednesday, 22 July 2015 at 09:23:36 UTC, Clayton wrote:
How does one represent Duration in only Micro-seconds, or
milliseconds. Trying to measure the execution time of an
algorithm and I get "4 ms, 619 μs, and 8 hnsecs" , I want to
sum all these and get total hnsecs or μs .
I would also a
How does one represent Duration in only Micro-seconds, or
milliseconds. Trying to measure the execution time of an
algorithm and I get "4 ms, 619 μs, and 8 hnsecs" , I want to sum
all these and get total hnsecs or μs .
I would also appreciate advise on whether this is the best way
to measur
On Tuesday, 21 July 2015 at 21:50:35 UTC, rsw0x wrote:
On Tuesday, 21 July 2015 at 21:44:07 UTC, rsw0x wrote:
On Sunday, 19 July 2015 at 17:12:07 UTC, rsw0x wrote:
[...]
wow, I don't even remember posting this.
This is (mostly) wrong, but I'm unsure if a pointer to another
pointer on the st
27 matches
Mail list logo