On Thursday, 28 July 2016 at 21:49:00 UTC, pineapple wrote:
On Thursday, 28 July 2016 at 20:28:39 UTC, jdfgjdf wrote:
"Parameters!dgref.init" does not yield a reference. The real
error is not displayed. In a normal context it would be "stuff
is not callable with"
What would be a better
On Thursday, 28 July 2016 at 20:28:39 UTC, jdfgjdf wrote:
"Parameters!dgref.init" does not yield a reference. The real
error is not displayed. In a normal context it would be "stuff
is not callable with"
What would be a better way to check whether some callable can be
called using a
On Thursday, 28 July 2016 at 21:49:00 UTC, pineapple wrote:
On Thursday, 28 July 2016 at 20:28:39 UTC, jdfgjdf wrote:
"Parameters!dgref.init" does not yield a reference. The real
error is not displayed. In a normal context it would be "stuff
is not callable with"
What would be a better
On Thursday, 28 July 2016 at 15:48:58 UTC, Seb wrote:
We call them DIP (D Improvement Proposals) and I think it's a
lot more productive way to discuss improvements than in the
forum.
Eh. I hoped that somewhere in that explosion of discussion on the
topic the problem had been solved and I had
On Thursday, 28 July 2016 at 19:19:06 UTC, pineapple wrote:
Why doesn't this code do what I'd expect it to, and how can I
fix it?
unittest{
import std.traits : Parameters;
// Works as expected
alias dg = int delegate(int value);
enum bool dgcallable =
On Saturday, 23 July 2016 at 12:27:24 UTC, ParticlePeter wrote:
Is there any kind of project or workflow that converts D
(subset) to C/CPP ?
Just FYI there is a project that does the reverse.
Calypso creates a bridge between DMD/LDC and Clang, both at the
AST level (DMD <=> Clang's AST,
On 28.07.2016 21:45, Ali Çehreli wrote:
On 07/27/2016 04:51 AM, drug wrote:
> cfoo.copy(foo); // fails to compile because phobos in case of array uses
> // array specialization and this specialization fails
> // see
>
Why doesn't this code do what I'd expect it to, and how can I fix
it?
unittest{
import std.traits : Parameters;
// Works as expected
alias dg = int delegate(int value);
enum bool dgcallable =
is(typeof((){dg(Parameters!dg.init);}));
pragma(msg,
On 07/27/2016 04:51 AM, drug wrote:
> cfoo.copy(foo); // fails to compile because phobos in case of array uses
> // array specialization and this specialization fails
> // see
>
https://github.com/dlang/phobos/blob/v2.071.1/std/algorithm/mutation.d#L333
Thanks
On Monday, 25 July 2016 at 07:53:17 UTC, Stefan Koch wrote:
On Saturday, 23 July 2016 at 12:27:24 UTC, ParticlePeter wrote:
Is there any kind of project or workflow that converts D
(subset) to C/CPP ?
The short answer is no, not for any recent version of D.
The long answer is it's kind of
On Thursday, 28 July 2016 at 15:24:22 UTC, Dechcaudron wrote:
Also, I'm assuming what I said about calling destroy(instance)
is as correct as calling a cleanup method?
Class destructor also automatically calls destructors of struct
members of the class.
On Thursday, 28 July 2016 at 15:24:22 UTC, Dechcaudron wrote:
On Thursday, 28 July 2016 at 15:18:24 UTC, Lodovico Giaretta
wrote:
3) at program end, live objects are not scheduled for
finalization;
4) at program end, pending finalizations from previous
collections may not be run.
I didn't
On Thursday, 28 July 2016 at 09:10:33 UTC, Kagamin wrote:
Create an RFE? Given that regex returns results as slices of
the input string, using the replacement character doesn't
introduce data corruption.
We call them DIP (D Improvement Proposals) and I think it's a lot
more productive way to
On Thursday, 28 July 2016 at 15:02:58 UTC, Dechcaudron wrote:
On Thursday, 28 July 2016 at 14:43:32 UTC, Lodovico Giaretta
wrote:
No! Never run important finalization in a class destructor!
The GC is not obliged to run the destructors, so you may end
up with your objects destroyed but the
On Thursday, 28 July 2016 at 15:18:24 UTC, Lodovico Giaretta
wrote:
3) at program end, live objects are not scheduled for
finalization;
4) at program end, pending finalizations from previous
collections may not be run.
I didn't know these two, can I get source on them?
Also, I'm assuming
On Wednesday, 27 July 2016 at 10:41:54 UTC, ketmar wrote:
On Wednesday, 27 July 2016 at 10:39:52 UTC, NX wrote:
Lack of production quality tools
like? no, "refactoring" and other crap is not "production
quality tools", they are only useful to pretend that you are
doing something useful, so
On Thursday, 28 July 2016 at 14:24:16 UTC, Suliman wrote:
void dbInsert(string login, string uploading_date, string
geometry_type, string data)
{
Statement stmt = conn.createStatement();
//stmt.executeUpdate("...");
// some processing of
On Thursday, 28 July 2016 at 14:43:32 UTC, Lodovico Giaretta
wrote:
No! Never run important finalization in a class destructor! The
GC is not obliged to run the destructors, so you may end up
with your objects destroyed but the connections still open. For
this kind of important things, you
On Thursday, 28 July 2016 at 14:33:26 UTC, Dechcaudron wrote:
On Thursday, 28 July 2016 at 14:01:45 UTC, Suliman wrote:
2. Should I call destructor and how it's should like?
You certainly want to close the connection to the db.
Basically, the destructor is intended to free resources such as
I don't know anything about the driver you are using, but from my
general experience with DBs I'll try to give you some insight.
On Thursday, 28 July 2016 at 14:01:45 UTC, Suliman wrote:
1. Should declaration of them be field of class?
I'd say so. If you intend to use each instance of the
class GDB
{
Config config;
MySQLDriver driver;
DataSource ds;
Connection conn;
this(Config config)
{
this.config = config;
driver = new MySQLDriver();
string[string] params;
string url =
I have for next queston.
For example I have class for working with DB (I am using ddbc
driver). I put some variables as class fields, and init them in
constructor:
class GDB
{
Statement stmt;
Config config;
MySQLDriver driver;
DataSource ds;
On Thursday, 28 July 2016 at 11:41:49 UTC, burjui wrote:
Why do you use D then?
it is fun.
Oh, D is more convenient and robust?
no, it is more fun.
"Refactoring" is more convenient and robust than sed -i
's/.../.../g'.
ues, using specialised tools to do useless work can be counted as
On Wednesday, 27 July 2016 at 10:41:54 UTC, ketmar wrote:
On Wednesday, 27 July 2016 at 10:39:52 UTC, NX wrote:
Lack of production quality tools
like? no, "refactoring" and other crap is not "production
quality tools", they are only useful to pretend that you are
doing something useful, so
A template parameter is usually needed when it affects the output
data, but in case of regex it won't do much, because the output
data are slices of the input string, so decoding doesn't affect
them, only exceptions.
On Thursday, 28 July 2016 at 09:10:33 UTC, Kagamin wrote:
Create an RFE? Given that regex returns results as slices of
the input string, using the replacement character doesn't
introduce data corruption.
(RFE = Request For Enhancement, right?)
Yes, all algorithms that use decode internally
Create an RFE? Given that regex returns results as slices of the
input string, using the replacement character doesn't introduce
data corruption.
I see. I'll try to rephrase my question to be clear. We have:
```
struct Foo
{
int i;
float f;
}
int main()
{
const(Foo)[] cfoo = [Foo(1, 0.5), Foo(2, 0.75)];
Foo[] foo;
cfoo.copy(foo); // it works, constness no matter here because Foo is
value type
}
```
but
28 matches
Mail list logo