Found this:
http://forum.dlang.org/thread/ntuysfcivhbphnhnn...@forum.dlang.org#post-mailman.1409.1339356130.24740.digitalmars-d-learn:40puremagic.com
If what Jonathan says is true, then
http://dlang.org/template-mixin.html should be updated: s/mixin
template/template/
Check out the json module in vibe.d. Maybe copy it into your own
application (since it can't be used as a library, yet).
http://vibed.org/api/vibe.data.json/
https://github.com/rejectedsoftware/vibe.d
What is the difference between:
A
---
template Foo() {
int x = 5;
}
B
-
mixin template Foo() {
int x = 5;
}
The full example is from the first code sample on
http://dlang.org/template-mixin.html Both A and B compile and
when run, have the exact same output. So how is '
On Monday, 27 January 2014 at 23:26:44 UTC, cal wrote:
I usually end up doing something like this when dealing with
std.json:
http://dpaste.dzfl.pl/bcb14d6a;
Cool, thank you.
Your example really helps clear this up for me. Plus I liked the
use of the popBackN() method call on the string, I
I can't remember whether or not I've asked this.. But either way,
is it possible to "export" a class or a struct or something like
you do with a windows dll with a linux shared library (dll)?
On Monday, 27 January 2014 at 06:51:57 UTC, dennis wrote:
I am having trouble understanding how to navigate the tree
returned by std.json. I am new to D programming, I have tried
reading the std.json source code but I am still stumped.
I usually end up doing something like this when dealing w
On 1/27/14 10:40 AM, Pierre Talbot wrote:
On Monday, 27 January 2014 at 01:39:47 UTC, Simen Kjærås wrote:
On 2014-01-26 09:59, Pierre Talbot wrote:> Hi,
>
> I was wondering why CTFE is context sensitive, why don't we
check
> every expressions and run the CTFE if it applies?
Mostly because it's
On 01/27/2014 07:59 PM, Justin Whear wrote:
> On Mon, 27 Jan 2014 15:44:43 +0100, Robert Schadek wrote:
>
>> I'm searching the docs for something similar to:
>> copy(someInputRange, firstOutputRange, secondOutputRange, );
>> I know how to write it by hand, but I'm suspecting that something like
On 01/27/2014 07:36 PM, Ilya Yaroshenko wrote:
> On Monday, 27 January 2014 at 17:26:35 UTC, Robert Schadek wrote:
>> I'm searching the docs for something similar to:
>> copy(someInputRange, firstOutputRange, secondOutputRange, );
>> I know how to write it by hand, but I'm suspecting that somet
On Monday, 27 January 2014 at 18:36:32 UTC, Ilya Yaroshenko wrote:
On Monday, 27 January 2014 at 17:26:35 UTC, Robert Schadek
wrote:
I'm searching the docs for something similar to:
copy(someInputRange, firstOutputRange, secondOutputRange,
);
I know how to write it by hand, but I'm suspecti
On Monday, 27 January 2014 at 14:47:21 UTC, Steven Schveighoffer
wrote:
On Mon, 27 Jan 2014 03:17:51 -0500, Nicolas Sicard
wrote:
Actually I used a struct because the code is more complex, and
it builds an array of delegates, which are returned from
global functions, like:
---
struct Transf
Hello,
Suppose I have the following function
auto veryStableAPI(string parameter,VaraiadicParams...)() {
// do something very slow and stable;
}
auto experimentalReplacement(string parameter,VaraidcParams
...)() {
// do the same thing very fast and dangerous
}
is the following
au
On Mon, 27 Jan 2014 15:44:43 +0100, Robert Schadek wrote:
> I'm searching the docs for something similar to:
> copy(someInputRange, firstOutputRange, secondOutputRange, );
> I know how to write it by hand, but I'm suspecting that something like
> this is already in phobos.
>
> And secondly, i
On Monday, 27 January 2014 at 17:26:35 UTC, Robert Schadek wrote:
I'm searching the docs for something similar to:
copy(someInputRange, firstOutputRange, secondOutputRange, );
I know how to write it by hand, but I'm suspecting that
something like
this is already in phobos.
Hi, I think you
On Monday, 27 January 2014 at 01:39:47 UTC, Simen Kjærås wrote:
On 2014-01-26 09:59, Pierre Talbot wrote:> Hi,
>
> I was wondering why CTFE is context sensitive, why don't we
check
> every expressions and run the CTFE if it applies?
Mostly because it's not necessary, and takes more time than
si
I'm searching the docs for something similar to:
copy(someInputRange, firstOutputRange, secondOutputRange, );
I know how to write it by hand, but I'm suspecting that something like
this is already in phobos.
And secondly, is there some function that gives me a forward range to
some input range
On Monday, 27 January 2014 at 13:08:28 UTC, Colin Grogan wrote:
In my defense, I believe C initializes arrays with the curly
brackets
Can I keep making excuses?
Yes you can... And don't worry, I mess up initialization too.
Lots of time.
Especially when I tried initializing an array of st
On Mon, 27 Jan 2014 03:17:51 -0500, Nicolas Sicard
wrote:
Actually I used a struct because the code is more complex, and it builds
an array of delegates, which are returned from global functions, like:
---
struct Transformer
{
real delegate(real)[] funs;
addFun(real x)
On Sat, 25 Jan 2014 11:05:11 -, Andre wrote:
// CREATE TABLE demo(name VARCHAR(1))
// INSERT INTO demo (name) VALUES (?)
string[] stringArr = ["A","B","C"];
SQLSetStmtAttr(hStmt, SQL_ATTR_PARAMSET_SIZE,
cast(SQLPOINTER) stringArr.length, 0);
SQLSetStmtAttr(hStmt, SQL_ATTR_PARAM_BIND_TY
I just clone phobos so we could agree about the line numbers :
/usr/include/dmd/phobos/std/conv.d(3889): Error: memcpy cannot be
interpreted at compile time, because it has no available source
code
/usr/include/dmd/phobos/std/range.d(4769):called from
here: emplace(addr, front(this._ra
On Monday, 27 January 2014 at 13:18:06 UTC, Meta wrote:
On Monday, 27 January 2014 at 11:15:36 UTC, matovitch wrote:
Hello !
Yesterday, I started a project to implement completly static
Laurent's polynomials (i.e. polynomials formed by z^n and z^-n
monomials).
I thought I could represent thes
Here is something I just did that essentially demonstrates what I
am talking about(bugs withstanding):
http://dpaste.dzfl.pl/d82b6274
It is not exactly how I should be going about it as it is
somewhat generic but not properly designed to allow the concrete
implementations needed
void main()
{
On Monday, 27 January 2014 at 11:15:36 UTC, matovitch wrote:
Hello !
Yesterday, I started a project to implement completly static
Laurent's polynomials (i.e. polynomials formed by z^n and z^-n
monomials).
I thought I could represent these polynomials with an immutable
range of Tuple!(numeric_
On Monday, 27 January 2014 at 10:39:28 UTC, Francesco Cattoglio
wrote:
On Monday, 27 January 2014 at 10:13:08 UTC, Colin Grogan wrote:
On Monday, 27 January 2014 at 09:34:04 UTC, Namespace wrote:
Arrays are enclosed in [] ;)
I'm an idiot.
Can I delete this thread to save further embarrassment
Hello !
Yesterday, I started a project to implement completly static
Laurent's polynomials (i.e. polynomials formed by z^n and z^-n
monomials).
I thought I could represent these polynomials with an immutable
range of Tuple!(numeric_type, int).
I've tried (and failed) to implement the additio
On Monday, 27 January 2014 at 10:13:08 UTC, Colin Grogan wrote:
On Monday, 27 January 2014 at 09:34:04 UTC, Namespace wrote:
Arrays are enclosed in [] ;)
I'm an idiot.
Can I delete this thread to save further embarrassment? :)
HA-HA!
(read it with Nelson voice, ofc)
On Monday, 27 January 2014 at 10:13:08 UTC, Colin Grogan wrote:
Arrays are enclosed in [] ;)
I'm an idiot.
Can I delete this thread to save further embarrassment? :)
No! Evenryone will see this! >:E~
On Monday, 27 January 2014 at 09:34:04 UTC, Namespace wrote:
On Monday, 27 January 2014 at 09:06:17 UTC, Colin Grogan wrote:
Why wont the following code compile?
import std.stdio;
void main()
{
myStruct[] mystructs = {
{1, 1.1f},
{2, 2.2f}
};
}
extern(C){
struct myStruc
I have a simple "Hello World" program (file named "tmp.d")
written in D
import std.stdio;
void main() {
printf("Hello World\n");
}
I successfully compiled the above program with the DMD64 D
compiler v2.064 on linux x86_64 (libc 2.18 just in case
required). But valgrind reports memory leaks
On Monday, 27 January 2014 at 09:06:17 UTC, Colin Grogan wrote:
Why wont the following code compile?
import std.stdio;
void main()
{
myStruct[] mystructs = {
{1, 1.1f},
{2, 2.2f}
};
}
extern(C){
struct myStruct{
int x;
float y;
}
}
It fails with
Why wont the following code compile?
import std.stdio;
void main()
{
myStruct[] mystructs = {
{1, 1.1f},
{2, 2.2f}
};
}
extern(C){
struct myStruct{
int x;
float y;
}
}
It fails with the (unhelpful imo) error message:
source/app.d(7): Error: a str
On Monday, 27 January 2014 at 02:27:08 UTC, Steven Schveighoffer
wrote:
On Sun, 26 Jan 2014 18:41:00 -0500, Nicolas Sicard
wrote:
Running a piece of code that can be reduced to:
---
import std.stdio;
void main()
{
import std.range;
foreach(item; iota(0, 10).transform(2))
32 matches
Mail list logo