I have a program with one thread waiting on Socket.select call and another
thread doing stuff causing GC to kick in. When this happens, Socket.select
fails with Interrupted system call. I found referenced to some old
discussion and bug, but it seems to be long gone (I output SA_RESTART in my
On Saturday, 3 August 2013 at 05:24:11 UTC, Andre Artus wrote:
On Saturday, 3 August 2013 at 04:38:13 UTC, Andre Artus wrote:
Hello D-world!
My name is Andre Artus, and I'm a programmer from
Johannesburg, South Africa.
I'm relatively new to D, but so far quite impressed by it. I
have been
On Saturday, 3 August 2013 at 06:51:40 UTC, evilrat wrote:
On Saturday, 3 August 2013 at 05:24:11 UTC, Andre Artus wrote:
On Saturday, 3 August 2013 at 04:38:13 UTC, Andre Artus wrote:
Hello D-world!
My name is Andre Artus, and I'm a programmer from
Johannesburg, South Africa.
I'm
On Saturday, 3 August 2013 at 09:02:32 UTC, Andre Artus wrote:
On Saturday, 3 August 2013 at 06:51:40 UTC, evilrat wrote:
On Saturday, 3 August 2013 at 05:24:11 UTC, Andre Artus wrote:
On Saturday, 3 August 2013 at 04:38:13 UTC, Andre Artus wrote:
Hello D-world!
My name is Andre Artus, and
The D Programming Language is kind of old and out of date for
the current version of D. There aren't many books for D so you
have not much choice.
Attributes can be declared with 3 different syntaxes. For
example one could write:
//--1--
/*Explicitly state attribute before every declaration*/
On Friday, 2 August 2013 at 17:03:44 UTC, Justin Whear wrote:
On Fri, 02 Aug 2013 18:59:12 +0200, Jonathan A Dunlap wrote:
The example:
http://www.drdobbs.com/architecture-and-design/component-programming-in-
d/240008321?pgno=4
import std.stdio;
import std.array;
import std.algorithm;
On Saturday, 3 August 2013 at 09:24:25 UTC, Bosak wrote:
The D Programming Language is kind of old and out of date for
the current version of D. There aren't many books for D so you
have not much choice.
Attributes can be declared with 3 different syntaxes. For
example one could write:
//--1--
Am 03.08.2013 08:38, schrieb Marek Janukowicz:
void main ()
{
writefln( sa: %d, SA_RESTART );
(new Thread (serverfunc)).start();
(new Thread (clientfunc)).start();
}
i have no idea to your main problem but firing threads without any join
on the threads in your main program seems very
Hello D world, I have just started using templates and mixins to
generate some boilerplate code and I have found a little
ambiguity:
This code compiles fine:
private template genTypes()
{
string eval() { ... }
const(char[]) genTypes = eval();
}
mixin(genTypes!()); // Working
dennis luehring wrote:
Am 03.08.2013 08:38, schrieb Marek Janukowicz:
void main ()
{
writefln( sa: %d, SA_RESTART );
(new Thread (serverfunc)).start();
(new Thread (clientfunc)).start();
}
i have no idea to your main problem but firing threads without any join
on the threads
andrea9940:
( complete code at http://pastebin.com/FhmrgmZZ )
Simpler code:
import std.stdio;
import std.typecons;
private immutable extensionTable = [
[WGL_ARB_make_current_read,
void function(int, int, int),
wglMakeContextCurrentARB,
void function(),
On Saturday, 3 August 2013 at 11:27:30 UTC, andrea9940 wrote:
Hello D world, I have just started using templates and mixins
to generate some boilerplate code and I have found a little
ambiguity:
This code compiles fine:
private template genTypes()
{
string eval() { ... }
Thanks to both of you !
Am 03.08.2013 13:35, schrieb Marek Janukowicz:
dennis luehring wrote:
Am 03.08.2013 08:38, schrieb Marek Janukowicz:
void main ()
{
writefln( sa: %d, SA_RESTART );
(new Thread (serverfunc)).start();
(new Thread (clientfunc)).start();
}
i have no idea to your main problem but firing
On Saturday, 3 August 2013 at 13:19:53 UTC, dennis luehring wrote:
but you should not reduce your sample down to maybe-incorrect
(what it seems for me in this case) - the join wouldn't make
your sample to big
The example given is correct, as druntime guarantees that
non-daemon threads will
There has to be a better way?!?!?!?!
void F1(...)
{
}
void F2(...)
{
//HOW TO pass F1(..) the args we were called with ?
}
On Saturday, 3 August 2013 at 14:04:10 UTC, JS wrote:
There has to be a better way?!?!?!?!
Of course, I mean string mixin's using template.. and the
statement was to ask people how they went about it...
Gabi:
//HOW TO pass F1(..) the args we were called with ?
import std.stdio;
void f1(Args...)(Args args) {
foreach (arg; args)
arg.writeln;
}
void f2(Args...)(Args args) {
f1(args);
}
void main() {
f2(10, hello, 1.5);
}
Bye,
bearophile
On 08/03/2013 07:58 AM, bearophile wrote:
Gabi:
//HOW TO pass F1(..) the args we were called with ?
import std.stdio;
void f1(Args...)(Args args) {
foreach (arg; args)
arg.writeln;
Would you expect the following two lines behave the same?
writeln(args);
On Saturday, 3 August 2013 at 14:35:52 UTC, JS wrote:
On Saturday, 3 August 2013 at 14:04:10 UTC, JS wrote:
There has to be a better way?!?!?!?!
Of course, I mean string mixin's using template.. and the
statement was to ask people how they went about it...
I usually write unittests that
David Nadlinger wrote:
but you should not reduce your sample down to maybe-incorrect
(what it seems for me in this case) - the join wouldn't make
your sample to big
The example given is correct, as druntime guarantees that
non-daemon threads will run to completion before the program
On Saturday, 3 August 2013 at 15:10:20 UTC, Ali Çehreli wrote:
On 08/03/2013 07:58 AM, bearophile wrote:
Gabi:
//HOW TO pass F1(..) the args we were called with ?
import std.stdio;
void f1(Args...)(Args args) {
foreach (arg; args)
arg.writeln;
Would you expect the
monarch_dodra:
writefln(%s, 10, hello, 1.5);
= 10
According to a recent discussion with Andrei, that's (thankfully)
going to become a run-time exception:
http://d.puremagic.com/issues/show_bug.cgi?id=4927
Bye,
bearophile
On Saturday, 3 August 2013 at 14:58:49 UTC, bearophile wrote:
Gabi:
//HOW TO pass F1(..) the args we were called with ?
import std.stdio;
void f1(Args...)(Args args) {
foreach (arg; args)
arg.writeln;
}
void f2(Args...)(Args args) {
f1(args);
}
void main() {
f2(10,
What's the way to determine the version of the compiler being used to
compile a program?
I'm trying to make code compile with 2.063, that currently only works in
git HEAD because of an improvement in Phobos. I'd like to be able to
somehow version() the compatibility code out in versions later
On Sat, Aug 03, 2013 at 11:09:08AM -0700, H. S. Teoh wrote:
What's the way to determine the version of the compiler being used to
compile a program?
I'm trying to make code compile with 2.063, that currently only works in
git HEAD because of an improvement in Phobos. I'd like to be able to
On Friday, 2 August 2013 at 22:13:28 UTC, Jonathan M Davis wrote:
I'd probably use std.mmfile and std.bitmanip to do it. MmFile
will allow you to
efficiently operate on the file as a ubyte[] in memory thanks
to mmap, and
std.bitmanip's peek and read functions make it easy to convert
multiple
On Saturday, 3 August 2013 at 18:14:47 UTC, Gary Willoughby wrote:
This sounds a great idea but once the file has been opened as a
MmFile how to i convert this to a ubyte[] so the std.bitmanip
functions work with it?
I'm currently doing this:
auto file = new MmFile(file.dat);
On Saturday, 3 August 2013 at 16:57:41 UTC, Gabi wrote:
On Saturday, 3 August 2013 at 14:58:49 UTC, bearophile wrote:
Gabi:
//HOW TO pass F1(..) the args we were called with ?
import std.stdio;
void f1(Args...)(Args args) {
foreach (arg; args)
arg.writeln;
}
void
On Saturday, August 03, 2013 20:23:55 Gary Willoughby wrote:
On Saturday, 3 August 2013 at 18:14:47 UTC, Gary Willoughby wrote:
This sounds a great idea but once the file has been opened as a
MmFile how to i convert this to a ubyte[] so the std.bitmanip
functions work with it?
I'm
On Saturday, 3 August 2013 at 18:48:17 UTC, monarch_dodra wrote:
On Saturday, 3 August 2013 at 16:57:41 UTC, Gabi wrote:
On Saturday, 3 August 2013 at 14:58:49 UTC, bearophile wrote:
Gabi:
//HOW TO pass F1(..) the args we were called with ?
import std.stdio;
void f1(Args...)(Args args) {
monarch_dodra:
My guess though, is that it's the same syntax as in C? Use a
straight up elispis:
void foo(...).
Note that you *can't* extract the types from the vararg unless
you *guess* them from an alternative source (for example, fmt
in the printf function)
Also, importing core.vararg
On Saturday, 3 August 2013 at 19:12:40 UTC, bearophile wrote:
monarch_dodra:
My guess though, is that it's the same syntax as in C? Use a
straight up elispis:
void foo(...).
Note that you *can't* extract the types from the vararg unless
you *guess* them from an alternative source (for
On Saturday, 3 August 2013 at 15:59:30 UTC, Marek Janukowicz
wrote:
It's really nice to have some chat about the correctness of
example code
snippets, but can anyone help me with the original issue? :)
Sorry, apparently I forgot to include the actual content:. ;)
Socket.select is an ancient
On Saturday, 3 August 2013 at 18:23:58 UTC, Gary Willoughby wrote:
On Saturday, 3 August 2013 at 18:14:47 UTC, Gary Willoughby
wrote:
This sounds a great idea but once the file has been opened as
a MmFile how to i convert this to a ubyte[] so the
std.bitmanip functions work with it?
I'm
On Saturday, August 03, 2013 23:10:12 John Colvin wrote:
On Saturday, 3 August 2013 at 18:23:58 UTC, Gary Willoughby wrote:
On Saturday, 3 August 2013 at 18:14:47 UTC, Gary Willoughby
wrote:
This sounds a great idea but once the file has been opened as
a MmFile how to i convert this to
On Friday, 2 August 2013 at 23:51:27 UTC, H. S. Teoh wrote:
On Fri, Aug 02, 2013 at 06:38:20PM -0500, captaindet wrote:
[...]
FWIW
i have to deal with big data files that can be a few GB. for
some data
analysis software i wrote in C a while back i did some testing
with
caching and such. turns
On Sat, Aug 03, 2013 at 02:25:23PM -0700, Jonathan M Davis wrote:
On Saturday, August 03, 2013 23:10:12 John Colvin wrote:
On Saturday, 3 August 2013 at 18:23:58 UTC, Gary Willoughby wrote:
On Saturday, 3 August 2013 at 18:14:47 UTC, Gary Willoughby
wrote:
This sounds a great idea
On Sat, Aug 03, 2013 at 11:29:01PM +0200, monarch_dodra wrote:
On Friday, 2 August 2013 at 23:51:27 UTC, H. S. Teoh wrote:
On Fri, Aug 02, 2013 at 06:38:20PM -0500, captaindet wrote:
[...]
FWIW
i have to deal with big data files that can be a few GB. for some
data analysis software i wrote
I need a Lua 5.2.2 wrapper, So I started working on one..
I am new to D so probably there is a lot of room for
improvements..
Any feedback is welcome..
import std.stdio:writeln, writefln;
import std.exception:enforce;
import std.conv;
import std.string;
alias void lua_State;
alias long
On Saturday, August 03, 2013 14:31:16 H. S. Teoh wrote:
On Sat, Aug 03, 2013 at 02:25:23PM -0700, Jonathan M Davis wrote:
On Saturday, August 03, 2013 23:10:12 John Colvin wrote:
On Saturday, 3 August 2013 at 18:23:58 UTC, Gary Willoughby wrote:
On Saturday, 3 August 2013 at 18:14:47
On Saturday, 3 August 2013 at 22:17:32 UTC, Gabi wrote:
I need a Lua 5.2.2 wrapper, So I started working on one..
I am new to D so probably there is a lot of room for
improvements..
Any feedback is welcome..
import std.stdio:writeln, writefln;
import std.exception:enforce;
import std.conv;
43 matches
Mail list logo