Thanks for your help everyone.
I agree that the issue is due to the misusage of an InputRange
but what is the semantics of 'take' when applied to an
InputRange? It seems that calling it invalidates the range; in
which case what is the recommended way to get a few bytes and
keep on advancing.
On Monday, 21 March 2016 at 17:26:09 UTC, Karabuta wrote:
Will this work
Yes.
and is it the right approach used by video convertor front-ends?
Well, yes, provisionally. When you invoke "ffmpeg" via
spawnProcess, that isolates ffmpeg as its own process, obviously.
From a security and main
On Tuesday, 22 March 2016 at 07:17:41 UTC, Hanh wrote:
input.take(3).array;
foreach (char c; input) {
Never use an input range twice. So, here's how to use it twice:
If it's a "forward range" you can use save() to get a copy to use
later (but all the std.stdio.* ranges don't i
On 03/22/2016 12:17 AM, Hanh wrote:
> Hi all,
>
> I'm trying to process a rather large file as an InputRange and run into
> something strange with byChunk / take.
>
> void test() {
> auto file = new File("test.txt");
> auto input = file.byChunk(2).joiner;
> input.take(3).array;
>
On 20.03.2016 08:49, stunaep wrote:
The gc throws invalid memory errors if I use Arrays from std.container.
For example, this throws an InvalidMemoryOperationError:
import std.stdio;
import std.container;
void main() {
new Test();
}
class Test {
private Array!string test = Array!strin
On Tuesday, 22 March 2016 at 13:46:41 UTC, stunaep wrote:
public class Example2 {
private int one;
private int two;
public this(int one, int two) {
this.one = one;
this.two = two;
}
}
in a tree map and list of som
On Tuesday, 22 March 2016 at 07:17:41 UTC, Hanh wrote:
Hi all,
I'm trying to process a rather large file as an InputRange and
run into something strange with byChunk / take.
void test() {
auto file = new File("test.txt");
auto input = file.byChunk(2).joiner;
input.take
On Monday, 21 March 2016 at 07:55:39 UTC, thedeemon wrote:
On Sunday, 20 March 2016 at 07:49:17 UTC, stunaep wrote:
The gc throws invalid memory errors if I use Arrays from
std.container.
Those arrays are for RAII-style deterministic memory release,
they shouldn't be freely mixed with GC-allo
On Tuesday, 22 March 2016 at 07:35:49 UTC, ZombineDev wrote:
If the object is larger than the size of a register on the
target machine, it is implicitly passed by ref (i.e. struct
fields are accessed by offset from the stack pointer).
(Oops, sorry ZombineDev, should've read your reply first)
On Monday, 21 March 2016 at 23:31:06 UTC, ref2401 wrote:
I have got a plenty of structs in my project. Their size varies
from 12 bytes to 128 bytes.
Is there a rule of thumb that states which structs I pass by
value and which I should pass by reference due to their size?
Note that the compiler
On Tuesday, 22 March 2016 at 09:19:27 UTC, Vladimir Panteleev
wrote:
On Tuesday, 22 March 2016 at 09:11:52 UTC, Jerry wrote:
So I want to pass my DUB project to Dustmite and use findstr
For reducing dub projects, try the "dub dustmite" command, e.g.
"--compiler-regex=Assertion failure".
Tha
On Tuesday, 22 March 2016 at 09:11:52 UTC, Jerry wrote:
So I want to pass my DUB project to Dustmite and use findstr
For reducing dub projects, try the "dub dustmite" command, e.g.
"--compiler-regex=Assertion failure".
I am really not used to bash scripts.
I am trying to use Dustmite on my project since I have started
getting an
"Assertion failure: '0' in glue.c on line 1492" and really can
not find any issue about it in the issue tracker.
So I want to pass my DUB project to Dustmite and use findstr bash
co
On Monday, 21 March 2016 at 23:31:06 UTC, ref2401 wrote:
I have got a plenty of structs in my project. Their size varies
from 12 bytes to 128 bytes.
Is there a rule of thumb that states which structs I pass by
value and which I should pass by reference due to their size?
Thanks.
If the objec
On Tuesday, 22 March 2016 at 07:17:41 UTC, Hanh wrote:
Hi all,
I'm trying to process a rather large file as an InputRange and
run into something strange with byChunk / take.
void test() {
auto file = new File("test.txt");
auto input = file.byChunk(2).joiner;
input.take
Hi all,
I'm trying to process a rather large file as an InputRange and
run into something strange with byChunk / take.
void test() {
auto file = new File("test.txt");
auto input = file.byChunk(2).joiner;
input.take(3).array;
foreach (char c; input) {
16 matches
Mail list logo