On Monday, 27 January 2014 at 02:27:08 UTC, Steven Schveighoffer
wrote:
On Sun, 26 Jan 2014 18:41:00 -0500, Nicolas Sicard
dran...@gmail.com wrote:
Running a piece of code that can be reduced to:
---
import std.stdio;
void main()
{
import std.range;
foreach(item; iota(0,
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
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
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: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
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 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 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
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
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,
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
On Sat, 25 Jan 2014 11:05:11 -, Andre an...@s-e-a-p.de 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,
On Mon, 27 Jan 2014 03:17:51 -0500, Nicolas Sicard dran...@gmail.com
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;
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
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
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, is
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
On Monday, 27 January 2014 at 14:47:21 UTC, Steven Schveighoffer
wrote:
On Mon, 27 Jan 2014 03:17:51 -0500, Nicolas Sicard
dran...@gmail.com 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:
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 not
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
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)?
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
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/
23 matches
Mail list logo