On Friday, 1 September 2017 at 04:43:29 UTC, Ali Çehreli wrote:
On 08/31/2017 06:59 PM, Brian wrote:
> Hello, I am trying to get the most trivial example of
multithreading
> working, but can't seem to figure it out.
> I want to split a task across threads, and wait for all those
tasks to
> finish
On 08/31/2017 06:59 PM, Brian wrote:
> Hello, I am trying to get the most trivial example of multithreading
> working, but can't seem to figure it out.
> I want to split a task across threads, and wait for all those tasks to
> finish before moving to the next line of code.
>
> The following 2 atte
On Friday, 1 September 2017 at 01:59:07 UTC, Brian wrote:
Hello, I am trying to get the most trivial example of
multithreading working, but can't seem to figure it out.
I want to split a task across threads, and wait for all those
tasks to finish before moving to the next line of code.
The fol
Hello, I am trying to get the most trivial example of
multithreading working, but can't seem to figure it out.
I want to split a task across threads, and wait for all those
tasks to finish before moving to the next line of code.
The following 2 attempts have failed :
--
On Thu, Aug 31, 2017 at 05:37:20PM -0600, Jonathan M Davis via
Digitalmars-d-learn wrote:
> On Thursday, August 31, 2017 14:09:55 H. S. Teoh via Digitalmars-d-learn
[...]
> I know. We've had this argument before.
I know. Let's not rehash that. :-)
[...]
> Even copying ranges in generic code do
On Thursday, August 31, 2017 23:23:17 Vino via Digitalmars-d-learn wrote:
> On Thursday, 31 August 2017 at 21:59:22 UTC, vino wrote:
> > Hi All,
> >
> > Can you help me what is wrong in the below program, as the
> >
> > output is empty.
> >
> > import std.stdio, std.path;
> >
> > void main ()
> >
On Thursday, August 31, 2017 14:09:55 H. S. Teoh via Digitalmars-d-learn
wrote:
> On Thu, Aug 31, 2017 at 01:34:39PM -0600, Jonathan M Davis via
> Digitalmars-d-learn wrote: [...]
>
> > In general, byLine does not work with other range-based algorithms
> > precisely because it reuses the buffer. I
On Thursday, 31 August 2017 at 21:59:22 UTC, vino wrote:
Hi All,
Can you help me what is wrong in the below program, as the
output is empty.
import std.stdio, std.path;
void main ()
{
version (Windows)
{
auto Path = `C:\#Users\Admin\Desktop\Script\Test1`;
if(!Path.isValidPath) { writeln("P
Generally one has to use a switch to map dynamic components.
Given a set X and Y one can form a switch to map X to Y:
switch(X)
{
case x1 : y1; break;
case x1 : y1;
}
Is there any easier way to do this where one simply specifies the
set's rather than having to create a switch dir
On Thursday, 31 August 2017 at 21:59:22 UTC, vino wrote:
Hi All,
Can you help me what is wrong in the below program, as the
output is empty.
import std.stdio, std.path;
void main ()
{
version (Windows)
{
auto Path = `C:\#Users\Admin\Desktop\Script\Test1`;
if(!Path.isValidPath) { writeln("P
Hi All,
Can you help me what is wrong in the below program, as the
output is empty.
import std.stdio, std.path;
void main ()
{
version (Windows)
{
auto Path = `C:\#Users\Admin\Desktop\Script\Test1`;
if(!Path.isValidPath) { writeln("Path Not Valid");}
}
}
From,
Vino.B
On Thursday, 31 August 2017 at 15:48:31 UTC, Rene Zwanenburg
wrote:
On Thursday, 31 August 2017 at 14:44:07 UTC, vino wrote:
Hi All,
Can some provide me a example of how to remove all blank
lines from a file.
From,
Vino.B
This one doesn't read the entire file into memory:
import std.std
On Thu, Aug 31, 2017 at 01:34:39PM -0600, Jonathan M Davis via
Digitalmars-d-learn wrote:
[...]
> In general, byLine does not work with other range-based algorithms
> precisely because it reuses the buffer. I think that it does manage to
> work for some, but IMHO, it should have just supported for
On Thursday, 31 August 2017 at 14:43:39 UTC, Steven Schveighoffer
wrote:
Just a thought, but the "double printing" could be a
misunderstanding. It could be printing Output\nOutput2, but not
getting the 2 out there.
No no, it's four lines instead of three. If we change the lines
to disjoint s
On 8/31/17 12:12 PM, Andre Pany wrote:
Hi,
I have some problems to find out what to use instead of the deprecated
toUTF16 function.
I am calling a shared library written in Delphi.
While this coding is working fine (with german ü)
import std.utf: toUTF16;
wstring ws = toUTF16(s);
BSTR bStr =
On Thursday, August 31, 2017 18:43:40 Jesse Phillips via Digitalmars-d-learn
wrote:
> On Thursday, 31 August 2017 at 18:26:33 UTC, Sergei Degtiarev
>
> wrote:
> > Hi,
> > I tried to create a simple range concatenating several files,
> >
> > something like this:
> > File[] files;
> >
>
On Thu, Aug 31, 2017 at 06:26:33PM +, Sergei Degtiarev via
Digitalmars-d-learn wrote:
[...]
> File[] files;
>
> foreach(ln; joiner(files.map!(a => a.byLine)))
> writeln(ln);
You probably want to use byLineCopy instead.
The problem here is that .byLine ret
On Thursday, 31 August 2017 at 18:26:33 UTC, Sergei Degtiarev
wrote:
Hi,
I tried to create a simple range concatenating several files,
something like this:
File[] files;
foreach(ln; joiner(files.map!(a => a.byLine)))
writeln(ln);
and I see every fi
Hi,
I tried to create a simple range concatenating several files,
something like this:
File[] files;
foreach(ln; joiner(files.map!(a => a.byLine)))
writeln(ln);
and I see every first line of each file is missing.
However, when I do same thing with s
On Thursday, 31 August 2017 at 17:22:51 UTC, Kagamin wrote:
import std.conv;
auto ws=s.to!wstring;
Thank you!
Kind regards
André
import std.conv;
auto ws=s.to!wstring;
Hi,
I have some problems to find out what to use instead of the
deprecated toUTF16 function.
I am calling a shared library written in Delphi.
While this coding is working fine (with german ü)
import std.utf: toUTF16;
wstring ws = toUTF16(s);
BSTR bStr = SysAllocStringLen(ws.ptr, cast(UINT) ws
On Thursday, 31 August 2017 at 15:43:05 UTC, Per Nordlöw wrote:
Which allocator is best suited for allocating tree nodes (all
of equal size around 40-60 bytes in size) in one shot and then
delete them all in one go? My use case is parse trees.
Region Allocator.
On Thursday, 31 August 2017 at 14:44:07 UTC, vino wrote:
Hi All,
Can some provide me a example of how to remove all blank
lines from a file.
From,
Vino.B
This one doesn't read the entire file into memory:
import std.stdio;
import std.array;
import std.algorithm;
import std.uni;
void mai
On Thursday, 31 August 2017 at 10:34:14 UTC, Kagamin wrote:
On Thursday, 31 August 2017 at 00:49:22 UTC, EntangledQuanta
wrote:
I've already implemented a half ass library solution.
It can be improved alot.
Then, by all means, genius!
Which allocator is best suited for allocating tree nodes (all of
equal size around 40-60 bytes in size) in one shot and then
delete them all in one go? My use case is parse trees.
On Thursday, 31 August 2017 at 14:44:07 UTC, vino wrote:
Hi All,
Can some provide me a example of how to remove all blank
lines from a file.
From,
Vino.B
Super verbose, but:
import std.stdio;
import std.file;
import std.algorithm.iteration;
enum inFilename = "in.txt";
enum outFilename =
On Thursday, 31 August 2017 at 14:44:07 UTC, vino wrote:
Hi All,
Can some provide me a example of how to remove all blank
lines from a file.
From,
Vino.B
ubyte[] fileData;
ubyte[] writeThis;
uint lastP;
fileData = readRaw(fileName);
foreach(uint p; ubyte b;fileData)
{
if (b == '\n')
Hi All,
Can some provide me a example of how to remove all blank lines
from a file.
From,
Vino.B
On 8/30/17 9:33 AM, Ivan Kazmenko wrote:
On Wednesday, 30 August 2017 at 13:24:55 UTC, Ivan Kazmenko wrote:
On Wednesday, 30 August 2017 at 10:55:20 UTC, Timothy Foster wrote:
import std.stdio, core.thread;
void main(){
auto thread = new Thread(&func).start;
writeln("Output");
On Wednesday, 30 August 2017 at 13:33:06 UTC, Ivan Kazmenko wrote:
Interesting. As to what to do with it, no idea for now. At
the very least we can issue a bug report, now that at least two
people can reproduce it, so it is unlikely to be
environment-dependent.
Reported: https://issues.dlan
On Thursday, 31 August 2017 at 07:06:26 UTC, Jacob Carlborg wrote:
On 2017-08-29 19:35, Moritz Maxeiner wrote:
void put(T t)
{
if (!store)
{
// Allocate only once for "small" vectors
store = alloc.makeArray!T(8);
if (!store) onO
It's const(int delegate(char))
On Thursday, 31 August 2017 at 00:49:22 UTC, EntangledQuanta
wrote:
I've already implemented a half ass library solution.
It can be improved alot.
On Wednesday, 30 August 2017 at 15:06:12 UTC, Jonathan M Davis
wrote:
[...]
Thank you for the detailed response.
On Thursday, 31 August 2017 at 07:04:13 UTC, Jacob Carlborg wrote:
On 2017-08-31 08:41, Nicholas Wilson wrote:
My project is a library, but I also need to test it and unit
tests won't cut it (external hardware).
How do you set up the dub.json to build the library normally
but when it is invok
On 2017-08-29 19:35, Moritz Maxeiner wrote:
void put(T t)
{
if (!store)
{
// Allocate only once for "small" vectors
store = alloc.makeArray!T(8);
if (!store) onOutOfMemoryError();
}
else if (length == store.leng
On 2017-08-31 08:41, Nicholas Wilson wrote:
My project is a library, but I also need to test it and unit tests won't
cut it (external hardware).
How do you set up the dub.json to build the library normally but when it
is invoked with `dub test` it runs a separate configuration that also
inclu
38 matches
Mail list logo