== Quote from Denis Koroskin (2kor...@gmail.com)'s article
On Tue, 01 Mar 2011 02:08:48 +0300, Tyro[a.c.edwards]
nos...@home.com
wrote:
== Quote from Denis Koroskin (2kor...@gmail.com)'s article
On Mon, 28 Feb 2011 19:35:47 +0300, Tyro[a.c.edwards]
nos...@home.com
wrote:
On 2/28/2011
On 3/1/2011 12:25 AM, Tyro[a.c.edwards] wrote:
Nevertheless, execution haults
at the very next line following/catch and Create() never returns.
CreateWindow sends a few messages to your window proc; anything
interesting happening there?
On 03/01/2011 07:58 AM, Peter Lundgren wrote:
I'm trying to use mixins to generate an array of numbers that are coprime to a
statically known value. I've tried the following, but I receive the error:
Error: to(i) ~ , cannot be interpreted at compile time
string makePossibleAValues(string
Greetings
I have a doubt about synchronized code blocks.
I learnt that in Java the synchronized keyword has two fold effect.
Firstly it locks the code to make sure that only a single thread gets
access to the code block at a given time. Secondly, it makes sure that
the data elements accessed
On 27.02.2011 13:41, Jacob Carlborg wrote:
On 2011-02-26 19:49, Dmitry Olshansky wrote:
On 26.02.2011 19:52, Jacob Carlborg wrote:
On 2011-02-26 12:29, Dmitry Olshansky wrote:
On 26.02.2011 14:10, Jacob Carlborg wrote:
I'm trying to use the std.regex module but when I run my
application I
On 2011-03-01 14:03, Dmitry Olshansky wrote:
On 28.02.2011 22:37, Jacob Carlborg wrote:
The following code will result in an AssertError or RangeError when run.
import std.regex;
import std.stdio;
void main ()
{
auto m = abc.match(`a(\w)b`);
writeln(m.hit); // AssertError in regex.d:1795
On 2011-03-01 16:54, Dmitry Olshansky wrote:
On 27.02.2011 13:41, Jacob Carlborg wrote:
On 2011-02-26 19:49, Dmitry Olshansky wrote:
On 26.02.2011 19:52, Jacob Carlborg wrote:
On 2011-02-26 12:29, Dmitry Olshansky wrote:
On 26.02.2011 14:10, Jacob Carlborg wrote:
I'm trying to use the
On Tuesday 01 March 2011 06:40:31 d coder wrote:
Greetings
I have a doubt about synchronized code blocks.
I learnt that in Java the synchronized keyword has two fold effect.
Firstly it locks the code to make sure that only a single thread gets
access to the code block at a given time.
I'm afraid that I have no idea what would be stale about a shared
variable.
sychronized uses a mutex, and if you want to avoid race conditions, you
need to
use mutexes or something similar when dealing with shared variables. But I
don't
know what would be stale about a variable.
One thread
Hello,
It seems to be the kind of stupid issue that will make you laugh about me. But
I cannot grasp and want to move forward anyway; so, let us be bold and take the
risk ;-)
I'm modeling a little dynamic language. Elements (values, objects) are pointers
to structs (actually tagged unions)
On 02/28/2011 07:39 PM, Tom wrote:
foo([[1,2],[3,4],[5,6]]); // ERROR [1]
bar([[1,2],[3,4],[5,6]]); // OK
foo!int([[1,2],[3,4],[5,6]]); // OK
...
void foo(T)(T[2][] t) {
writeln(typeid(t));
}
void bar(T)(T[][] t) {
writeln(typeid(t));
}
On 03/01/2011 04:30 AM, bearophile wrote:
That worked, thanks. This is interesting because the example used in The D
Programming Language on page 83 gets away with it just fine. I had no problem
running this:
result ~= to!string(bitsSet(b)) ~ , ;
On 28.02.2011 20:24, Denis Koroskin wrote:
On Mon, 28 Feb 2011 22:04:44 +0300, simendsjo
simen.end...@pandavre.com wrote:
On 28.02.2011 18:52, simendsjo wrote:
// ERROR
auto res = mysql_library_init(0, null, null);
auto cn = mysql_init(null);
auto oldcn = cn;
writeln(mysql_errno(cn));
Do you know why DMD doesn't give a compilation error here?
import core.stdc.stdio: sscanf;
immutable int value = 5;
void main() {
sscanf(10.ptr, %d.ptr, value);
}
Bye,
bearophile
spir:
It seems to be the kind of stupid issue that will make you laugh about me.
But
I cannot grasp and want to move forward anyway; so, let us be bold and take
the
risk ;-)
Be bold. Understanding things is much more important. I've being wrong hundreds
of times on D newsgroups, but
On 01/03/2011 16:59, d coder wrote:
I'm afraid that I have no idea what would be stale about a shared
variable.
sychronized uses a mutex, and if you want to avoid race conditions,
you need to
use mutexes or something similar when dealing with shared variables.
But I don't
know what
This seems to work:
import core.stdc.stdio: printf;
struct Foo {
bool b;
this(bool b_) { this.b = b_; }
}
const(Foo)* TRUE, FALSE;
static this() {
TRUE = new const(Foo)(true);
FALSE = new const(Foo)(false);
}
const(Foo)* not(const(Foo)* op) {
return (op == TRUE) ? FALSE :
On 01/03/2011 22:52, Spacen Jasset wrote:
On 01/03/2011 16:59, d coder wrote:
I'm afraid that I have no idea what would be stale about a shared
variable.
sychronized uses a mutex, and if you want to avoid race conditions,
you need to
use mutexes or something similar when dealing with shared
I am running the dmd2 compiler on my Win7 64 bit machine and everything
appears to work except the -cov switch. i cannot seem to generate a .lst file.
any ideas?
thanks
dan mcleran
never mind, i got it. i had to pass the switches:
-D -unittest -cov
life is hard. it's even harder when you're dumb.
On 3/1/11 3:00 PM, bearophile wrote:
const(Foo)* TRUE, FALSE;
I'd remove those parens; you don't want people modifying TRUE or FALSE.
Bekenn:
I'd remove those parens; you don't want people modifying TRUE or FALSE.
Please, show me working code that implements your idea :-)
Bye,
bearophile
On 3/1/11 4:12 PM, bearophile wrote:
Bekenn:
I'd remove those parens; you don't want people modifying TRUE or FALSE.
Please, show me working code that implements your idea :-)
Touche. I'll have to test that out once I get back from work...
On 3/1/11 5:31 PM, bearophile wrote:
Bekenn:
Touche. I'll have to test that out once I get back from work...
Sorry for that answer of mine, we are here to learn and cooperate, not to fight
:-) It's just I sometimes have problems with const things in D, and sometimes
DMD has problems with
On 3/1/2011 4:12 PM, bearophile wrote:
Bekenn:
I'd remove those parens; you don't want people modifying TRUE or FALSE.
Please, show me working code that implements your idea :-)
Bye,
bearophile
Here you go; I only changed the one line. Compiles and works just fine
in dmd 2.051.
On Tuesday 01 March 2011 23:43:27 Jonathan M Davis wrote:
On Tuesday 01 March 2011 22:18:49 Bekenn wrote:
Code:
class MyException : Exception
{
this(string message, string file, size_t line, Throwable next =
null)
{
On 2011-03-02 08:47, Jonathan M Davis wrote:
On Tuesday 01 March 2011 23:43:27 Jonathan M Davis wrote:
On Tuesday 01 March 2011 22:18:49 Bekenn wrote:
Code:
class MyException : Exception
{
this(string message, string file, size_t line, Throwable next =
27 matches
Mail list logo