WARNING: Do not try to compile this code. Your computer may be
unresponsive for a while. :)
On 03/25/2016 02:54 PM, data pulverizer wrote:
> I am attempting to create a table struct with generic column types using
> templates.
However, the template arguments are not types; rather, aliases.
> t
On Friday, 25 March 2016 at 08:01:04 UTC, cym13 wrote:
// This consume
auto buffer3 = range.take(4).array;
assert(buffer3 == [0, 5, 10, 15]);
}
Thanks for your help. However the last statement is incorrect. I
am in fact looking for a version of 'take' that consumes
On Saturday, 26 March 2016 at 00:10:23 UTC, Chris Williams wrote:
None of the access modes for std.stdio.File seem to allow that.
Any usage of the "w" mode causes my code to consider the file
empty if it pre-exists (though, it doesn't always actually
truncate the disk on file?)
Mode "a+" or "
On Friday, 25 March 2016 at 23:40:37 UTC, data pulverizer wrote:
On Friday, 25 March 2016 at 20:54:28 UTC, Atila Neves wrote:
int delegate(int) dg = (i) => i * 2;
Error: non-constant nested delegate literal expression
__lambda3
int delegate(int) dg;
static this() {
dg = i => i * 2; // o
On Saturday, 26 March 2016 at 00:10:23 UTC, Chris Williams wrote:
I need to be able to perform random access I/O against a file,
creating a new file if it doesn't exist, or opening as-is (no
truncation) if it already exists.
None of the access modes for std.stdio.File seem to allow that.
Any
I need to be able to perform random access I/O against a file,
creating a new file if it doesn't exist, or opening as-is (no
truncation) if it already exists.
None of the access modes for std.stdio.File seem to allow that.
Any usage of the "w" mode causes my code to consider the file
empty if
On Friday, 25 March 2016 at 20:54:28 UTC, Atila Neves wrote:
int delegate(int) dg = (i) => i * 2;
Error: non-constant nested delegate literal expression __lambda3
int delegate(int) dg;
static this() {
dg = i => i * 2; // ok
}
Am I doing anything wrong?
Atila
Hmm, looks like your first
On Friday, 25 March 2016 at 13:58:44 UTC, Steven Schveighoffer
wrote:
On 3/24/16 8:54 PM, Jonathan Villa wrote:
[...]
D's File i/o uses C's FILE * i/o system. At least on Windows,
this has literally zero support for wchar (you can set stream
width, and the library just ignores it).
What is
p.s. I realise that the ColumnTable call is a little ponderous
but I tidy it up in a convenience wrapper function:
auto CreateDataTable(Args...)(){
string[] names;
foreach(i, arg; Args){
names ~= Args[i].stringof;
}
auto df = ColumnTable!(Args)(Arg
I am attempting to create a table struct with generic column
types using templates. The subTable() member function subsets the
table, however I am getting a template recursion error. I know
where the problem is from, I don't know how to resolve it. I am
modelling it after the matrix example in
int delegate(int) dg = (i) => i * 2;
Error: non-constant nested delegate literal expression __lambda3
int delegate(int) dg;
static this() {
dg = i => i * 2; // ok
}
Am I doing anything wrong?
Atila
On 03/25/2016 11:32 AM, Adam D. Ruppe via Digitalmars-d-learn wrote:
On Friday, 25 March 2016 at 18:25:28 UTC, Charles Hixson wrote:
But when I try to cast a Chnk to a ubyte[], I get an error, and
rawWrite takes a generic array of anything... you should be able to
rawWrite((&your_object)[0 .
On Friday, 25 March 2016 at 18:25:28 UTC, Charles Hixson wrote:
But when I try to cast a Chnk to a ubyte[], I get an error, and
rawWrite takes a generic array of anything... you should be able
to rawWrite((&your_object)[0 .. 1])
I've got a simple struct:
structChnk
{ ulongid;
char[20]wrd;
ubytelength;
...<--various utility functions and constructors
}
That I'm trying to write to a file. I want to use an unformatted
read/write because I want this to be a random access file.
But
On Thursday, 24 March 2016 at 15:52:49 UTC, Adam D. Ruppe wrote:
On Thursday, 24 March 2016 at 15:07:09 UTC, Yuxuan Shui wrote:
Is there a way to do this automatically?
No. You have to decide to bring them together if you want them
to overload.
Oh, sorry, this is not what I meant.
What I w
On 3/24/16 8:54 PM, Jonathan Villa wrote:
I prefer to post this thing here because it could that I'm doing
something wrong.
I'm using std.stdio -> readln() to read whatever I'm typing in the console.
BUT, if the line contains some UTF-8 characters, the data obtained is
EMPTY and
module runnab
On Friday, 25 March 2016 at 08:53:20 UTC, Ali Çehreli wrote:
On 03/25/2016 12:00 AM, data pulverizer wrote:
> On Thursday, 24 March 2016 at 18:46:14 UTC, Ali Çehreli wrote:
>> On 03/24/2016 10:24 AM, data pulverizer wrote:
>> > I have been playing with the matrix example given at the
end
>> of ch
On 03/25/2016 12:00 AM, data pulverizer wrote:
> On Thursday, 24 March 2016 at 18:46:14 UTC, Ali Çehreli wrote:
>> On 03/24/2016 10:24 AM, data pulverizer wrote:
>> > I have been playing with the matrix example given at the end
>> of chapter
>> > 78 of Ali Çehreli's
>>
>> For reference, it's "Mult
On Thursday, 24 March 2016 at 07:52:27 UTC, Hanh wrote:
On Wednesday, 23 March 2016 at 19:07:34 UTC, cym13 wrote:
In Scala, 'take' consumes bytes from the iterator. So the
same code would be
buffer = range.take(N).toArray
Then just do that!
import std.range, std.array;
auto buffer =
On Thursday, 24 March 2016 at 18:46:14 UTC, Ali Çehreli wrote:
On 03/24/2016 10:24 AM, data pulverizer wrote:
> I have been playing with the matrix example given at the end
of chapter
> 78 of Ali Çehreli's
For reference, it's "Multi-dimensional operator overloading
example" here:
http://ddi
20 matches
Mail list logo