Re: Check an entire XML document for well-formedness in KXML

2015-07-08 Thread Gary Willoughby via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 07:30:51 UTC, Sergey wrote: Hello! I try to use KXML and I need very simple: check an entire XML document for well-formedness. How is it better to do? Thanks in advance. Maybe use the command line: $ sudo apt-get install libxml2 $ xmllint --schema schema.xsd

Re: Understanding Safety of Function Pointers vs. Addresses of Functions

2015-07-08 Thread via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 03:31:43 UTC, jmh530 wrote: I'm still not sure why I'm getting the error I mention in the original post. For instance, the code below is giving that Error 42 Symbol Undefined error. Seems very mystifying... import std.math : cos; real foo(T)(T fp, real x) {

Check an entire XML document for well-formedness in KXML

2015-07-08 Thread Sergey via Digitalmars-d-learn
Hello! I try to use KXML and I need very simple: check an entire XML document for well-formedness. How is it better to do? Thanks in advance.

Re: kxml help.

2015-07-08 Thread Sergey via Digitalmars-d-learn
Hello! I try to use KXML and I need very simple: check an entire XML document for well-formedness. How is it better to do? Thanks in advance.

Re: Understanding Safety of Function Pointers vs. Addresses of Functions

2015-07-08 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 11:15:12 UTC, Marc Schütz wrote: It seems std.math.cos is an intrinsic function (i.e. one that the compiler implements when needed, or generates the appropriate asm for): https://github.com/D-Programming-Language/phobos/blob/master/std/math.d#L630 The compiler

Re: Understanding Safety of Function Pointers vs. Addresses of Functions

2015-07-08 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 14:37:23 UTC, jmh530 wrote: Thanks. I was worried I was doing something wrong. It seems like if you wrap the intrinsic function in another function than it works fine (below). Easy enough work-around, I suppose. If there is no intention to fix the pointer to

Re: Understanding Safety of Function Pointers vs. Addresses of Functions

2015-07-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/8/15 11:49 AM, jmh530 wrote: On Wednesday, 8 July 2015 at 14:37:23 UTC, jmh530 wrote: Thanks. I was worried I was doing something wrong. It seems like if you wrap the intrinsic function in another function than it works fine (below). Easy enough work-around, I suppose. If there is no

Re: Understanding Safety of Function Pointers vs. Addresses of Functions

2015-07-08 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 18:31:00 UTC, Steven Schveighoffer wrote: You can use a function lambda: auto fp = (real a) = cos(a); Note, I had to put (real a) even though I would have expected a = cos(a) to work. -Steve Interesting. You have to put real because there is also a float and

Re: Which XMM are safe to erase in asm{} blocks?

2015-07-08 Thread ponce via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 05:22:34 UTC, ketmar wrote: On Tue, 07 Jul 2015 12:33:38 +, ponce wrote: Is this secret knowledge? yes. ;-) i believe that there are not so many people doing asm in D, and many of them using write and forget technique (i.e. write and don't touch if it

Re: Array operations with array of structs

2015-07-08 Thread ketmar via Digitalmars-d-learn
On Tue, 07 Jul 2015 11:09:52 +, Peter wrote: Any ideas about what's happening? yes. there is code in arrayop.c that tells: // Built-in array ops should be @trusted, pure, nothrow and nogc StorageClass stc = STCtrusted | STCpure | STCnothrow | STCnogc; under the hoods compiler

How to keep executed shell running after program exits

2015-07-08 Thread tcak via Digitalmars-d-learn
I have written a code to run gnuplot. [code] ... auto script = std.stdio.File(/tmp/waveletscript.gnuplot, w); script.writeln(set term wxt 1; plot '/tmp/wavelet1.dat';); script.writeln(set term wxt 2; plot '/tmp/wavelet2.dat';); script.writeln(set term wxt 3; plot '/tmp/wavelet3.dat';);

Re: Check an entire XML document for well-formedness in KXML

2015-07-08 Thread Sergey via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 12:18:46 UTC, Gary Willoughby wrote: On Wednesday, 8 July 2015 at 07:30:51 UTC, Sergey wrote: Hello! I try to use KXML and I need very simple: check an entire XML document for well-formedness. How is it better to do? Thanks in advance. Maybe use the command