Re: [fpc-pascal] Delphi compatible anonymous functions
On 15.05.2014 07:05, Craig Peterson wrote: Hi all, What's the current state of FPC's anonymous functions/closures support? Is anyone working on it? Is it something that a bounty would help with? As Michal said, someone was working on that, but I didn't hear anything from him in the past year or so... maybe when I find the time and have some other topics removed from my list I'll look into reintegrating and finishing what he has begun... Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Delphi compatible anonymous functions
Hey Craig, I've been experimenting with anonymous functions in FPC and have working code, but they're not at all like what Delphi provides: https://github.com/tangentstorm/tangentlabs/blob/master/pascal/funops.pas (On the other hand, they require 0 compiler changes...) I asked about lambdas in the IRC channel a few months back, and Sven told me someone had started work on anonymous methods sometime in the past, but the work sort of stalled out. If you're interested in funding this and nobody else pipes up, I'm interested in implementing it. It's something I've been wanting to do anyway, but I just haven't had the time/energy to dig into the FPC internals. On Thu, May 15, 2014 at 12:05 AM, Craig Peterson wrote: > Hi all, > > What's the current state of FPC's anonymous functions/closures support? > Is anyone working on it? Is it something that a bounty would help with? > > Thanks, > Craig Peterson > Scooter Software > ___ > 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
[fpc-pascal] Delphi compatible anonymous functions
Hi all, What's the current state of FPC's anonymous functions/closures support? Is anyone working on it? Is it something that a bounty would help with? Thanks, Craig Peterson Scooter Software ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
2014-05-14 14:05 GMT-03:00 silvioprog : > 2014-05-14 12:33 GMT-03:00 Michael Schnell : > > On 05/14/2014 04:50 PM, silvioprog wrote: >> >>> >>> >>> Well, you can learn (via demos, issues, lists etc.) about the project >>> and write about it. :) >>> >>> Right now I am just a potential user(or in fact just collecting >> information about a lot of stuff to provide to potential user in the >> company) > > [...] > > As we say here in Brazil: "Show de bola!" = "Awesome!" :) > > Feel free to change any file of website, README etc.! (Y) > Seems good add a page "Why use Brook?" like: http://lazarus.freepascal.org/index.php?page=whyuse -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] EventLog and error "No member is provided to access property"
On Tue, 13 May 2014, silvioprog wrote: Hello, I'm trying to set a own instance in EventLog property of all apps like TCustomHttpApplication, TCustomCGIApplication and TCustomFCGIApplication, but, no success. To get the error, try: I have done this differently. The eventlog instance is owned by the application, so it should not be directly settable. I created a protected virtual method CreateEventLog that must return a configured TEventLog descendent instance. You can override this method and return whatever you want, as long as it descends from TEventLog. Revision 27790. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
2014-05-14 12:33 GMT-03:00 Michael Schnell : > On 05/14/2014 04:50 PM, silvioprog wrote: > >> >> >> Well, you can learn (via demos, issues, lists etc.) about the project and >> write about it. :) >> >> Right now I am just a potential user(or in fact just collecting > information about a lot of stuff to provide to potential user in the > company) [...] As we say here in Brazil: "Show de bola!" = "Awesome!" :) Feel free to change any file of website, README etc.! (Y) -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
2014-05-14 12:31 GMT-03:00 Michael Schnell : > So we already do have some Information very worth stating on the website > :-) And we can change the HTMLs of website. :) https://github.com/silvioprog/brookframework/tree/gh-pages -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On 05/14/2014 04:50 PM, silvioprog wrote: Well, you can learn (via demos, issues, lists etc.) about the project and write about it. :) Right now I am just a potential user(or in fact just collecting information about a lot of stuff to provide to potential user in the company) -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
So we already do have some Information very worth stating on the website :-) -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On Wed, 14 May 2014, Michael Schnell wrote: On 05/14/2014 04:33 PM, Michael Van Canneyt wrote: To my knowledge, there are none in FPC/Lazarus. I at least know fpWeb to be an active project (ExtPascal seems to be dead) Unless I missed somthing, fpWeb is fcl-web. Brook runs on top of fcl-web. It extends fcl-web. What might be usable: http://stackoverflow.com/questions/3793112/what-web-application-framework-for-delphi-is-recommended Of these, ExtPascal is dead, Raudus support is flaky, and only Habari is actually expected to run with FPC/Lazarus. Unless something changed significantly since I last looked, obviously. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On Wed, 14 May 2014, Michael Schnell wrote: On 05/14/2014 04:37 PM, silvioprog wrote: You can run Brook in four modes: . CGI (with any HTTP server like Apache, nginx etc.); . FastCGI (with any HTTP server like); . Stand alone (with embedded server); . Stand alone service/daemon (with embedded daemon server). AFAIK, FCGI can work via TCP/IP (on the same or on another box) and via other means (Pipes, environment variables ), when being started by the Web server. Is this relevant for Brook ? No. Can Brook be started as an Apache module ? Yes. Can Brook be used as an ISAPI dll by MS IIS ? No. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
2014-05-14 11:46 GMT-03:00 Michael Schnell : > On 05/14/2014 04:33 PM, silvioprog wrote: > >> . I did not because my English is still not fluent. >> > I see the problem. > > I can only understand German and English :-( Well, you can learn (via demos, issues, lists etc.) about the project and write about it. :) -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
2014-05-14 11:40 GMT-03:00 Michael Schnell : > On 05/14/2014 04:33 PM, Michael Van Canneyt wrote: > >> >> To my knowledge, there are none in FPC/Lazarus. >> >> I at least know fpWeb to be an active project (ExtPascal seems to be > dead) > > What might be usable: > > http://stackoverflow.com/questions/3793112/what-web- > application-framework-for-delphi-is-recommended > You can use Brook without problems too, it is made with FCLWeb. -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On 05/14/2014 04:33 PM, silvioprog wrote: . I did not because my English is still not fluent. I see the problem. I can only understand German and English :-( -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On 05/14/2014 04:37 PM, silvioprog wrote: You can run Brook in four modes: . CGI (with any HTTP server like Apache, nginx etc.); . FastCGI (with any HTTP server like); . Stand alone (with embedded server); . Stand alone service/daemon (with embedded daemon server). AFAIK, FCGI can work via TCP/IP (on the same or on another box) and via other means (Pipes, environment variables ), when being started by the Web server. Is this relevant for Brook ? Can Brook be started as an Apache module ? Can Brook be used as an ISAPI dll by MS IIS ? -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On 05/14/2014 04:33 PM, Michael Van Canneyt wrote: To my knowledge, there are none in FPC/Lazarus. I at least know fpWeb to be an active project (ExtPascal seems to be dead) What might be usable: http://stackoverflow.com/questions/3793112/what-web-application-framework-for-delphi-is-recommended -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
2014-05-14 11:03 GMT-03:00 Michael Schnell : > On 05/14/2014 03:56 PM, silvioprog wrote: > >> >> >> http://silvioprog.github.io/brookframework/ >> >> >> Of course I did find this already by checking your initial post. > > But this did not help much for finding out what kinds of tasks the "brook" > is really useful for. > > -Michael There are examples showing some features. But documents about this would be welcome. You can contribute writing documents. I did not because my English is still not fluent. -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
2014-05-14 11:20 GMT-03:00 Rainer Stratmann : > On Wednesday 14 May 2014 16:14:32 you wrote: > > On Wed, 14 May 2014, Michael Schnell wrote: > > > On 05/14/2014 03:56 PM, silvioprog wrote: > > >> http://silvioprog.github.io/brookframework/ > > > > > > Of course I did find this already by checking your initial post. > > > > > > But this did not help much for finding out what kinds of tasks the > > > "brook" is really useful for. > > > > Developing any web based application. > > Is an additional program required, for example Apache? > Or does it run without any additional programs? You can run Brook in four modes: . CGI (with any HTTP server like Apache, nginx etc.); . FastCGI (with any HTTP server like); . Stand alone (with embedded server); . Stand alone service/daemon (with embedded daemon server). -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On 05/14/2014 04:33 PM, Michael Van Canneyt wrote: That is true, but is often omitted in young Open Source projects. Rather often, a decent place to publish such a list is missing. Here obviously a decent website is provided For a start, some 20 Lines of text would already be helpful. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On Wed, 14 May 2014, Rainer Stratmann wrote: On Wednesday 14 May 2014 16:14:32 you wrote: On Wed, 14 May 2014, Michael Schnell wrote: On 05/14/2014 03:56 PM, silvioprog wrote: http://silvioprog.github.io/brookframework/ Of course I did find this already by checking your initial post. But this did not help much for finding out what kinds of tasks the "brook" is really useful for. Developing any web based application. Is an additional program required, for example Apache? Or does it run without any additional programs? Both approaches should be possible. Brook (last I looked) is based on fcl-web, which means you can embed it in a cgi, fastcgi, apache module or standalone application that acts as a webserver. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On Wed, 14 May 2014, Michael Schnell wrote: On 05/14/2014 04:14 PM, Michael Van Canneyt wrote: Developing any web based application. That would mean all other web frameworks are not worth looking at. To my knowledge, there are none in FPC/Lazarus. I suppose each of them should provide a feature / benefit list so that a user is enabled to decide which of them is most appropriate for his task. That is true, but is often omitted in young Open Source projects. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On Wednesday 14 May 2014 16:14:32 you wrote: > On Wed, 14 May 2014, Michael Schnell wrote: > > On 05/14/2014 03:56 PM, silvioprog wrote: > >> http://silvioprog.github.io/brookframework/ > > > > Of course I did find this already by checking your initial post. > > > > But this did not help much for finding out what kinds of tasks the > > "brook" is really useful for. > > Developing any web based application. Is an additional program required, for example Apache? Or does it run without any additional programs? > 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] [ANN] Brook 3.0.0 release!
On 05/14/2014 04:14 PM, Michael Van Canneyt wrote: Developing any web based application. That would mean all other web frameworks are not worth looking at. I suppose each of them should provide a feature / benefit list so that a user is enabled to decide which of them is most appropriate for his task. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On Wed, 14 May 2014, Michael Schnell wrote: On 05/14/2014 03:56 PM, silvioprog wrote: http://silvioprog.github.io/brookframework/ Of course I did find this already by checking your initial post. But this did not help much for finding out what kinds of tasks the "brook" is really useful for. Developing any web based application. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
On 05/14/2014 03:56 PM, silvioprog wrote: http://silvioprog.github.io/brookframework/ Of course I did find this already by checking your initial post. But this did not help much for finding out what kinds of tasks the "brook" is really useful for. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
2014-05-14 6:52 GMT-03:00 Rainer Stratmann : > Is there a description what Brook can do and what it not can do? > > Is a webserver for example Apache needed for it? > > Or can it run standalone? See "Get started" on home page: http://silvioprog.github.io/brookframework/ -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCGI MultiThreaded
On 05/14/2014 02:12 PM, Michael Van Canneyt wrote: Presumably we can expect a result by the year 2046 ? ;) Getting Off-Topic. In fact I would like to have somebody else take a look at the code before I ask how to implement it in the LCL as a "WidgetType" activated by setting the project variable "WidgetType" to "ActiveNoGui" (and by selecting the Project type ActiveNoGui when doing a New->Project). Here is what I have and have tested to seemingly decently work (in X86 32 Bit Linux): - A TApplication class based TCustomApplication in the RTL - A TCustomForm class (independent form but compatible with the TCustomForm implementations for the different Widget Types LCL) - A TTimer class (independent form but compatible with the TTimer implementations for the different Widget Types LCL) A testing project that consists of: - An lpr file done in the same way as an lpr file for any Lazarus "Application" - A unit that holds a TForm descendant (class and implementation) with the testing code for two TTimers and a TThread. The timers and TThread.Queue work as expected. The file "interfaces.pas" for this WidgetType, that holds the code for TApplication, TCustomForm and TTimer is just some 300 Lines, as it was not necessary to implement an Event Queue. Just using the queue the RTL provides is enough. Todo: Application.QueueAsyncCall (supposedly no problem, I know how to do that). Do we need an emulation for PostMessage ? What else ? Thanks for listening, -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCGI MultiThreaded
On Wed, 14 May 2014, Michael Schnell wrote: I think I now have something that might be worth testing... Presumably we can expect a result by the year 2046 ? ;) Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCGI MultiThreaded
I think I now have something that might be worth testing... -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Currency constant wrongly stored in generated EXE?
Lets restate the hole thing, considering unit ncon.pas and pexpr.pas units in FPC 2.6.4 compiler. 1° It is not possible, without using some ad hoc adjustements, to have always an EXACT CURRENCY stored in a DOUBLE or EXTENDED because Double or Extended being expressed as Sign*2^exp*Base2(n). Just start with 0.1 to see what I mean. Yes I understand it 2° trealconstnode class stores the currency_literal value to value_real (type bestreal) then converts it to value_currency either in the trealconstnode.create or sets it in pexpr.pas function factor(getaddr,typeonly:boolean) : tnode; just after {$ifdef FPC_HAS_STR_CURRENCY} 3° c:=92233720368547; // The original problem multiple operations involve *1 (OK per see) and /1 (not so good) while parsing the constant to bestreal type before generating .EXE code. (bestreal is Extended on Intel I386 and Up and Double on ARM). 4° The compiler will not compain about Currency_Value:=0.9 whereas the max decimal precision is 0. for decimal part. 5° What I found is that only + or - operations on Currency's giving a Currency will be generated with plain Int64 addition and subtractions. Now what ? It would be interesting that someone who has an ARM based machine/compiler do some testing. Since currency is a very good type for accounting, you know Sum(Assets)-Sum(Liabilities)=Sum(Incomes)-Sum(Costs) -> hopefully benefit and exact, some workarounds must be found. A basic way to circumvent the risks when absolutly necessary would be something like what is decribed next, not very Pascal clean I must admit : - Insure that the compiler will not see a literal currency when assigning or calculating a precise value containing a literal currency value. so short example, look at the ASM code generated. var c: currency; lInt64:Int64 absolute c; // Avoid use of Currency begin c:=0.9; // Accepted by the compiler ... and rounded to 1 c:=0.99986; // Accepted by the compiler ... and rounded to 0. c:=0.99984; // Accepted by the compiler ... and rounded to 0.9998 { The easy way but uses the FPU } c:=92233720368547; // <- that might be wrongly evaluated by the Compiler (FPU usage) but nothing will be visible in the generated ASM regarding FPU evaluation, except in your case, an invalid HEX value c:=c+0.01; // <- uses FPU writeln('c+0.01 with FPU=', c); { Clumsy but no FPU usage while compiling and executing } lInt64:=92233720368547; // <- You can test but my bet is that it probably always correctly evaluated by the compiler lInt64:=lInt64+100; // Equivalent to c:=c+0.01 writeln('c+0.01 indirect no FPU=', c); readln; end; Your subject has been interesting and I'll be careful now with rounding and Currency. :-) Thanks Bruno for your detailed insight For now I lost patience and have reinstalled Win98 on same computer (same CPU) I have again reinstalled Lazarus 1.2.2 + FPC 2.6.4 And recompile test application again. Now are results correct !!! So culprit was not OS nor CPU but something else has to be wrong. I will carefully install other applications and check if problem will again appears. For now I have no idea what has confused FPC to generate wrong binary representation of mentioned currency value. -Laco. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [ANN] Brook 3.0.0 release!
Is there a description what Brook can do and what it not can do? Is a webserver for example Apache needed for it? Or can it run standalone? On Wednesday 14 May 2014 01:13:41 you wrote: > The Brook team is glad to announce the release 3.0.0. > > This version was compiled and tested successfully with Free Pascal 2.6.4. > Here is the list of changes between version 2.6.4 and 3.0.0 of the Brook: > > https://github.com/silvioprog/brookframework/compare/57f8e01868dbec9708129b > c789940df2a93c1637...v3.0.0 (or > short URL here:http://goo.gl/kr9oX0) > > The release is available for download on Github: > > https://github.com/silvioprog/brookframework/releases/tag/v3.0.0 > > Or through the "Latest Release" button on the project home page: > > http://silvioprog.github.io/brookframework/ > > Minimum requirements: > > Free Pascal 2.6.4. If you prefer the Lazarus interface, choose the 1.2.2 > version. > > Enjoy! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal