Re: [fpc-pascal] Adding a array of float in ressource and use it ?
> What are you trying to achieve? Hello and thanks for answer. Huh, I realize that what I ask is stupid. Of course that array of float must be saved into file to be insered as ressource. I want to save a buffer of audio samples (a array of float) and use that saved file as ressource for a other program. That other program will use that ressource that will be converted back into a buffer of audio samples (array of float). That is what I have now and that I envisage to do (but how?). But perhaps, I am open for all, the use a tmemorystream in place of the buffer of audio samples would be easier and will spare a conversion (array of float ---> bytes). Last but not least, does it exist a way to compress a array of float (or the result in bytes). Many thanks. Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Adding-a-array-of-float-in-ressource-and-use-it-tp5727765p5727774.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Feature announcement: Management Operators
2017-02-28 21:50 GMT+01:00 Graeme Geldenhuys: > Records - well, I use them like they were defined > in Delphi 7 and earlier. I really don't see the need for Records with > Methods (ie: TP Objects) and such. > Go with modern times! It's the 21st century now ;-) (For inspiration have e.g. a look at Julia [1] and how they develop incl. syntax changes. - Many discussions/decisions are being done using github issues, here e.g. a quite fundamental keyword change [2, 3]. As you see in this issue, it is often not easy to find *the* good solution, but it's great, how opinions have a place to flow in and can be considered/integrated by the core or other talented devs. - There are branches: people can help but are also told to wait if the timing is not good [4]. - There is a manual, stdlib, devdoc [5] which gets you started quickly and one can easily contribute small things like typos. - A one-stop discourse based forum [6] which is a joy to use and much easier than e.g. the multitude of fpc-maillist, lazarus-forum, newpascal-/mse- -lists. - There's a one-stop binary download location [7] and/or install master from source, just a ~ 'git clone, make install' away (llvm is not as fast as fpc though;). - In general uniform syntax (even with `end` like in pascal:) which doesn't make you guess which style/convention to choose. - Organisations which integrate people interested in a specific subject. e.g. [8]. - Package management is currently a bit 'suboptimal' but a new one is being developed, here the propositions [9] where interested people can give input in the design phase, and later while implementing. --- Of course one cannot and should not compare !!! Julia doesn't have a 25+ year long legacy with many (partly a bit obscure) platforms to conserve and maintain. (It 'stole' the compiler, à la MSElang;-) It has developers which work since ~7 years ~professionally and there is quite some funding and many many contributors. But as a maybe longterm inspiration, why not? Maybe some parts are worth stealing? And, with tool-support, maybe possible to steal?) (Ähem, I digressed a bit from the Delphi 7 record topic... I am sorry (more so, considering I forked from you)) (I agree with what you wrote about 'polluting pascal code'. But what can one do? For me, atm, it is super-important that fpc is very compatible with delphi, e.g. generics (and that they work well). Thus, very grateful to people who contribute such things). [1]: http://julialang.org, [2]: https://github.com/JuliaLang/julia/issues/19157, [3]: https://github.com/JuliaLang/julia/pull/20418, [4]: https://github.com/JuliaLang/julia/pull/20885, [5]: https://github.com/JuliaLang/julia/tree/master/doc/src, [6]: http://discourse.julialang.org/ (discourse has mailling list integration nowadays...), [7]: http://julialang.org/downloads/, [8]: https://github.com/JuliaGPU, [9]: https://github.com/JuliaLang/Juleps/blob/master/Pkg3.md ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Feature announcement: Management Operators
Hi, with a function call: http://bugs.freepascal.org/view.php?id=30333 I had benchmark runs where it spend more time in the initializing function than doing any calculations Best, Benito On 03/04/2017 06:41 PM, Michael Van Canneyt wrote: On Sat, 4 Mar 2017, nore...@z505.com wrote: On 2017-02-28 14:48, Jonas Maebe wrote: On 28/02/17 21:40, nore...@z505.com wrote: What happens with a stack allocated record? (no new() required, nor dispose() so is the record ever initialized/finalized?) Yes, just like records that contain e.g. an ansistring field. Jonas do records which contain ansistring fields have some special stack initialization system (sorry, I should really read the source code in this case - still interested in theory of how this works) Yes. They are initialized. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Feature announcement: Management Operators
On Sat, 4 Mar 2017, nore...@z505.com wrote: On 2017-02-28 14:48, Jonas Maebe wrote: On 28/02/17 21:40, nore...@z505.com wrote: What happens with a stack allocated record? (no new() required, nor dispose() so is the record ever initialized/finalized?) Yes, just like records that contain e.g. an ansistring field. Jonas do records which contain ansistring fields have some special stack initialization system (sorry, I should really read the source code in this case - still interested in theory of how this works) Yes. They are initialized. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Feature announcement: Management Operators
On 2017-02-28 14:48, Jonas Maebe wrote: On 28/02/17 21:40, nore...@z505.com wrote: What happens with a stack allocated record? (no new() required, nor dispose() so is the record ever initialized/finalized?) Yes, just like records that contain e.g. an ansistring field. Jonas do records which contain ansistring fields have some special stack initialization system (sorry, I should really read the source code in this case - still interested in theory of how this works) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Feature announcement: Management Operators
On 2017-02-28 14:50, Graeme Geldenhuys wrote: On 2017-02-28 20:40, nore...@z505.com wrote: Sorry, I've been out of touch with what's happening with Records lately in modern pascal/delphi/etc. Don't worry, I'm with you on that one. All I know is that Borland/CodeGear/EMBT broken TP Objects somewhere in Delphi. Then they decided they want that functionality back, so instead of fixing TP Objects, the decided to butcher Records to act just like TP Objects (well, pretty much)! Go figure. I mostly code with classes, but do still us TP Objects mixed in with my code for simpler data structures where I don't really want to instantiate objects. Records - well, I use them like they were defined in Delphi 7 and earlier. I really don't see the need for Records with Methods (ie: TP Objects) and such. Regards, Graeme There are many cases where I do not want to free and create an object and just use something on the stack instead. TP objects kind of offered a solution to this, but not really, since if you used an old TP object which was designed to be on the heap, but you used in on the stack instead - problems would occur... I'm fond of what Oberon and Golang are doing to try and solve the issue, but, that's garbage collected rather than stack. And in those languages you have to send the self parameter in as your own (there is no hidden self, you create your own self shortform) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Adding a array of float in ressource and use it ?
Am 04.03.2017 16:06 schrieb "fredvs": > > Hello. > > Is it possible to add a array of float into ressource ? > > For example, there is myarray : array of cfloat. > > Is it possible to store that array myarray ressource and, when I want to use > it from ressource, I get also a array of float ? > > In wiki : http://wiki.freepascal.org/Lazarus_Resources tey speak only how to > add files into ressource. No, you can't. Resources are not intended for this. What are you trying to achieve? Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] class operator in record
On 2017-03-01 03:06, Graeme Geldenhuys wrote: On 2017-03-01 02:39, nore...@z505.com wrote: How come: class operator Initialize(var aFoo: TFoo); class operator Finalize(var aFoo: TFoo); in a record are called class operator.. why not "record operator"? hahaha... You are asking all the questions I've been meaning to ask too. From your question, just goes to show how rubbish Delphi is being designed these days. Mixing concepts of class and record interchangeably. And now we have "records" with constructors and destructors! WTF. EMBT/Delphi are seriously polluting the Object Pascal with all this rubbish. Unfortunately FPC feels like they need to follow them like lemmings. I don't blame FPC for following them in some respects because it enables compatible code to be shared between FPC and delphi, but I get what you mean.. Oberon is a fresh new start without all this rubbish but look where oberon is: no where. Almost no one uses it, nor cares about it.. so if fpc does things right and diverges from delphi, you have incompatibility ... But I see what you mean and understand your point ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Adding a array of float in ressource and use it ?
Hello. Is it possible to add a array of float into ressource ? For example, there is myarray : array of cfloat. Is it possible to store that array myarray ressource and, when I want to use it from ressource, I get also a array of float ? In wiki : http://wiki.freepascal.org/Lazarus_Resources tey speak only how to add files into ressource. Thanks. Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Adding-a-array-of-float-in-ressource-and-use-it-tp5727765.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC 3.0.2 released!
On Sat, 04 Mar 2017 09:24:22 +0100, Bo Berglundwrote: >(is there a command switch to just print the version? Found it: $ /home/pi/bin/ppcarm -iW 3.0.2rc1 -- Bo Berglund Developer in Sweden ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC 3.0.2 released!
On Fri, 3 Mar 2017 12:59:23 +, Mark Morgan Lloydwrote: >On 02/03/17 06:00, Bo Berglund wrote: >> On Wed, 1 Mar 2017 22:04:26 +0100, Jonas Maebe wrote: >>> On 01/03/17 21:55, Bo Berglund wrote: >> Am I still supposed to use 2.6.4 as compiler to build 3.0.2? >> I am getting an error about the "seed" compiler when I try to build >> 3.0.2 with a 3.x compiler >>You have to build it with the previous release, i.e. 3.0.0 >The error message I received talked about a requirement for 2.6.4 >But I pointed make towards a 3.0.0 ppcarm and it did the build OK. > >Is this using fpc's -V option? The command I used inside the downloaded 3.0.2 source dir /home/pi/dev/fpc/3.0.2 was: make all OPT=-dFPC_ARMHF This threw the error message. Changed to this and it worked: make all FPC=/home/pi/dev/fpc/ppcarm OPT=-dFPC_ARMHF The /home/pi/dev/fpc/ppcarm is a 3.0.0 version. The one on path is: which ppcarm /home/pi/bin/ppcarm Checked the version (is there a command switch to just print the version?) /home/pi/bin/ppcarm Free Pascal Compiler version 3.0.2rc1 [2017/01/09] for arm So it seems like I used an RC version of the 3.0.2 fpc to build 3.0.2 release, that is probably in error. But the error message did not say I should use 3.0.0, instead it said I should use 2.6.4... -- Bo Berglund Developer in Sweden ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal