On 29/12/2014 7:39 p.m., Jeremy DeHaan wrote:
On Monday, 29 December 2014 at 06:34:02 UTC, Jeremy DeHaan wrote:
On Monday, 29 December 2014 at 06:26:04 UTC, Jeremy DeHaan wrote:
Hey all,
I've never gotten any xcb errors with just regular D code before, but
maybe I just haven't done anything th
On Monday, 29 December 2014 at 06:34:02 UTC, Jeremy DeHaan wrote:
On Monday, 29 December 2014 at 06:26:04 UTC, Jeremy DeHaan
wrote:
Hey all,
I've never gotten any xcb errors with just regular D code
before, but maybe I just haven't done anything that would have
caused them.
I can't say I ac
On Monday, 29 December 2014 at 06:26:04 UTC, Jeremy DeHaan wrote:
Hey all,
I've never gotten any xcb errors with just regular D code
before, but maybe I just haven't done anything that would have
caused them.
I can't say I actually know much about how these things work,
but does D not use x
Hey all,
I've never gotten any xcb errors with just regular D code before,
but maybe I just haven't done anything that would have caused
them.
I can't say I actually know much about how these things work, but
does D not use xcb when it does threading on Linux?
I'm not really doing anything
Laeeth - I am not sure exactly what your needs are but I have a
fairly complete solution for generic multidimensional interfaces
(template-based, bounds checked, RAII-ready, non-integer indices,
the whole shebang) that I have been building. Anyway I don't want
to spam the forum if I've missed the
On Sunday, 28 December 2014 at 08:41:15 UTC, Suliman wrote:
import postgres;
import database;
Those should include the package name:
import arsd.postgres;
Since it publicly imports the base clas, you don't need to import
database yourself. (You do still need to pass all files to dmd
though,
> -Original Message-
> From: digitalmars-d-learn@puremagic.com
> Sent: Sun, 28 Dec 2014 22:21:20 +
> To: digitalmars-d-learn@puremagic.com
> Subject: Re: Problem with immutables and Template typeof(this)
>
> On Sunday, 28 December 2014 at 22:07:31 UTC, AuoroP via
> Digitalmars-d-lear
> -Original Message-
> From: digitalmars-d-learn@puremagic.com
> Sent: Sun, 28 Dec 2014 22:18:43 +
> To: digitalmars-d-learn@puremagic.com
> Subject: Re: Problem with immutables and Template typeof(this)
>
> On Sunday, 28 December 2014 at 22:07:31 UTC, AuoroP via
> Digitalmars-d-lear
On 28/12/14 19:21, Tobias Pankrath via Digitalmars-d-learn wrote:
To allow slicing for types that don't have a length property but
are terminated by a sentinel value, like null terminated strings
or single linked lists.
It's usefull for multi-dimensional containers as well.
Ah, clear. Thanks
Well, the type is ExampleTemplate. No reason not to write it
directly. If you cannot for whatever reason I currently do not
see: cast to Unqual!(typeof(this)).
See http://dlang.org/phobos/std_traits.html
Also: Casting with no Type or CastQual removes any top level
const, immutable, shared or in
On Sunday, 28 December 2014 at 22:07:31 UTC, AuoroP via
Digitalmars-d-learn wrote:
I have been trying to figure templates out...
template ExampleTemplate(T)
{
struct ExampleTemplate
{
T value;
// constructor
auto this(T value)
Constructors don't have return typ
On Sun, 28 Dec 2014 14:07:18 -0800
AuoroP via Digitalmars-d-learn
wrote:
let me give you a riddle:
struct ExampleTemplate(T) {
T value;
auto opAdd (typeof(this) that) inout {
import std.traits : Unqual;
Unqual!(typeof(this)) result;
result.value = this.value+that.val
On Sunday, 28 December 2014 at 22:07:31 UTC, AuoroP via
Digitalmars-d-learn wrote:
I have been trying to figure templates out...
template ExampleTemplate(T)
{
struct ExampleTemplate
{
T value;
// constructor
auto this(T value)
{
this.value = v
I have been trying to figure templates out...
template ExampleTemplate(T)
{
struct ExampleTemplate
{
T value;
// constructor
auto this(T value)
{
this.value = value;
return this;
}
// opAdd
typeof(this) opAdd
On Sunday, 28 December 2014 at 20:25:59 UTC, bearophile wrote:
John Colvin:
I guess there are cases where it's not easily catchable:
void foo(int* p0, int* p1)
{
(*p0)++ = (*p1)++;
}
what happens when p0 == p1?
The undefined code can be found statically, the run-time values
are irreleva
On Sunday, 28 December 2014 at 14:51:22 UTC, Gary Willoughby
wrote:
I was just taking a look at the following poll[1] about the
order of evaluation when using the post-increment operator. The
following D snippet shows an example.
import std.stdio;
void main(string[] args)
On Sun, 28 Dec 2014 19:02:59 +0100
Joseph Rushton Wakeling via Digitalmars-d-learn
wrote:
> A question that suddenly occurred to me, and I realized I didn't know the
> answer.
>
> Why is it necessary/desirable to define separate .length and .opDollar
> methods
> for custom types?
'because you
On Sun, 28 Dec 2014 17:34:50 +
via Digitalmars-d-learn wrote:
> On Sunday, 28 December 2014 at 16:05:32 UTC, bearophile wrote:
> > (IMHO it must be).
>
> Disallowing is an alternative to consider. Even defined behaviour
> can be unintuitive and error prone.
yep, 13670 times "yep". ;-)
sig
On Sun, 28 Dec 2014 20:21:45 +
Aiden via Digitalmars-d-learn wrote:
> Thanks for the information. At least I've discovered a reasonably
> tidy way of wrapping Mutex up so that it's not quite as painful
> casting everything:
>
> shared class SharedMutex {
>private Mutex mutex;
>
>p
John Colvin:
I guess there are cases where it's not easily catchable:
void foo(int* p0, int* p1)
{
(*p0)++ = (*p1)++;
}
what happens when p0 == p1?
The undefined code can be found statically, the run-time values
are irrelevant.
Bye,
bearophile
Thanks for the information. At least I've discovered a reasonably
tidy way of wrapping Mutex up so that it's not quite as painful
casting everything:
shared class SharedMutex {
private Mutex mutex;
private @property Mutex unsharedMutex() {
return cast(Mutex)mutex;
}
this() {
m
Marc Schütz:
On Sunday, 28 December 2014 at 16:05:32 UTC, bearophile wrote:
(IMHO it must be).
Disallowing is an alternative to consider. Even defined
behaviour can be unintuitive and error prone.
Right.
Bye,
bearophile
On Sunday, 28 December 2014 at 17:34:52 UTC, Marc Schütz wrote:
On Sunday, 28 December 2014 at 16:05:32 UTC, bearophile wrote:
(IMHO it must be).
Disallowing is an alternative to consider. Even defined
behaviour can be unintuitive and error prone.
I guess there are cases where it's not easi
On Sunday, December 28, 2014 18:21:41 Tobias Pankrath via Digitalmars-d-learn
wrote:
> On Sunday, 28 December 2014 at 18:12:42 UTC, Joseph Rushton
> Wakeling via Digitalmars-d-learn wrote:
> > A question that suddenly occurred to me, and I realized I
> > didn't know the answer.
> >
> > Why is it n
On Sunday, 28 December 2014 at 18:12:42 UTC, Joseph Rushton
Wakeling via Digitalmars-d-learn wrote:
A question that suddenly occurred to me, and I realized I
didn't know the answer.
Why is it necessary/desirable to define separate .length and
.opDollar methods for custom types?
To allow slic
A question that suddenly occurred to me, and I realized I didn't know the
answer.
Why is it necessary/desirable to define separate .length and .opDollar methods
for custom types?
On Sunday, 28 December 2014 at 16:05:32 UTC, bearophile wrote:
(IMHO it must be).
Disallowing is an alternative to consider. Even defined behaviour
can be unintuitive and error prone.
Gary Willoughby:
2. Is there anywhere this order of evaluation is documented?
Currently that code is undefined in D too, and the compiler
doesn't even give a compilation error. But Walter has said many
times that it will become defined in D (IMHO it must be).
Bye,
bearophile
On Saturday, 27 December 2014 at 17:36:39 UTC, Derix wrote:
I try to compile the basic HelloWorld.d example in which I only
added
import Journal;
where Journal is a module I defined in Journal.d in another
directory.
So I have
/home/derix/development/publishing/journal/journal.d
and
/hom
I've encountered this problem back when I was still programming
on Windows and I have encountered this again as I guide my friend
into compiling a Windows-usable version of my software:
http://picpaste.com/pics/10884707_1128873367127279_796341276_n-AEeMhXiv.1419779219.jpg
The program has no hic
On Sunday, 28 December 2014 at 14:51:22 UTC, Gary Willoughby
wrote:
I was just taking a look at the following poll[1] about the
order of evaluation when using the post-increment operator. The
following D snippet shows an example.
import std.stdio;
void main(string[] args)
I was just taking a look at the following poll[1] about the order
of evaluation when using the post-increment operator. The
following D snippet shows an example.
import std.stdio;
void main(string[] args)
{
auto foo = [0, 0];
int i = 0;
On Sunday, 28 December 2014 at 09:24:31 UTC, Aiden wrote:
Hello all,
This is my first post on these forums. I've been learning D for
the past couple of months or so and have been quite impressed
by the language thus far. One stumbling block that I have
encountered is with using `shared`, and
On 12/28/14 10:24, Aiden via Digitalmars-d-learn wrote:
> Is `shared` in a workable state?
No.
> Shouldn't Mutex, Condition, etc be shared since they are basically only ever
> useful when used in multiple threads?
Yes, but there are so many problems with 'shared' that
using it that way (even on
Hello all,
This is my first post on these forums. I've been learning D for
the past couple of months or so and have been quite impressed by
the language thus far. One stumbling block that I have
encountered is with using `shared`, and more specifically using
`shared` with synchronization tool
Adam, I trying to build simple app:
import std.stdio;
import postgres;
import database;
void main() {
auto db = new PostgreSql("dbname = test2");
foreach(line; db.query("SELECT * FROM customer")) {
writeln(line[0], line["customer_id"]);
}
}
and getting n
On Sunday, 28 December 2014 at 07:52:24 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 28 Dec 2014 07:44:33 +
Jack via Digitalmars-d-learn
wrote:
How does one compile for Windows on a Linux Machine using dub?
I've been using the "platform" : ["windows"]" configuration in
my dub.json
37 matches
Mail list logo