Hi,
Request your help, the below code sometime prints duplicate and
some time miss the entry. due to which any code written below the
line "foreach (d; parallel(dFiles[], 1))" are some time
duplicated and some time not executed(skips). tired adding sort
and uniq to the writeln but no luck.
On Friday, 15 September 2017 at 15:48:10 UTC, Stefan Koch wrote:
are you using ucent ?
Not that I know of, the code above is the full code (not sure
what's used internally for string literals).
I was using dmd 2.076 from the apt repo but the error also
happens in LDC 1.3[1].
Is there an
Hi,
I want to list all processes by scanning /proc/. The following
code doesn't work
[code]
foreach (string fstatm; dirEntries("/proc/", "[0-9]*",
SpanMode.shallow)) {
writefln("pid %s", fstatm);
}
[/code]
as it only list a few entries before exiting
[code]
pid /proc/9
pid
On Sunday, 17 September 2017 at 08:32:24 UTC, Ky-Anh Huynh wrote:
My bad. Range doesn't support. The correct pattern is
[code]
foreach (string fstatm; dirEntries("/proc/", "[0123456789]*",
SpanMode.shallow)) {
writefln("pid %s", fstatm);
}
[/code]
Is there a way to make this
On Sunday, 17 September 2017 at 01:50:08 UTC, Nicholas Wilson
wrote:
On Saturday, 16 September 2017 at 21:45:34 UTC, Nordlöw wrote:
How do I temporarily enable -vgc when building my app with DUB?
I've tried
DFLAGS=-vgc /usr/bin/dub build --build=unittest
but it doesn't seem to have any
How can
T[n] asStatic(T, size_t n)(T[n] arr)
{
import std.traits : isCopyable;
static if (isCopyable!T)
{
return arr;
}
else
{
static assert(false, "TODO support forwarding of
uncopyable elements");
}
}
be extended to support uncopyable element
On Sunday, 17 September 2017 at 13:00:04 UTC, Nordlöw wrote:
How can
...
be extended to support uncopyable element types?
That is, when `T` is uncopyable.
On 16-09-17 23:08, Joseph wrote:
On Saturday, 16 September 2017 at 20:54:21 UTC, Mike Wey wrote:
On 16-09-17 20:58, Joseph wrote:
https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestWindow.d
has the code
foreach ( int i, string selection ; fs.getSelections())
{
Hi,
Thanks its price dropped to 10 Euros I bought the the D Web
Development book and I were trying to build some examples.
The example in Chapter3 called noteapp4 is giving me this error :
Performing "debug" build using dmd for x86.
noteapp4 ~master: building configuration "application"...
Hi,
Is it possible to read just the second word from an input string
and skip all others?
"one two three".formattedRead!("%s %s", _, saveme)
The point is I want to skip the first/third word (`one`, `third`)
and read the second word (`two`) into the variable `saveme`. For
now I have to
On Sunday, 17 September 2017 at 08:15:58 UTC, Ky-Anh Huynh wrote:
Hi,
I want to list all processes by scanning /proc/. The following
code doesn't work
[code]
foreach (string fstatm; dirEntries("/proc/", "[0-9]*",
SpanMode.shallow)) {
writefln("pid %s", fstatm);
}
[/code]
as it
On Sunday, 17 September 2017 at 11:42:16 UTC, kerdemdemir wrote:
Hi,
Thanks its price dropped to 10 Euros I bought the the D Web
Development book and I were trying to build some examples.
The example in Chapter3 called noteapp4 is giving me this error
:
[...]
Optlink bug I guess?
try
On Sunday, 17 September 2017 at 13:00:04 UTC, Nordlöw wrote:
How can
T[n] asStatic(T, size_t n)(T[n] arr)
{
import std.traits : isCopyable;
static if (isCopyable!T)
{
return arr;
}
else
{
static assert(false, "TODO support forwarding of
uncopyable
On Sunday, 17 September 2017 at 13:53:26 UTC, Ky-Anh Huynh wrote:
Is it possible to read just the second word from an input
string and skip all others?
"one two three".formattedRead!("%s %s", _, saveme)
---
import std.range;
auto saveme = "one two three".split.array [2];
---
On Sunday, 17 September 2017 at 17:06:10 UTC, bitwise wrote:
I don't really see a way to deal with this aside from branching
the entire library and inserting something like
'FT_SIZE_REQUEST_TYPE__FORCE_INT = 0x' into every enum
incase the devs used it in a struct.
Just put the burden
On Saturday, 16 September 2017 at 12:34:58 UTC, nkm1 wrote:
On Saturday, 16 September 2017 at 03:06:24 UTC, Timothy Foster
wrote:
[...]
[...]
So it appears I'm screwed then.
Example:
typedef enum FT_Size_Request_Type_
{
FT_SIZE_REQUEST_TYPE_NOMINAL,
FT_SIZE_REQUEST_TYPE_REAL_DIM,
struct Test{
@property int value(){
writeln("property value : ", _value);
return _value;
}
int _value;
Test opIndex( string index )
{
writeln( "opIndex : index : ", index );
return this;
}
Test opIndexAssign(int value, string index )
On Sunday, 17 September 2017 at 19:16:06 UTC, bitwise wrote:
On Sunday, 17 September 2017 at 18:44:47 UTC, nkm1 wrote:
On Sunday, 17 September 2017 at 17:06:10 UTC, bitwise wrote:
[...]
Just put the burden on the users then. It's implementation
defined, so they are in position to figure it
On Sunday, 17 September 2017 at 18:44:47 UTC, nkm1 wrote:
On Sunday, 17 September 2017 at 17:06:10 UTC, bitwise wrote:
[...]
Just put the burden on the users then. It's implementation
defined, so they are in position to figure it out...
This isn't something that can really be done with
How do you write a pauseable Thread?
Thanks.
On Wednesday, 13 September 2017 at 14:40:55 UTC, Nathan S. wrote:
Is there a formal description of "hoist-load", "hoist-store",
"sink-load", and "sink-store" as used in
core.atomic.MemoryOrder
(https://dlang.org/library/core/atomic/memory_order.html)?
You can read this:
On Sunday, 17 September 2017 at 19:57:05 UTC, Enjoys Math wrote:
How do you write a pauseable Thread?
Thanks.
This seems to work:
module data_rates_thread;
import core.thread;
import std.datetime;
class DataRatesThread : Thread
{
private:
uint loopSleep;
bool paused;
Hi,
I have a class `Image`, and I have a function called
`getSubImage(Rect bounds)`. What I can't figure out is how to get
the result of `getSubImage()` to take on the constness of the
backing image.
ie.
//The Image class is really just a view over a buffer that's
managed elsewhere
Hey everyone,
I wanted to make a version of SQlite3 that uses Derelict to load
the sqlite3 DLL when I'm ready. I can't find any instructions for
how to make a basic Derelict style library. I looked around at
http://derelictorg.github.io/, but could not find anything. Does
anyone have any?
On Friday, 15 September 2017 at 04:01:13 UTC, Timothy Foster
wrote:
I've been calling it like so:
ErrorFMOD(FMOD_System_Create(), "Error Creating System:
");
Making the calls without my helper function doesn't cause an
Access Violation.
Calling it like this is the only thing that seems to
On Sunday, 17 September 2017 at 21:18:08 UTC, David Zhang wrote:
Hi,
I have a class `Image`, and I have a function called
`getSubImage(Rect bounds)`. What I can't figure out is how to
get the result of `getSubImage()` to take on the constness of
the backing image.
ie.
//The Image
Nevermind! I rediscovered the `inout`attribute.
Though if I may say so, I have no idea how `inout` is supposed to
indicate "whatever the constness of a".
On Monday, 18 September 2017 at 02:04:49 UTC, bitwise wrote:
On Monday, 18 September 2017 at 00:12:49 UTC, Mike Parker wrote:
On Sunday, 17 September 2017 at 19:16:06 UTC, bitwise wrote:
[...]
I've been maintaining bindings to multiple C libraries
(including Freetype 2 bindings) for 13
On Monday, 18 September 2017 at 00:21:23 UTC, Mike Parker wrote:
See the D wiki for links to articles that show how to translate
C headers.
I've been reading the DerelictSDL2 source code. I think I have a
handle on it. I'll have to look more at the wiki too.
Thanks.
On 9/17/17 5:37 PM, David Zhang wrote:
Nevermind! I rediscovered the `inout`attribute.
Correct, inout applied to the function is actually applying to the
'this' parameter. Same as const or immutable functions as well.
Though if I may say so, I have no idea how `inout` is supposed to
On Sunday, 17 September 2017 at 21:15:08 UTC, Matt Jones wrote:
Hey everyone,
I wanted to make a version of SQlite3 that uses Derelict to
load the sqlite3 DLL when I'm ready. I can't find any
instructions for how to make a basic Derelict style library. I
looked around at
On Monday, 18 September 2017 at 00:12:49 UTC, Mike Parker wrote:
On Sunday, 17 September 2017 at 19:16:06 UTC, bitwise wrote:
[...]
I've been maintaining bindings to multiple C libraries
(including Freetype 2 bindings) for 13 years now. I have never
encountered an issue with an enum size
32 matches
Mail list logo