On 30.03.2016 01:41, Thalamus wrote:
Apologies if this has been discussed before, but I wasn't able to find
anything similar on the forums or web. I can't seem to figure out how to
debug a D DLL from a C# EXE. (My actual purpose here is to use D to
build native plugins for Unity 5, but Unity an
On Tue, Mar 29, 2016 at 08:05:29PM -0400, Steven Schveighoffer via
Digitalmars-d-learn wrote:
[...]
> Phobos treats narrow strings (wchar[], char[]) as ranges of dchar. It
> was discovered that auto decoding strings isn't always the smartest
> thing to do, especially for performance.
>
> So you g
On Wed, Mar 30, 2016 at 03:22:48AM +, Jack Stouffer via Digitalmars-d-learn
wrote:
> On Tuesday, 29 March 2016 at 23:42:07 UTC, H. S. Teoh wrote:
> >Believe it or not, it was only last year (IIRC, maybe the year
> >before) that Walter "discovered" that Phobos does autodecoding, and
> >got pret
On Tuesday, 29 March 2016 at 23:42:07 UTC, H. S. Teoh wrote:
Believe it or not, it was only last year (IIRC, maybe the year
before) that Walter "discovered" that Phobos does autodecoding,
and got pretty upset over it. If even Walter wasn't aware of
this for that long...
The link (I think thi
On 30/03/2016 11:29 AM, Carl Sturtivant wrote:
is there documentation on which parts of D are available to compile time
execution?
Rule of thumb, if it can be pure and @safe, you're good to go.
On Tuesday, 29 March 2016 at 21:27:15 UTC, ZombineDev wrote:
On Saturday, 26 March 2016 at 17:43:48 UTC, maik klein wrote:
On Saturday, 26 March 2016 at 17:06:39 UTC, ag0aep6g wrote:
On 26.03.2016 18:04, ag0aep6g wrote:
https://gist.github.com/aG0aep6G/a1b87df1ac5930870ffe/revisions
PS: Thos
On 03/29/2016 05:29 PM, Yuxuan Shui wrote:
On Wednesday, 30 March 2016 at 00:26:49 UTC, Yuxuan Shui wrote:
My code looks something like this:
bool[ulong][ulong] edge;
foreach(u; from)
foreach(v; to_)
edge[u][v] = true;
foreach(u; edge.keys) {
auto adj = edge[u];
//
}
An
On Wednesday, 30 March 2016 at 00:26:49 UTC, Yuxuan Shui wrote:
My code looks something like this:
bool[ulong][ulong] edge;
foreach(u; from)
foreach(v; to_)
edge[u][v] = true;
foreach(u; edge.keys) {
auto adj = edge[u];
//
}
And sometimes edge[u] would give Range violati
On Wednesday, 30 March 2016 at 00:05:29 UTC, Steven Schveighoffer
wrote:
On 3/29/16 7:42 PM, H. S. Teoh via Digitalmars-d-learn wrote:
On Tue, Mar 29, 2016 at 11:15:26PM +, Basile B. via
Digitalmars-d-learn wrote:
On Monday, 28 March 2016 at 22:34:31 UTC, Jack Stouffer wrote:
void main ()
My code looks something like this:
bool[ulong][ulong] edge;
foreach(u; from)
foreach(v; to_)
edge[u][v] = true;
foreach(u; edge.keys) {
auto adj = edge[u];
//
}
And sometimes edge[u] would give Range violation error.
On 3/29/16 7:42 PM, H. S. Teoh via Digitalmars-d-learn wrote:
On Tue, Mar 29, 2016 at 11:15:26PM +, Basile B. via Digitalmars-d-learn
wrote:
On Monday, 28 March 2016 at 22:34:31 UTC, Jack Stouffer wrote:
void main () {
import std.range.primitives;
char[] val = ['1', '0', 'h', '3',
On Tue, Mar 29, 2016 at 11:15:26PM +, Basile B. via Digitalmars-d-learn
wrote:
> On Monday, 28 March 2016 at 22:34:31 UTC, Jack Stouffer wrote:
> >void main () {
> >import std.range.primitives;
> >char[] val = ['1', '0', 'h', '3', '6', 'm', '2', '8', 's'];
> >pragma(msg, ElementEnc
Apologies if this has been discussed before, but I wasn't able to
find anything similar on the forums or web. I can't seem to
figure out how to debug a D DLL from a C# EXE. (My actual purpose
here is to use D to build native plugins for Unity 5, but Unity
and Mono aren't necessary to repro the
On Tuesday, 29 March 2016 at 23:15:26 UTC, Basile B. wrote:
I've seen you so many time as a reviewer on dlang that I belive
this Q is a joke.
Even if obviously nobody can know everything...
https://www.youtube.com/watch?v=l97MxTx0nzs
seriously you didn't know that auto decoding is on and that
On Monday, 28 March 2016 at 22:34:31 UTC, Jack Stouffer wrote:
void main () {
import std.range.primitives;
char[] val = ['1', '0', 'h', '3', '6', 'm', '2', '8', 's'];
pragma(msg, ElementEncodingType!(typeof(val)));
pragma(msg, typeof(val.front));
}
prints
char
dchar
Why
On Monday, 28 March 2016 at 21:01:19 UTC, cy wrote:
I finally found the null pointer. It took a week. I was
assigning "db = db" when I should have been assigning "this.db
= db". Terrible, I know. But...
I invoked db.find_chapter.bindAll(8,4), when db was a null
pointer. There was no null poin
On 03/29/2016 03:29 PM, Carl Sturtivant wrote:
is there documentation on which parts of D are available to compile time
execution?
This seems to be the official spec:
https://dlang.org/spec/function.html#interpretation
See you at DConf! ;)
Ali
is there documentation on which parts of D are available to
compile time execution?
Am Mon, 28 Mar 2016 16:29:50 -0700
schrieb "H. S. Teoh via Digitalmars-d-learn"
:
> […] your diacritics may get randomly reattached to
> stuff they weren't originally attached to, or you may end up with wrong
> sequences of Unicode code points (e.g. diacritics not attached to any
> grapheme). Usin
On 03/29/2016 02:33 AM, Voitech wrote:
Hi, i want to join two or more tupples in to one, with mixing the
indexes like roundRobin but in compile time.
unittest{
import std.meta;
alias first=AliasSeq!(int, string,bool);
alias second=AliasSeq!("abc","def","ghi");
alias third=...
static assert(thir
On Saturday, 26 March 2016 at 17:43:48 UTC, maik klein wrote:
On Saturday, 26 March 2016 at 17:06:39 UTC, ag0aep6g wrote:
On 26.03.2016 18:04, ag0aep6g wrote:
https://gist.github.com/aG0aep6G/a1b87df1ac5930870ffe/revisions
PS: Those enforces are for a size of 100_000 not 1_000_000,
because I
Am Tue, 29 Mar 2016 06:00:32 +
schrieb cy :
> struct Database {
>string derp;
>Statement prepare(string s) {
> return Statement(1234);
>}
> }
>
> struct Statement {
>int member;
>void bind(int column, int value) {
> import std.stdio;
> writeln("derp",memb
On 03/29/2016 11:57 AM, cy wrote:
> On Tuesday, 29 March 2016 at 06:21:49 UTC, Ali Çehreli wrote:
>> parent.prep.bind is translated to the following by the compiler:
>>
>> "Call bind() for the object at address... let's calculate... Wherever
>> parent is, we should add the offset of prep inside th
On Tuesday, 29 March 2016 at 06:21:49 UTC, Ali Çehreli wrote:
parent.prep.bind is translated to the following by the compiler:
"Call bind() for the object at address... let's calculate...
Wherever parent is, we should add the offset of prep inside
that object."
Okay, that's helpful actually.
On Tuesday, 29 March 2016 at 18:29:27 UTC, Ali Çehreli wrote:
On 03/29/2016 11:21 AM, ref2401 wrote:
So, dict is a template value parameter of type T[string]. I
don't think you can use an associative array as a template
value parameter. (Can we?)
However, it is possible to use anything as an
On 03/29/2016 11:21 AM, ref2401 wrote:
> private void impl(S, T, T[string] dict)(S arg) {
> writeln("S: ", S.stringof);
> writeln("T: ", T.stringof);
> writeln("dict: ", dict);
So, dict is a template value parameter of type T[string]. I don't think
you can use an associative arra
OS: Win 8.1 Pro
DMD: v2.070.0
cmd: dmd main.d -ofconsole-app.exe -debug -unittest -wi
Code is successfully compiled until I uncomment test1 function
call in the main.
If it's uncommented I get the following compile-time error:
main.d(58): Error: template instance impl!(string, bool,
["y":true
On 30/03/2016 1:46 AM, eastanon wrote:
On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole wrote:
void popFront() {
import std.string : indexOf;
if (source is null) {
isEmpty = true;
return;
On Tuesday, 29 March 2016 at 10:29:46 UTC, Simen Kjaeraas wrote:
On Tuesday, 29 March 2016 at 10:13:28 UTC, Puming wrote:
Hi,
I'm writing a generic class:
```d
struct Message { ... }
class Decoder(MsgSrc) {
}
```
When using it, I'd have to include the type of its argument:
```
void main()
On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole
wrote:
void popFront() {
import std.string : indexOf;
if (source is null) {
On Tuesday, 29 March 2016 at 10:13:28 UTC, Puming wrote:
Hi,
I'm writing a generic class:
```d
struct Message { ... }
class Decoder(MsgSrc) {
}
```
When using it, I'd have to include the type of its argument:
```
void main() {
Message[] src = ...;
auto decoder = new Decoder!(Message[
On Tuesday, 29 March 2016 at 10:13:28 UTC, Puming wrote:
Hi,
I'm writing a generic class:
```d
struct Message { ... }
class Decoder(MsgSrc) {
}
```
When using it, I'd have to include the type of its argument:
```
void main() {
Message[] src = ...;
auto decoder = new Decoder!(Message[
Hi,
I'm writing a generic class:
```d
struct Message { ... }
class Decoder(MsgSrc) {
}
```
When using it, I'd have to include the type of its argument:
```
void main() {
Message[] src = ...;
auto decoder = new Decoder!(Message[])(src);
...
}
```
Can it be inferred so that I only
On Tuesday, 29 March 2016 at 09:33:40 UTC, Voitech wrote:
Hi, i want to join two or more tupples in to one, with mixing
the indexes like roundRobin but in compile time.
unittest{
import std.meta;
alias first=AliasSeq!(int, string,bool);
alias second=AliasSeq!("abc","def","ghi");
alias third=...
On Friday, 18 March 2016 at 20:06:27 UTC, Jonathan M Davis wrote:
When a function accepts const(char)[] than it can accept char[],
const(char)[], const(char[]), immutable(char)[], and
immutable(char[]),
which, whereas if it accepts string, then all it accepts are
immutable(char)[] and immutabl
Hi, i want to join two or more tupples in to one, with mixing the
indexes like roundRobin but in compile time.
unittest{
import std.meta;
alias first=AliasSeq!(int, string,bool);
alias second=AliasSeq!("abc","def","ghi");
alias third=...
static assert(third==AliasSeq!(int, "abc", string, "def",
On Monday, March 28, 2016 16:29:50 H. S. Teoh via Digitalmars-d-learn wrote:
> On Mon, Mar 28, 2016 at 04:07:22PM -0700, Jonathan M Davis via
> Digitalmars-d-learn wrote: [...]
>
> > The range API considers all strings to have an element type of dchar.
> > char, wchar, and dchar are UTF code units
37 matches
Mail list logo