On Saturday, 26 October 2019 at 02:42:04 UTC, rikki cattermole
wrote:
On 26/10/2019 2:27 PM, 9898287 wrote:
[...]
You probably want -O3 not -O5.
[...]
I assume what you intended is:
writeln("Hello, ", i);
Also for format functions in D you should prefer the templated
variation as it pro
On 26/10/2019 2:27 PM, 9898287 wrote:
Hi I want to find out what's causing my file writes to be so slow. I'm
setting up buffer and locking the file and writing them to the file.
$ cat d.d && ldc2 -O5 d.d && time ./d >> /dev/null
You probably want -O3 not -O5.
void main() {
import std.
Hi I want to find out what's causing my file writes to be so
slow. I'm setting up buffer and locking the file and writing them
to the file.
$ cat d.d && ldc2 -O5 d.d && time ./d >> /dev/null
void main() {
import std.stdio;
stdout.setvbuf(4096);
stdout.lock();
foreach(i; 0 .. 9
You should start a worker thread for this and then use message
passing (vibe.core.concurrency) to wait for the results (or
alternatively a TaskCondition). I was thinking about including
a generic thread proxy in vibe.d that I've used to encapsulate
these details when working with libgit in a vi
- the small server app calls
library code to retrieve data for a selected series from a large data
store (several files, each up to 45G). This library code uses the
standard C/posix APIs for file I/O so isn't written with asynchronous
access in mind
What do I need to do to make sure that i
retrieve data for a selected
series from a large data store (several files, each up to 45G).
This library code uses the standard C/posix APIs for file I/O so
isn't written with asynchronous access in mind
What do I need to do to make sure that if the library code to
retrieve the data ta
On 05/08/2013 07:29 PM, H. S. Teoh wrote:
>
> No need to be embarrassed; it happens to the best of us. IME, some of
> the most frustrating, hair-pulling bugs that take hours (or days!) to
> get to the bottom of often turn out to be dead-easy trivial mistakes
> that got overlooked because they were
On Thu, May 09, 2013 at 01:11:00AM +0200, Carl wrote:
> Wow, I feel silly.
>
> In the process of making sample code I found the problem: I have
> been reading the output with a text editor instead of a hex editor.
> To think I spent hours on this problem... *face palm*
[...]
No need to be embarra
On Wednesday, 8 May 2013 at 21:34:00 UTC, Carl wrote:
I am learning D so I thought this would be the correct place
for this question (I assume I am making an error, not the
compiler).
I am writing arrays of ubytes using rawWrite to a file.
Whenever I write arrays full of numbers I have no pro
Wow, I feel silly.
In the process of making sample code I found the problem: I have
been reading the output with a text editor instead of a hex
editor. To think I spent hours on this problem... *face palm*
Thanks for your quick replies.
On 05/08/2013 02:46 PM, Meta wrote:
>> For example:
>> ubyte[] data = [5, 34, 9, 45];
>> file.rawWrite(data); // OKAY
>>
>> ubyte[] data = [0, 0, 0, 45];
>> file.rawWrite(data); // NOT OKAY
>
> Since ubytes are pretty much the same as chars,
True from the point of view of sizes: they are both 8-
For example:
ubyte[] data = [5, 34, 9, 45];
file.rawWrite(data); // OKAY
ubyte[] data = [0, 0, 0, 45];
file.rawWrite(data); // NOT OKAY
Since ubytes are pretty much the same as chars, I think writing 0
to the file will actually write the null character, which
probably isn't a good thing.
I am learning D so I thought this would be the correct place for
this question (I assume I am making an error, not the compiler).
I am writing arrays of ubytes using rawWrite to a file. Whenever
I write arrays full of numbers I have no problems, but once I
write an array with zeroes I can then
On Saturday 18 September 2010 08:50:41 Graham Nicholls wrote:
> Thanks. I figured that it was a duplicate definition, but not if I leave
> out st.stream, then OpenException is undefined. Is there a documentation
> for the exceptions which are in the relevant packages - I'll struggle
> without it!
Thanks. I figured that it was a duplicate definition, but not if I leave out
st.stream, then OpenException is undefined. Is there a documentation for the
exceptions which are in the relevant packages - I'll struggle without it!
And thanks, all for the help - much appreciated.
BTW, am I making a
On Friday, September 17, 2010 09:21:07 Graham Nicholls wrote:
> I'm getting a little confused. I've installed a .deb package of d 2.0, but
> now my code won't compile:
> unlogcat.d(112): Error: std.stream.File at
> /usr/include/d/dmd/phobos/std/stream.d(1787) conflicts with std.stdio.File
> at /us
On Fri, 17 Sep 2010 12:21:07 -0400, Graham Nicholls
wrote:
I'm getting a little confused. I've installed a .deb package of d 2.0,
but now my
code won't compile:
unlogcat.d(112): Error: std.stream.File at
/usr/include/d/dmd/phobos/std/stream.d(1787) conflicts with
std.stdio.File at
/usr/
I'm getting a little confused. I've installed a .deb package of d 2.0, but now
my
code won't compile:
unlogcat.d(112): Error: std.stream.File at
/usr/include/d/dmd/phobos/std/stream.d(1787) conflicts with std.stdio.File at
/usr/include/d/dmd/phobos/std/stdio.d(248)
Yet if I leave either out, I g
On Thursday, September 16, 2010 13:16:03 Kagamin wrote:
> Tom Kazimiers Wrote:
> > Hi Graham,
> >
> > On 09/16/2010 04:28 PM, Graham Nicholls wrote:
> > > I'm writing a program to take a file and convert it into a binary
> > > format which matches the format produced by a system which we use. If
Tom Kazimiers Wrote:
> Hi Graham,
>
> On 09/16/2010 04:28 PM, Graham Nicholls wrote:
> > I'm writing a program to take a file and convert it into a binary format
> > which
> > matches the format produced by a system which we use. If I get it right,
> > this
> > will allow me to "replay" the fi
"Graham Nicholls" wrote in message
news:i6t9ig$1ff...@digitalmars.com...
> I'm writing a program to take a file and convert it into a binary format
> which
> matches the format produced by a system which we use. If I get it right,
> this
> will allow me to "replay" the file into the system. H
Graham,
On 09/16/2010 05:02 PM, Graham Nicholls wrote:
> Is this D 1.0 ? I get errors regarding printf - I understood that writeln was
> the
> 2.0 way.
Yes, I think it's D 1.0. For a D 2.0 version I replaced those printf's
with writeln's, too.
Bye,
Tom
Is this D 1.0 ? I get errors regarding printf - I understood that writeln was
the
2.0 way.
Thanks
Thanks. Not sure how I didn't find that - I'm looking now.
Graham
Hi Graham,
On 09/16/2010 04:28 PM, Graham Nicholls wrote:
> I'm writing a program to take a file and convert it into a binary format which
> matches the format produced by a system which we use. If I get it right, this
> will allow me to "replay" the file into the system. However I can't find ho
I'm writing a program to take a file and convert it into a binary format which
matches the format produced by a system which we use. If I get it right, this
will allow me to "replay" the file into the system. However I can't find how
to do I/O in D. I've got the "D Programming Language" and "Tan
Ali Cehreli wrote:
What is the simplest way of using a file?
There are two 'File's in Phobos and they conflict:
1) struct File in std.stdio
2) class File in std.stream
That's crazy.
The one in std.stream.File is definitely what I want to use. What to do?
Import std.stream, create a File o
What is the simplest way of using a file?
There are two 'File's in Phobos and they conflict:
1) struct File in std.stdio
2) class File in std.stream
The one in std.stream.File is definitely what I want to use. What to do?
Prefer using full names in D as in std.stream.File?
Perhaps std.stdio is
28 matches
Mail list logo