Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread silvioprog
On Thu, Jan 26, 2017 at 11:52 PM, fredvs wrote: > Hello Silvio: > > Yes, we are on the good way. > Awesome. :-) > Following your advice, here from https-url-opus the result of : > > var > BufferURL: tbytes; > > setlength(BufferURL, PipeBufferSize); > CreatePipeHandles(InHandle, OutHandle

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread fredvs
Hello Silvio: Yes, we are on the good way. Following your advice, here from https-url-opus the result of : var BufferURL: tbytes; setlength(BufferURL, PipeBufferSize); CreatePipeHandles(InHandle, OutHandle, PipeBufferSize); InPipe := TInputPipeStream.Create(InHandle); OutPipe := TOutpu

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread fredvs
Thanks Silvio, I will try it tonight. Write you later. Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435p5727457.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread silvioprog
On Thu, Jan 26, 2017 at 8:20 PM, fredvs wrote: > Hello. > > Some news from the front: > > var > BufferURL : array of float; > > . > > PipeBufferSize := $4000 ; > > CreatePipeHandles(InHandle, OutHandle, PipeBufferSize); > > InPipe := TInputPipeStream.Create(InHandle); > OutPipe := TOutputPipe

[fpc-pascal] Any use notes for javapp

2017-01-26 Thread Jon Foster
So does anyone have any hints, tips, use notes, instructions, ... for how to use the "javapp" tool? - Jon -- Jon Foster JF Possibilities, Inc. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/li

Re: [fpc-pascal] ppcjvm issues

2017-01-26 Thread Jon Foster
On 01/26/2017 01:30 PM, Jon Foster wrote: On 01/18/2017 01:16 AM, Michael Schnell wrote: On 17.01.2017 19:07, Lars wrote: If you have a jvm project with lots of code and now want to start using this code in another regular mode objfpc unix/win32 application... Exactly this as the point I wanted

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread fredvs
Hello. Some news from the front: var BufferURL : array of float; . PipeBufferSize := $4000 ; CreatePipeHandles(InHandle, OutHandle, PipeBufferSize); InPipe := TInputPipeStream.Create(InHandle); OutPipe := TOutputPipeStream.Create(OutHandle); httpget := TThreadHttpGetter.Create(opus_ur

Re: [fpc-pascal] ppcjvm issues

2017-01-26 Thread Jon Foster
On 01/18/2017 01:16 AM, Michael Schnell wrote: On 17.01.2017 19:07, Lars wrote: If you have a jvm project with lots of code and now want to start using this code in another regular mode objfpc unix/win32 application... Exactly this as the point I wanted to express. Even when coding an fpc appli

Re: [fpc-pascal] JSON parser error due to my data values.

2017-01-26 Thread Graeme Geldenhuys
On 2017-01-26 14:31, geneb wrote: > Does it work if you try "d:\\data"? Yes. My problem was I didn't realise the JSON standard supports escaped sequences. My program is only reading from the JSON file at this point, not writing. The JSON file is manually created with a text editor. So to be on t

Re: [fpc-pascal] TProcess vs RunProcess()

2017-01-26 Thread Graeme Geldenhuys
On 2017-01-26 14:28, Michael Van Canneyt wrote: > These things cannot be done with RunProcess. > That's one-shot and wait till it exits. Perfect and very handy to know the difference. Thanks for the explanation. Regards, Graeme ___ fpc-pascal mail

Re: [fpc-pascal] JSON parser error due to my data values.

2017-01-26 Thread geneb
On Thu, 26 Jan 2017, Graeme Geldenhuys wrote: It seems like it is trying to interpret the field data value like a C/C++ escape sequence. eg: \n meaning NewLine I such escape sequence processing a JSON standard? Does it work if you try "d:\\data"? g. -- Proud owner of F-15C 80-0007 http://

Re: [fpc-pascal] TProcess vs RunProcess()

2017-01-26 Thread Michael Van Canneyt
On Thu, 26 Jan 2017, Graeme Geldenhuys wrote: Hi, Whats the differences or pros and cons between using TProcess vs RunProcess(). TProcess gives you full access to the process. You can kill it, pause it, write to stdin, read from stdout. These things cannot be done with RunProcess. That's

[fpc-pascal] TProcess vs RunProcess()

2017-01-26 Thread Graeme Geldenhuys
Hi, Whats the differences or pros and cons between using TProcess vs RunProcess(). Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp __

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread fredvs
> didn't understand the software structure / problem behind the C-> > Pascal translation Huh, IMO, the translation is ok. The problem is that the method ask for a memory buffer and I give a pipe. > but for me named pipes work very well for many kinds of interprocess > communication. Yes, for ex

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread greim
Hello Fred, I didn't understand the software structure / problem behind the C-> Pascal translation, but for me named pipes work very well for many kinds of interprocess communication. Markus Am 25.01.2017 um 23:13 schrieb fredvs: Hello In a C method: OP_WARN_UNUSED_RESULT OggOpusFile

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread fredvs
Thanks Michael. OK, I know the way, I will try it (but code example is very welcome). Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435p5727444.html Sent from the Free Pascal - General mailing list arc

Re: [fpc-pascal] JSON parser error due to my data values.

2017-01-26 Thread Graeme Geldenhuys
On 2017-01-26 10:56, Karoly Balogh (Charlie/SGR) wrote: >> Is such escape sequence processing a JSON standard? > > Yes. See: > http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf Ah, thanks for confirming that. I see now the relevant JSON standards information regarding a s

Re: [fpc-pascal] JSON parser error due to my data values.

2017-01-26 Thread Graeme Geldenhuys
On 2017-01-26 10:54, Graeme Geldenhuys wrote: > So it seems the FPC JSON parser doesn't like DOS\Windows paths as data > values. I guess the alternative (in case \ is supposed to be interpreted as an escape sequence) is to store my DOS\Windows paths with forward slashes like UNIX, then use SetDirS

Re: [fpc-pascal] JSON parser error due to my data values.

2017-01-26 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 26 Jan 2017, Graeme Geldenhuys wrote: > It seems like it is trying to interpret the field data value like a > C/C++ escape sequence. eg: \n meaning NewLine > > I such escape sequence processing a JSON standard? Yes. See: http://www.ecma-international.org/publications/files/ECMA-ST/EC

Re: [fpc-pascal] JSON parser error due to my data values.

2017-01-26 Thread Graeme Geldenhuys
Just to be clear regarding the problem. If I change my JSON file so the data values reads... "d:/data" instead of the original: "d:\data" ...then FPC's JSON parser has no problem. So it seems the FPC JSON parser doesn't like DOS\Windows paths as data values. Surely any JSON parser shouldn'

[fpc-pascal] JSON parser error due to my data values.

2017-01-26 Thread Graeme Geldenhuys
Hi, I have the following snippet in a JSON file. "Settings": { "SQLDir": "d:\data" } When I load the complete JSON file using FPC's jsonparser.pp unit I get a parser error. "Invalid character at line 6, pos 16: 'd'