On 03/27/2013 02:38 PM, Tim wrote:
> are there any information/examples about message passing?
The following chapter is about the std.concurrency module of Phobos:
http://ddili.org/ders/d.en/concurrency.html
Some of the examples in there send a special 'struct Exit' message to
tell the work
On Wednesday, 27 March 2013 at 20:16:39 UTC, Martin Drašar wrote:
Dne 27.3.2013 18:51, Tim napsal(a):
That works as expected, except the fact that pressing CTRL+C
which stops
the while(!stopServer) doesn't terminate the mainloop in my
Connection-class (run()-method). This thread is blocked
bec
I'm surprised that this is ignored and no one seems to be
interested in a possible solution.
Is it me? Or are my efforts a complete mischief?
Dne 27.3.2013 18:51, Tim napsal(a):
That works as expected, except the fact that pressing CTRL+C which stops
the while(!stopServer) doesn't terminate the mainloop in my
Connection-class (run()-method). This thread is blocked because of the
receive()-method... but how can I force this thread to ex
Have each thread select() on the read end of a pipe that the main thread writes
to when it wants to trigger a wakeup--write() is legal even in signal handlers.
On Mar 26, 2013, at 11:37 AM, Benjamin Thaut wrote:
> Am 25.03.2013 23:49, schrieb Sean Kelly:
>> On Mar 22, 2013, at 2:58 AM, Benjamin Thaut wrote:
>>
>>> So I want to install my own assertHandler. The problem is, that even if I
>>> call "setAssetHandler" in a shared module constructor, and t
Hi guys,
I'm doing the following:
class Connection : Thread {
private Socket pSocket;
void run() {
ptrdiff_t received;
ubyte[0x10] buffer;
mainloop:
while(true) {
received = pSocket.receive(b
On Wednesday, 27 March 2013 at 12:03:59 UTC, bearophile wrote:
SaltySugar:
How to get a piece of text from the Internet page with D code?
By lines:
http://rosettacode.org/wiki/Web_scraping#D
Whole:
http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity#D
Bye,
bearophile
Tha
On 2013-03-26 16:34, Dan wrote:
Hi -
I get some errors from this simple code:
class Class_a {
double[2][2] ob;
}
class Class_b : Class_a { int obb;}
Serializer.register!(Class_b);
The error is:
Error: variable
orange.serialization.Serializer.Serializer.serializeArray!(inout(double[2LU][2LU
Jos van Uden:
Output on my system:
C:\test
Rosetta
Enjoy
Code
C:\test
Code
Enjoy
Rosetta
Thank you for your test, I will replace the Rosettacode one with
the nicer version.
I don't know why the second doesn't work correctly on my system,
while the first works.
Bye,
bearophile
On 27-3-2013 15:17, Jos van Uden wrote:
On 27-3-2013 0:20, bearophile wrote:
This task has just a Tango entry:
http://rosettacode.org/wiki/Concurrent_computing
So I am writing a Phobos version. This seems to work as requested:
import std.stdio, std.random, std.parallelism, core.thread, core.
On 27-3-2013 0:20, bearophile wrote:
This task has just a Tango entry:
http://rosettacode.org/wiki/Concurrent_computing
So I am writing a Phobos version. This seems to work as requested:
import std.stdio, std.random, std.parallelism, core.thread, core.time;
void main() {
foreach (m; ["E
So I changed it into 'ref&'.
Quick example:
[code]
void bar1(ref& A a) { } // OK
void bar2(ref &A a) { } // OK
void bar21(&A a) { } // Error: '&' can only be used in
combination with 'ref'.
void bar22(& A a) { } // Error: '&' can only be used in
combination with 'ref'.
void bar3(ref const& A
SaltySugar:
How to get a piece of text from the Internet page with D code?
By lines:
http://rosettacode.org/wiki/Web_scraping#D
Whole:
http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity#D
Bye,
bearophile
I'd like to get a definite answer to whether the following code
is valid or not:
struct S
{
int v = 42;
this(int val) { v = val + 1; }
enum s = S(4);
}
void main()
{
static assert(S.s.v == 5);
}
There's a bug report about it:
http://d.puremagic.com/issues/show_bug.cgi?id=9397
On Wednesday, 27 March 2013 at 10:43:44 UTC, SaltySugar wrote:
How to get a piece of text from the Internet page with D code?
Something like this:
http://dlang.org/phobos/std_net_curl.html#get
?
27.03.2013 17:43, SaltySugar пишет:
How to get a piece of text from the Internet page with D code?
Its totally depends on context you are workin. For example you can use D
as script and by means of wget to get the whole page and then parse it
with sed. Also you can use curl and use D as program
How to get a piece of text from the Internet page with D code?
On Wednesday, 27 March 2013 at 09:10:35 UTC, Minas Mina wrote:
auto in?
in ref?
in ref was suggested by Kenji and rejected by Jonathan.
What should auto in mean? auto const scope?
I have to say that I like ref&, it's the best of two worlds. :)
We need a clear statement so someone can finally b
auto in?
in ref?
On Tuesday, 26 March 2013 at 19:35:51 UTC, Jacob Carlborg wrote:
I'll take a look. Which compiler and version are you using?
DMD64 D Compiler v2.062
ubuntu 64 bit
thanks!
On 2013-03-27 08:17, Jacob Carlborg wrote:
There's core.demangle, but that won't give you an AST and it will
probably fail in some cases. I would try and modify core.demangle to
produce an AST instead of a string. Perhaps this old project has
something useful:
http://flectioned.kuehne.cn/
I a
On 2013-03-26 22:17, Timothee Cour wrote:
demangle D15bootstrap_utils4util15replace_macros2FKHAyaAyaAyaZAya
immutable(char)[] bootstrap_utils.util.replace_macros2(ref
immutable(char)[][immutable(char)[]], immutable(char)[])
I want to obtain function name, arguments, etc (eg AST as json output
23 matches
Mail list logo