Is there nobody that knows a solution? :(
On Sunday, 2 November 2014 at 00:59:43 UTC, Bauss wrote:
Is there a way to spawn a process that won't be a child
process, because I can't seem to kill any processes created
with spawnProcess() It keeps giving me access denied for the
processes and it's necessary for me to kill a process,
The parent / child relationship always exists.
In POSIX OSs, you may ignore SIGCHLD signal (announcing child
process death), so that in case of child process exit it will not
become zombie, rather it will be disposed on the spot.
As a side note, in Linux, there exist a system call allowing
On 10/31/14 2:38 PM, anonymous wrote:
I have a const(Object)[] and I want a shallow copy of the array.
..dup doesn't do it, which I thought a bug, but according to
Martin Nowak it's by design [1].
std.array.array fails, too. Is there really nothing in phobos for
this?
static import std.array;
I have an example of code like this:
template Node(String)
{
struct Node {}
struct Name {}
struct Attr {}
}
void main()
{
alias MyNode = Node!(string).Node;
alias MyName = Node!(string).Name;
alias MyAttr = Node!(string).Attr;
}
On 11/3/14 6:34 AM, angel wrote:
The parent / child relationship always exists.
In POSIX OSs, you may ignore SIGCHLD signal (announcing child process
death), so that in case of child process exit it will not become zombie,
rather it will be disposed on the spot.
As a side note, in Linux, there
On Monday, 3 November 2014 at 14:07:55 UTC, Uranuz wrote:
I have an example of code like this:
template Node(String)
{
struct Node {}
struct Name {}
struct Attr {}
}
void main()
{
alias MyNode = Node!(string).Node;
alias MyName =
On Monday, 3 November 2014 at 07:46:57 UTC, Jack wrote:
On Monday, 3 November 2014 at 06:51:11 UTC, Dirk wrote:
On Monday, 3 November 2014 at 04:31:40 UTC, Dirk wrote:
On Monday, 3 November 2014 at 03:41:19 UTC, Dirk wrote:
I am wondering if there is any libraries I have missed for
API
If I have a struct with numeric template parameter, how can I
access it within member functions? Like normal member variables?
And how about the constructor?
struct polynomial(uint base)
{
private:
uint[] N;
public:
this(uint x) { base = x; }
...
void add(Polynomial!base P)
{
On Monday, 3 November 2014 at 04:31:40 UTC, Dirk wrote:
I should of mentioned that I have also seen the MadCodeHook
Library bindings, which is great but the MCH library is very
expensive.
Weird, it used to be open source and free.
On Sunday, 2 November 2014 at 23:05:05 UTC, Jack wrote:
On Sunday, 2 November 2014 at 17:39:46 UTC, Gary Willoughby
wrote:
On Sunday, 2 November 2014 at 12:11:23 UTC, Jack wrote:
Whole error is: http://codepad.org/C2l4rUel
That's not the true error. That's dub throwing an exception
when
On Monday, 3 November 2014 at 14:27:47 UTC, Dominikus Dittes
Scherkl wrote:
If I have a struct with numeric template parameter, how can I
access it within member functions? Like normal member
variables? And how about the constructor?
struct polynomial(uint base)
{
private:
uint[] N;
Looks like compiler looks for Node, Name and Attr in Node
struct, because of eponymous thing.
I understand it but I want to know if it is documented behaviour
or not. Could anybody clear what happens with eponymous stuff and
why I can't get acces to *other* declarations inside eponymous
On 11/02/2014 04:10 AM, novice2 wrote:
Hello.
I need write some wrapper around legacy data structure.
May be it should be class. May be structure with methods.
The problem is writing repetitive code for underlying data.
For example:
- code to read length-byte-prefixed string to D string for
On 11/03/2014 06:36 AM, Uranuz wrote:
Looks like compiler looks for Node, Name and Attr in Node struct,
because of eponymous thing.
I understand it but I want to know if it is documented behaviour or not.
Could anybody clear what happens with eponymous stuff and why I can't
get acces to
I think it's the intended behavior. I think documentation is
outdated.
Ali
Thanks. So I will modify my programme to workaround this.
Also I failed to find any documentation about eponymous stuff in
language reference. As far as I remember it was here but now
looks like it is missing.
On Monday, 3 November 2014 at 14:58:03 UTC, Ali Çehreli wrote:
I think it's the intended behavior. I think documentation is
outdated.
Both forms should really work though. I had always thought that
the short form was simply possible if the names matched.
Hi.
Not sure if my code is correct - I wanted to build the simplest
working example of simd use. The following compiles and works
under ldc (I have not disassessembled the result to see if it is
using simd instructions), but generates a compiler error under
dmd (2.066 and 2.067.0-b1 running
On Monday, 3 November 2014 at 14:32:05 UTC, Sean Kelly wrote:
On Monday, 3 November 2014 at 04:31:40 UTC, Dirk wrote:
I should of mentioned that I have also seen the MadCodeHook
Library bindings, which is great but the MCH library is very
expensive.
Weird, it used to be open source and
On 11/3/14 9:07 AM, Uranuz wrote:
I have an example of code like this:
template Node(String)
{
struct Node {}
struct Name {}
struct Attr {}
}
void main()
{
alias MyNode = Node!(string).Node;
alias MyName = Node!(string).Name;
alias MyAttr = Node!(string).Attr;
}
On Monday, 3 November 2014 at 15:33:00 UTC, Laeeth Isharc wrote:
Hi.
Not sure if my code is correct - I wanted to build the simplest
working example of simd use. The following compiles and works
under ldc (I have not disassessembled the result to see if it
is using simd instructions), but
On Monday, 3 November 2014 at 14:09:21 UTC, Steven Schveighoffer
wrote:
From OP's code, he is on Windows.
I believe on Windows you have to sort out some kind of
permissions to terminate a process. No idea if std.process does
this, but it sounds like probably not.
struct Internal { int i; double d; string s; }
struct External_int {
Internal internal;
@property Internal* ptr () { return internal; }
this (int a)
{
internal.s = int;
internal.i = a;
}
}
struct External (T) {
Internal internal;
@property Internal* ptr () {
static if (is(typeof(T) == int))
should be
static if (is(T == int))
T is already a type.
Ahh. Thanks!
On Monday, 3 November 2014 at 17:03:33 UTC, deed wrote:
struct Internal { int i; double d; string s; }
struct External_int {
Internal internal;
@property Internal* ptr () { return internal; }
this (int a)
{
internal.s = int;
internal.i = a;
}
}
struct External (T) {
Hi!
The following code does not correctly handle Unicode strings.
-
import std.stdio;
void main () {
string s;
readf (%s, s);
write (s);
}
-
Example input (Test. in cyrillic):
-
Тест.
-
(hex: D0 A2 D0 B5 D1 81 D1 82 2E 0D 0A)
Example output:
-
On Tuesday, 28 October 2014 at 09:34:33 UTC, Chris wrote:
On Tuesday, 28 October 2014 at 00:16:03 UTC, John McFarlane
wrote:
Hi,
I've written a modest shared library in D that I'd like to
call directly from a Python web server (Linux/OS X, Apache,
WSGI, Pyramid). I can call it reliably from
On Monday, 3 November 2014 at 19:37:20 UTC, Ivan Kazmenko wrote:
readf (%s, s);
Worth noting: this reads to end-of-file (not end-of-line or
whitespace), and reading the whole file into a string was what I
indeed expected it to do.
So, if there is an idiomatic way to read the whole
On 11/03/2014 11:47 AM, Ivan Kazmenko wrote:
On Monday, 3 November 2014 at 19:37:20 UTC, Ivan Kazmenko wrote:
readf (%s, s);
Worth noting: this reads to end-of-file (not end-of-line or whitespace),
and reading the whole file into a string was what I indeed expected it
to do.
So, if there
On Monday, 3 November 2014 at 19:47:17 UTC, Ivan Kazmenko wrote:
So, if there is an idiomatic way to read the whole file into a
string which is Unicode-compatible, it would be great to learn
that, too.
Maybe something like this:
import std.stdio;
import std.array;
import std.conv;
string
On Monday, 3 November 2014 at 06:43:50 UTC, Ali Çehreli wrote:
On 11/02/2014 04:58 PM, bioinfornatics wrote:
Dear,
Some problem to build this code:
http://fpaste.org/147327/75948141/
$ ldc2 fasta_test.d
/usr/include/d/std/range.d(3605): Error: template
std.array.save
cannot deduce
On Mon, Nov 3, 2014 at 3:27 PM, Dominikus Dittes Scherkl via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
If I have a struct with numeric template parameter, how can I access it
within member functions? Like normal member variables? And how about the
constructor?
struct
Reduced testcase:
import core.simd;
void main()
{
short8 vec;
vec=vec*3;
}
I've filed a bug report:
https://issues.dlang.org/show_bug.cgi?id=13674
On Monday, November 03, 2014 21:03:51 bioinfornatics via Digitalmars-d-learn
wrote:
Ok but I do not see why to use save method for a takeOne function
is possible to write this function without to use it
It looks like the idea was that beacause you know that there's only one
element, you can
On Monday, 3 November 2014 at 21:03:51 UTC, bioinfornatics wrote:
On Monday, 3 November 2014 at 06:43:50 UTC, Ali Çehreli wrote:
On 11/02/2014 04:58 PM, bioinfornatics wrote:
Dear,
Some problem to build this code:
http://fpaste.org/147327/75948141/
$ ldc2 fasta_test.d
On Monday, 3 November 2014 at 21:23:50 UTC, Marc Schütz wrote:
Reduced testcase:
import core.simd;
void main()
{
short8 vec;
vec=vec*3;
}
I've filed a bug report:
https://issues.dlang.org/show_bug.cgi?id=13674
Thanks - appreciate it. Laeeth.
On Monday, 3 November 2014 at 14:32:07 UTC, Gary Willoughby wrote:
On Sunday, 2 November 2014 at 23:05:05 UTC, Jack wrote:
On Sunday, 2 November 2014 at 17:39:46 UTC, Gary Willoughby
wrote:
On Sunday, 2 November 2014 at 12:11:23 UTC, Jack wrote:
Whole error is: http://codepad.org/C2l4rUel
Hello !
I could not find a clear way that show how to use template types
as parameter to functions:
There is a general rule to do it ? On several examples when the
return type comes from a template I saw the usage of auto where
the compiler will deduce the correct type but when we need to
One of the problems I'm facing from vibed (but I'm asking a
general rule to help here and in other similar cases):
protected void
sendCollectionListAsDataArrayJson2(MongoCursor!(Bson,Bson,Bson)
collection_list, HTTPServerResponse res)
{
if(!collection_list.empty)
{
On Mon, Nov 03, 2014 at 11:43:42PM +, Domingo via Digitalmars-d-learn wrote:
Hello !
I could not find a clear way that show how to use template types as
parameter to functions:
There is a general rule to do it ? On several examples when the return type
comes from a template I saw the
Dear,
why this code fail to build http://dpaste.dzfl.pl/8ef3898b05d2 ?
I try to have a structure which is used to fill information from
a file.
And I use UDA to tell : to get this field you need to read from x
to y using a delegate.
thanks for your advise
Thanks for the answer !
But then I can see that using D style templates everywhere will
prevent write generic code and what seems to be an innocent
function call will explode to bloated mass of code.
Like the simple function that I tried to write to not duplicate
code is not worth because
On Monday, 3 November 2014 at 23:53:53 UTC, bioinfornatics wrote:
Dear,
why this code fail to build http://dpaste.dzfl.pl/8ef3898b05d2 ?
I try to have a structure which is used to fill information from
a file.
And I use UDA to tell : to get this field you need to read from
x
to y using a
On Tue, Nov 04, 2014 at 12:29:54AM +, Domingo via Digitalmars-d-learn wrote:
[...]
Like the simple function that I tried to write to not duplicate code
is not worth because I'll need to write one for each type of
MongoCursor:
1 - MongoCursor!(Bson, Bson, typeof(null))
2 -
Now I realize that what I said on the previous post is not
correct.
Based on the proposed use of typeof/alias we will need something
like this:
alias MongoCurosr3NUll = MongoCursor!(Bson, Bson, typeof(null));
alias MongoCursor3Bson = MongoCursor!(Bson, Bson, Bson);
alias MongoCursor3IntStr
Thanks again this second explanation now is easier to understand
as general rule for this case and future ones that I'll face in
the future.
I hope that this explanation would be added to the language
reference where it explain functions:
http://dlang.org/function
With it there people will
On Tue, Nov 04, 2014 at 12:48:47AM +, Domingo via Digitalmars-d-learn wrote:
Thanks again this second explanation now is easier to understand as
general rule for this case and future ones that I'll face in the
future.
I hope that this explanation would be added to the language reference
Hi All,
I've just started using kyllingstad/scid but it hasn't been
updated for a while and I just found a fork which references some
GSoC work.
Is SciD is still maintained and which should I use?
https://github.com/kyllingstad/scid
or
https://github.com/cristicbz/scid
Or is there an
Thanks again the bug issue is there at
https://issues.dlang.org/show_bug.cgi?id=13677
But probably I should fork the repository and fix myself !
Here is my pull request
https://github.com/D-Programming-Language/dlang.org/pull/690
Please anyone feel free to improve it.
Cheers !
Is it possible?
As in
{
int a;
a.opUnary!++();
}
no property 'opUnary' for type 'int'
On Tuesday, 4 November 2014 at 07:19:05 UTC, Algo wrote:
Is it possible?
As in
{
int a;
a.opUnary!++();
}
no property 'opUnary' for type 'int'
((ref typeof(a) x) = ++x)(a);
works
On 4/11/2014 8:19 p.m., Algo wrote:
Is it possible?
As in
{
int a;
a.opUnary!++();
}
no property 'opUnary' for type 'int'
For primitives it doesn't look like it.
To confirm this, we'll first figure out what TypeInfo is used for it:
pragma(msg, typeid(int).name);
/d133/f260.d(16):
On Tuesday, 4 November 2014 at 07:49:15 UTC, Rikki Cattermole
wrote:
On 4/11/2014 8:19 p.m., Algo wrote:
Is it possible?
As in
{
int a;
a.opUnary!++();
}
no property 'opUnary' for type 'int'
For primitives it doesn't look like it.
To confirm this, we'll first figure out what
55 matches
Mail list logo