[fpc-pascal] reverse for in loop

2023-07-07 Thread Zamrony P. Juhara via fpc-pascal
I like simplicity for .. in .. loop. but is there equivalent for reverse loop?

Fano Framework
https://fanoframework.github.io___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Illegal expression when redeclare typed constant

2023-03-25 Thread Zamrony P. Juhara via fpc-pascal
Suppose  I have
unit mytest;
interface
const    MY_VALUE = 1;    MY_INT_VALUE: integer = 1;
implementationend.
and second unit

unit mytest2;
interface
uses mytest;
const    // this is legal    MY_VALUE = mytest.MY_VALUE;
    // this  causes illegal expression    // MY_INT_VALUE = 
mytest.MY_INT_VALUE;    // MY_INT_VALUE : integer = mytest.MY_INT_VALUE;
implementationend.

Is there workaround to redeclare typed constant in other unit so that I don't 
need to duplicate code?
Thanks
Zamrony P. Juharahttps://juhara.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Old Mantis issue broken URL redirection

2021-08-03 Thread Zamrony P. Juhara via fpc-pascal
Hi,

URL redirection of old mantis issue to Gitlab  is not working
https://bugs.freepascal.org/view.php?id=[issue id]
redirects to
https://gitlab.com/freepascal.org/fpc/source/-/issues/[issue id]
which yields page not found (404) error.

Regards,
Fano Framework
https://fanoframework.github.io___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Separate release cycle for RTL and compiler proposal

2021-04-18 Thread Zamrony P. Juhara via fpc-pascal
I would like to propose to separate RTL release   from compiler release so that 
RTL bug fixes and features can be released with shorter release cycle.
Is that possible?

Zamrony P. Juharahttps://github.com/zamronypj___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Merging units

2020-10-06 Thread Zamrony P. Juhara via fpc-pascal
I use a secondary unit as alias of all separate units as Marco suggests in
https://github.com/fanoframework/fano/blob/master/src/fano.pas
However I am curious if merging units like this has drawback. AFAIK smart 
linking works.

Sent from Yahoo Mail on Android 
 
  On Sat, Oct 3, 2020 at 3:31, Marco van de Voort via 
fpc-pascal wrote:   
Op 2020-10-02 om 19:55 schreef Ryan Joseph via fpc-pascal:
> Something that's bothered me for a while I wanted to ask about.
>
> I have a package I want to distribute which has 2 or more units, all of which 
> are required to use the package. Technically all the code should be in one 
> file but because units are a nice feature of Pascal we like to keep our code 
> separate when we develop.
>
> Usually what happens is we compromise and do either:
>
> 1) Have the user of the package add all the units to the uses clause of every 
> file which needs it. This is annoying for the user because it bloats the uses 
> section but for the developer our code is nicely separated into units.
>
> 2) Break the units into include files and wrap the interface/implementation 
> blocks in ifdefs. This is nice for the user because they only have a single 
> unit to use but now the developers of the package have to work in what are 
> essentially header files (like in C). The RTL is of course filled with 
> examples like this.

In some cases you can also move types and consts to a secondary unit, 
but alias them in the primary one.

Like e.g. Unixtype (what unit you say? Never heard of it? That is 
because the types are aliased into core units baseunix and unix)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] how to make this tp7 code work on fpc

2020-06-27 Thread Zamrony P. Juhara via fpc-pascal
Use {$MODE TP}

Zamrony P. Juhara
https://v3.juhara.com
https://github.com/zamronypj

Fano Framework
https://fanoframework.github.io

mod_pascal
https://zamronypj.github.io/mod_pascal 
 
  On Sat, Jun 27, 2020 at 14:27, Travis Siegel wrote:   
I'm porting some code from tp7 to fpc, and I'm running into an error I 
don't know how to fix.  The comments claim it's supposed to be a hash 
table, but to me, it looks more like labels tied to various arrays.


   Ofs_00_02: Word = Ofs (Ofs_00_01);
   Tok_00_02: TToken = Token_BEGIN;
   ResWordLen_BEGIN: Byte = 5;
   ResWord_BEGIN: Array [1..5] of Char = 'BEGIN';

   Ofs_00_03: Word = Ofs (Ofs_00_02);
   Tok_00_03: TToken = Token_DIV;
   ResWordLen_DIV: Byte = 3;
   ResWord_DIV: Array [1..3] of Char = 'DIV';

   Ofs_00_04: Word = Ofs (Ofs_00_03);
   Tok_00_04: TToken = Token_NIL;
   ResWordLen_NIL: Byte = 3;
   ResWord_NIL: Array [1..3] of Char = 'NIL';

   Ofs_00_05: Word = Ofs (Ofs_00_04);
   Tok_00_05: TToken = Token_PROCEDURE;
   ResWordLen_PROCEDURE: Byte = 9;
   ResWord_PROCEDURE: Array [1..9] of Char = 'PROCEDURE';

Fpc just gives me illegal expression errors, with no indication as to 
what's illegal about them.  Any suggestions?

Thanks for any help in advance.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Segmentation fault with cthreads on FreeBSD

2020-06-08 Thread Zamrony P. Juhara via fpc-pascal
@fredvs yes I install from source code.

Zamrony P. Juhara
https://v3.juhara.com
https://github.com/zamronypj

Fano Framework
https://fanoframework.github.io

mod_pascal
https://zamronypj.github.io/mod_pascal 
 
  On Tue, Jun 9, 2020 at 0:12, fredvs via 
fpc-pascal wrote:   Hello.

When compiling your code with fpc installed from freebsd package:

$ sudo pkg install fpc
$ sudo pkg install lang/fpc-units

All is OK, your test.pas run as expected.

But compiling your code with fpc compiled from source, there is indeed that
error message:
fish: "./test" terminated by signal SIGSEGV 5Address boundary error)



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Segmentation fault with cthreads on FreeBSD

2020-06-08 Thread Zamrony P. Juhara via fpc-pascal
Following program
program test;{$IFDEF UNIX}uses cthreads;{$ENDIF}begin     writeln('test');end.
Compile with FPC 3.0.4 on FreeBSD 12. When run test program, it causes 
segmentation fault. 
What is wrong? Without cthreads unit, it run fine.

Zamrony P. Juhara
https://v3.juhara.com
https://github.com/zamronypj

Fano Framework
https://fanoframework.github.io

mod_pascal
https://zamronypj.github.io/mod_pascal___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Vector code

2020-05-01 Thread Zamrony P. Juhara via fpc-pascal
I found that this repository have some free ebooks about assembly but maybe not 
specific to vector code
https://github.com/EbookFoundation/free-programming-books/blob/master/free-programming-books.md#assembly-language

I also wrote vector operation utility in assembly with SIMD in case you are 
interested
https://github.com/zamronypj/oprsimd

Zamrony P. Juhara
https://v3.juhara.com
https://github.com/zamronypj

Fano Framework
https://fanoframework.github.io

mod_pascal
https://zamronypj.github.io/mod_pascal 
 
  On Fri, May 1, 2020 at 16:25, Adriaan van Os wrote:   Can 
someone recommend a good book on writing (assembly) vector code ?

Thanks,

Adriaan van Os
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Converting http date back to TDateTime

2020-04-29 Thread Zamrony P. Juhara via fpc-pascal
Yes, it works if I remove timezone part from pattern as suggested by Santiago. 
This one works
adatetime := scanDateTime(     'ddd, dd mmm  hh:mm:ss',     'Tue, 28 Apr 
2020 10:11:12 GMT');
So i guess, we must convert timezone information to local timezone manually.

Thank you
Zamrony P. Juhara
https://v3.juhara.com
https://github.com/zamronypj

Fano Framework
https://fanoframework.github.io

mod_pascal
https://zamronypj.github.io/mod_pascal 
 
  On Wed, Apr 29, 2020 at 16:40, Santiago A. wrote:   
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Converting http date back to TDateTime

2020-04-28 Thread Zamrony P. Juhara via fpc-pascal
I try with your suggested pattern format but it does not work either. Same 
EConvertError with different error message.
I guess, I have to parse it manually

Zamrony P. Juhara
https://v3.juhara.com
https://github.com/zamronypj

Fano Framework
https://fanoframework.github.io

mod_pascal
https://zamronypj.github.io/mod_pascal 
 
  On Wed, Apr 29, 2020 at 10:00, Alexander Grotewohl wrote:   
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Converting http date back to TDateTime

2020-04-28 Thread Zamrony P. Juhara via fpc-pascal
No it does not work. Docs says literal string needs to be quoted with "

Zamrony P. Juhara 
 
  On Wed, Apr 29, 2020 at 9:37, Alexander Grotewohl wrote:   
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Converting http date back to TDateTime

2020-04-28 Thread Zamrony P. Juhara via fpc-pascal
Hi,
How do I convert string with HTTP date format such as
Wed, 29 Apr 2020 10:35:50 GMT
back to its TDateTime value?
I try with ScanDateTime()
adateTime := ScanDateTime(     'ddd", "dd" "mmm" "" "hh:mm:ss" GMT"',     
'Wed, 29 Apr 2020 10:35:50 GMT');
but EConvertError exception is raised with message 
Mismatch char " " <> "," at pattern position 5, string position 5

ZamroniFano Framework https://fanoframework.github.io

Zamrony P. Juhara___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Apache 2.4 module that execute Pascal program

2020-03-13 Thread Zamrony P. Juhara via fpc-pascal
Hi,
I want to announce Apache module I develop. It allows pascal program to be 
executed as scripting language using InstantFPC.
It is still early stage but it is already capable of executing simple pascal 
programs. In case anyone interested, here is repository
https://github.com/zamronypj/mod_pascal


Zamrony P. Juharahttps://fanoframework.github.io___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Command line -a cannot be combined with -Sewn

2020-03-08 Thread Zamrony P. Juhara via fpc-pascal
For example I have following code
program teststr;begin     writeln('test');end.
Compile it with -a and -Sewn or -Sen
$ fpc -a -Sewn teststr.pas It fails to compile. this is not a bug but it makes 
me pulling hair for hours.
The problem is -a options add note which causing -Sewn to stop compilation. I 
wish  the error message also tells reason why compilation is stopped.
Zamrony P. JuharaFano Framework, Free Pascal Web Framework 
https://fanoframework.github.io___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Missing mirror link in download page

2020-02-18 Thread Zamrony P. Juhara via fpc-pascal
In Linux download page
https://freepascal.org/down/x86_64/linux.html
Hungary and Canada mirror links is there but are inaccessible due to missing 
label.

Zamrony P. Juharahttps://fanoframework.github.io___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Is forum down?

2020-02-02 Thread Zamrony P. Juhara via fpc-pascal
>From my location
https://forum.lazarus.freepascal.org/
takes long time to load or sometime timeout. Does it happens to anyone?

Zamrony P. Juhara
Fano Framework, pascal web framework, https://fanoframework.github.io
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Passing a CORBA interface as parameter

2019-12-20 Thread Zamrony P. Juhara via fpc-pascal
If you need to know if an instance implement certain interface, you can use is 
operator
if anInstance is IInterface1 thenbegin     end;

Zamrony P. Juhara 
 
  On Sat, Dec 21, 2019 at 0:25, Adriaan van Os wrote:   
I would like to pass a CORBA interface-type as parameter and test for equality, 
So, for example, I have

{$mode objfpc}
{$interfaces corba}

type
    IMyInterface = Interface
    
        [  '{34aad6d0-5884-4143-97c2-b6e330305ae3}']

        Function MyFunc : Integer;
    end;

Now I can pass IMyInterface to TObject.GetInterface as the first parameter, 
which is of type TGuid 
in the declaration.

However, if I use the same TGuid parameter type in my own procedure

    procedure TestInterfaceParameter
          ( const theInterface            : TGuid);
        begin
          if IsEqualGUID
          ( theInterface, ITestInterface1)
            then writeln
              ( 'theInterface = ITestInterface1')
        end;

then I run into the problem that IMyInterface is accepted as actual parameter 
of 
TestInterfaceParameter and of IsEqualGUID only if IMyInterface inherits from 
IUnknown (which I 
certainly don't want, as it is reference counted). Strangely, 
TObject.GetInterface does accept 
IMyInterface as a parameter. So where is the difference ? Is there some 
compiler magic involved in 
TObject.GetInterface ?

Regards,

Adriaan van Os




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Floating point exception not always caught on Linux i386.

2019-10-11 Thread Zamrony P. Juhara via fpc-pascal
I use FPC 3.0.4 on Ubuntu 16.04
I get same behavior after compile it with ppc386. 64bit binary executable run OK

Zamrony P. Juhara
Fano Framework, Free Pascal web application framework 
https://fanoframework.github.io
On Friday, October 11, 2019, 4:39:38 PM GMT+8, Bernd Mueller 
 wrote:  
 
 Hello,

FPC 3.0.4, Linux i386

the following program should catch the floating point exception
(always), but crashes on the fourth call to the procedure Run:

program test;
{$mode objfpc}{$H+}

procedure Run;
var
    r: Real;
    i: Integer;
begin
    i:= 1;
    try
      r:= i / 0.0;
    except
      r:= 0; // Crash  here on fourth call.
    end;
    Writeln('ok');
end;

begin
    Run;
    Run;
    Run;
    Run;
end.

The output:
ok
ok
ok
Runtime error 207 at $080480F9
  $080480F9
  $0804815C
  $0806644D

The program was compiled with no additional compiler parameters.
I could not reproduce this problem with the trunk version of the
compiler, but all versions down to 2.2.2 show the described behavior.
FPC 2.2.0 is working correct. The 64-bit version of FPC 3.0.4 works
correct too.

Is this something for the bug tracker?

Regards, Bernd.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Interface delegation causes memory leak

2019-08-29 Thread Zamrony P. Juhara via fpc-pascal
   
   - unit DelegateTalkerImpl;
   -  
   - interface
   -  
   - {$MODE OBJFPC}
   -  
   - uses
   -  
   -     TalkerIntf;
   -  
   - type
   -  
   -     TDelegateTalker = class(TInterfacedObject, ITalker)
   -     private
   -         fActualTalker : ITalker;
   -     public
   -         constructor create(const talker : ITalker);
   -         destructor destroy(); override;
   -  
   -         property talker : ITalker read fActualTalker implements ITalker;
   -     end;
   -  
   - implementation
   -  
   -     constructor TDelegateTalker.create(const talker : ITalker);
   -     begin
   -         fActualTalker := talker;
   -     end;
   -  
   -     destructor TDelegateTalker.destroy();
   -     begin
   -         fActualTalker := nil;
   -         inherited destroy();
   -     end;
   -  
   - end.
Above class, which employs interface delegation, cause memory leak. Detail how 
to reproduce can be read in
https://forum.lazarus.freepascal.org/index.php/topic,46575.0.html

or
Why is this interface delegation causing memory leak?

| 
| 
| 
|  |  |

 |

 |
| 
|  | 
Why is this interface delegation causing memory leak?

Suppose I have following codes Unit TalkerIntf.pas unit TalkerIntf; interface 
{$MODE OBJFPC} type ITal...
 |

 |

 |


Is this a bug as mentioned by David Heffernan?
Regards,

Fano Frameworkhttps://fanoframework.github.io___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] A new design for a JSON Parser

2019-08-26 Thread Zamrony P. Juhara via fpc-pascal
Very cool library.
It would be nice if separator character can be change
For example, for me personally
aval := n.find('billTo.name'). value;
more intuitive instead of
aval := n.find('billTo/name'). value;

Also AFAIK, GPL v3 license will require application using this library must use 
GPL too.

Zamrony P. Juhara
Fano Framework https://fanoframework.github.io
 
 
  On Mon, Aug 26, 2019 at 15:12, Anthony Walter wrote:   I 
know the FCL already has a capable JSON parser, but I am writing some Amazon 
web service interfacing projects and wanted a smaller easier to use JSON parser 
to assist. I've create a new design for a JSON parser that is pretty small, yet 
powerful.
If your interested, I've posted the code under GPLv3 and a write up of my 
thought process and the workflow of using an single small class to work with 
JSON:
https://www.getlazarus.org/json/

Any and all feedback is welcome.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Developing a mini ERP / web based development

2019-06-28 Thread Zamrony P. Juhara via fpc-pascal
Live example of https://github.com/fanoframework/fano-app
when deploy and setup correctly with web server can be access here 
https://fano.juhara.id/
So you will be able to access for example
https://fano.juhara.id/hello/darius or https://fano.juhara.id/hello/darius/json 
(JSON output)

Unless you sent POST request, you will get exception EMethodNotAllowed if you 
try to browse to https://fano.juhara.id/hi/darius because route for hi/{name} 
only defined for POST request.

Zamrony P. Juhara
Website: 
http://v3.juhara.com
Blog:
http://zamronyp.juhara.com
http://delphindo.wordpress.com (kontributor)

Github:
https://github.com/zamronypj

Stackoverflow:
http://stackoverflow.com/users/5855039/zamrony-p-juhara

Google Play Store:
http://goo.gl/gCs4Bc

On Saturday, June 29, 2019, 10:31:33 AM GMT+8, Zamrony P. Juhara via fpc-pascal 
 wrote:
 
 
 Hi Darius,
I am author of Fano Framework. I encourage people to try Fano Framework, but as 
of now, I would not advise you to use it on production setup. While many of web 
framework features are already built, they have not been tested on production.
The error

Exception class : ERouteHandlerNotFoundMessage : Route not found. Method: GET 
Uri: /cgi-bin/app.cgi
actually tells that application is working as intended. If you use example 
application
https://github.com/fanoframework/fano-app 
then routes that can be accessed is defined in
https://github.com/fanoframework/fano-app/blob/master/app/Routes/routes.inc





So you will be able to access application through following urls
http://[hostname]/ (GET)
http://[hostname]/hello/{name} (GET/POST)
http://[hostname]/hello/{name}/json (GET/POST) => output is JSON for example 
http://[hostname]/hello/darius
http://[hostname]/hi/{name} (POST)





Zamrony P. Juhara
Website: 
http://v3.juhara.com
Blog:
http://zamronyp.juhara.com
http://delphindo.wordpress.com (kontributor)

Github:
https://github.com/zamronypj

Stackoverflow:
http://stackoverflow.com/users/5855039/zamrony-p-juhara

Google Play Store:
http://goo.gl/gCs4Bc


On Friday, June 28, 2019, 12:29:32 AM GMT+8, Michael Van Canneyt 
 wrote:  
 
 

On Thu, 27 Jun 2019, Darius Blaszyk wrote:

> Hi all,
> 
> I have been asked to write a limited functionality / mini ERP type of 
> software for an NGO that is setting up a hospital. I'm doing this in my own 
> time and free of charge. The compiler and IDE of choice are of course 
> FreePascal & Lazarus. I’m still thinking about the direction to go exactly 
> with this and I was hoping to get some feedback/support from the community 
> here as I always have gotten over the years.
> 
> The hardware of choice is already made and will be a network of several
> Chromebooks on which all staff will be logging in the system.  This made
> me think that a desktop application is less feasible and I should look at
> a web-based solution.  I found some frameworks such as ExtPascal, fano,
> Brook, pas2js.  Unfortunately, I don't know much about web-based
> applications.  So my question is whether any of the frameworks are mature
> enough to create a database driven application as described.  Possibly
> there are other frameworks available that I don't know of but are worth
> investigating?

ExtPascal was a dead end and is now effectively dead (unless I am
misinformed).

I can't inform you about fano.

As for the others:

Brook & Pas2js are definitely worth investigating.

Brook is a long-standing server platform for FPC.

pas2js is used as the basis for TMS Web Core (a commercial product for
Delphi/lazarus. pas2js is meanwhile very mature. (I use it myself extensively 
:))
You must use this if you wish to include a lot of browser-side
functionality.

If it is for charity, you could try getting a TMS Web core license for free.
Programming then becomes like creating a desktop program; drag

For server-side database Access, there is sqldbRestBridge. 
It is fairly new, but is scheduled to be included in TMS WEB core.

You can also simply program using fcl-web: simple HTTP request/response. 
All the others are based on top of it, if I am correct.

If you use bare-bones fcl-web, it's a bit like PHP: you always generate the
full HTML on the server.

Doubtlessly, there are other frameworks to work with. I work with the above
ones (and developed 3 our of 4 :)) so I am of course giving a biased view...

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Developing a mini ERP / web based development

2019-06-28 Thread Zamrony P. Juhara via fpc-pascal
Hi Darius,
I am author of Fano Framework. I encourage people to try Fano Framework, but as 
of now, I would not advise you to use it on production setup. While many of web 
framework features are already built, they have not been tested on production.
The error

Exception class : ERouteHandlerNotFoundMessage : Route not found. Method: GET 
Uri: /cgi-bin/app.cgi
actually tells that application is working as intended. If you use example 
application
https://github.com/fanoframework/fano-app 
then routes that can be accessed is defined in
https://github.com/fanoframework/fano-app/blob/master/app/Routes/routes.inc


So you will be able to access application through following urls
http://[hostname]/ (GET)
http://[hostname]/hello/{name} (GET/POST)
http://[hostname]/hello/{name}/json (GET/POST) => output is JSON for example 
http://[hostname]/hello/darius
http://[hostname]/hi/{name} (POST)





Zamrony P. Juhara
Website: 
http://v3.juhara.com
Blog:
http://zamronyp.juhara.com
http://delphindo.wordpress.com (kontributor)

Github:
https://github.com/zamronypj

Stackoverflow:
http://stackoverflow.com/users/5855039/zamrony-p-juhara

Google Play Store:
http://goo.gl/gCs4Bc


On Friday, June 28, 2019, 12:29:32 AM GMT+8, Michael Van Canneyt 
 wrote:  
 
 

On Thu, 27 Jun 2019, Darius Blaszyk wrote:

> Hi all,
> 
> I have been asked to write a limited functionality / mini ERP type of 
> software for an NGO that is setting up a hospital. I'm doing this in my own 
> time and free of charge. The compiler and IDE of choice are of course 
> FreePascal & Lazarus. I’m still thinking about the direction to go exactly 
> with this and I was hoping to get some feedback/support from the community 
> here as I always have gotten over the years.
> 
> The hardware of choice is already made and will be a network of several
> Chromebooks on which all staff will be logging in the system.  This made
> me think that a desktop application is less feasible and I should look at
> a web-based solution.  I found some frameworks such as ExtPascal, fano,
> Brook, pas2js.  Unfortunately, I don't know much about web-based
> applications.  So my question is whether any of the frameworks are mature
> enough to create a database driven application as described.  Possibly
> there are other frameworks available that I don't know of but are worth
> investigating?

ExtPascal was a dead end and is now effectively dead (unless I am
misinformed).

I can't inform you about fano.

As for the others:

Brook & Pas2js are definitely worth investigating.

Brook is a long-standing server platform for FPC.

pas2js is used as the basis for TMS Web Core (a commercial product for
Delphi/lazarus. pas2js is meanwhile very mature. (I use it myself extensively 
:))
You must use this if you wish to include a lot of browser-side
functionality.

If it is for charity, you could try getting a TMS Web core license for free.
Programming then becomes like creating a desktop program; drag

For server-side database Access, there is sqldbRestBridge. 
It is fairly new, but is scheduled to be included in TMS WEB core.

You can also simply program using fcl-web: simple HTTP request/response. 
All the others are based on top of it, if I am correct.

If you use bare-bones fcl-web, it's a bit like PHP: you always generate the
full HTML on the server.

Doubtlessly, there are other frameworks to work with. I work with the above
ones (and developed 3 our of 4 :)) so I am of course giving a biased view...

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ContentData field size in FCGI_ContentRecor

2019-05-18 Thread Zamrony P. Juhara via fpc-pascal
I do not think so, because custfpcgi.pp is using many const and types declared 
in fastcgi.pp. removing it will cause rewrite in many parts of custfcgi units
Zamrony P. Juhara 
 
  On Sat, May 18, 2019 at 17:36, Michael Van Canneyt 
wrote:   

On Sat, 18 May 2019, Zamrony P. Juhara via fpc-pascal wrote:

> custfcgi.pp and fpfcgi.pp both directly /indirectly depends on fastcgi unit.

AFAIK this dependency can be removed, if it exists.

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] ContentData field size in FCGI_ContentRecor

2019-05-18 Thread Zamrony P. Juhara via fpc-pascal
custfcgi.pp and fpfcgi.pp both directly /indirectly depends on fastcgi unit.

Zamrony P. Juhara 
 
  On Sat, May 18, 2019 at 16:54, Michael Van Canneyt 
wrote:   

On Sat, 18 May 2019, Zamrony P. Juhara via fpc-pascal wrote:

>> From fastcgi.pp
>
> https://github.com/graemeg/freepascal/blob/master/packages/fastcgi/src/fastcgi.pp
>
> In line 510
> FCGI_ContentRecord = record
>     header : FCGI_Header;
>     ContentData : array[0..1023] of byte;
> end;
> Field ContentData is 1024 bytes. Actual ContentData length is related to 
> field ContentLength of FCGI_Header. ContentLength is declared as word type to 
> conform with FastCGI specification. So maximum ContentLength is 65536 bytes.
>
> According  to FastCGI specification,
>
> http://www.mit.edu/~yandros/doc/specs/fcgi-spec.html
> "contentData: Between 0 and 65535 bytes of data, interpreted according to the 
> record type."
>
> Why fastcgi.pp declared it as array[0..1023] of byte instead of array[0.. 
> 65535] of byte ?

This unit is a translation of a library. Most likely, that was exactly the
value specified in the original header files.

I would not recommend using this unit. 
It is most likely outdated, and I would not even know what library it supports. 
I will ask on the core group what to do, I think it is better to remove it.

Free Pascal supports fastcgi natively using the custfcgi or fpfcgi units.

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

[fpc-pascal] ContentData field size in FCGI_ContentRecord of fastcgi unit

2019-05-18 Thread Zamrony P. Juhara via fpc-pascal
>From fastcgi.pp

https://github.com/graemeg/freepascal/blob/master/packages/fastcgi/src/fastcgi.pp

In line 510
FCGI_ContentRecord = record
    header : FCGI_Header;
    ContentData : array[0..1023] of byte;
end;
Field ContentData is 1024 bytes. Actual ContentData length is related to field 
ContentLength of FCGI_Header. ContentLength is declared as word type to conform 
with FastCGI specification. So maximum ContentLength is 65536 bytes.

According  to FastCGI specification, 

http://www.mit.edu/~yandros/doc/specs/fcgi-spec.html
"contentData: Between 0 and 65535 bytes of data, interpreted according to the 
record type."

Why fastcgi.pp declared it as array[0..1023] of byte instead of array[0.. 
65535] of byte ?



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Implementation through interface delegation not pass to descendant

2019-03-17 Thread Zamrony P. Juhara via fpc-pascal
Hi Martok,
Thank you for explanation. 


Zamrony P. Juhara 
 
  On Mon, Mar 18, 2019 at 9:04, Martok wrote:   Am 
17.03.2019 um 15:21 schrieb Zamrony P. Juhara via fpc-pascal:
> I repost my question that I post on StackOverflow here in case anyone can 
> answer it. This is my question about implementation 
> 
> of interface through delegation. Parent class is concrete class which 
> implement an interface through delegation but descendant of this class is not 
> considered as concrete class of the interface.

I've answered on SO. Don't think it's solvable, because this would need partial
delegation on TBClass' implementation of IIntfB from knowledge of the inherited
IIntfA, which sounds a bit complex for the compiler...

As a compiler suggestion: this could be made clearer if E5042 would print the
interface type name it is missing, such as:
`Error: (5042) No matching implementation for interface method "IIntfB.writeA"
found`

-- 
Regards,
Martok

___
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] Implementation through interface delegation not pass to descendant

2019-03-17 Thread Zamrony P. Juhara via fpc-pascal
I repost my question that I post on StackOverflow here in case anyone can 
answer it. This is my question about implementation of interface through 
delegation. Parent class is concrete class which implement an interface through 
delegation but descendant of this class is not considered as concrete class of 
the interface.
Detail of question can be read here
https://stackoverflow.com/q/55160258/5855039
Zamrony P. Juhara
Fano Framework, web application framework for modern Pascal programming 
language https://fanoframework.github.io

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Operator overloading collection for vector operation using Intel SIMD SSE instruction

2019-03-13 Thread Zamrony P. Juhara via fpc-pascal
Yes I plan to add matrix operation too.

Sent from Yahoo Mail on Android 
 
  On Thu, Mar 14, 2019 at 11:04, Anthony Walter wrote:   
___
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] Operator overloading collection for vector operation using Intel SIMD SSE instruction

2019-03-12 Thread Zamrony P. Juhara via fpc-pascal
In case anyone interested, I just want to announce a repository which is 
collection of operator overloading for vector operation using Intel SIMD SSE 
instruction.
 https://github.com/zamronypj/oprsimd

Zamrony P. Juhara
Fano Framework, web application framework for modern Pascal programming 
language https://fanoframework.github.io



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Web application framework in Free Pascal

2019-02-14 Thread Zamrony P. Juhara via fpc-pascal
If you read roadmap section in readme file, I plan to add functionality to 
support not only CGI, but also FastCGI and as standalone http server (similar 
to Node.js + Express).
After found out about piradoiv/Prack  
|  
|   
|   
|   ||

   |

  |
|  
|   |  
piradoiv/Prack
 
Simple and Scalable Web Server �. Contribute to piradoiv/Prack development by 
creating an account on GitHub.
  |   |

  |

  |

  
which is interesting to me, I am considering to create sofware layer to use 
Prack.
The motivation behind development of this framework basically a personal 
research to answer my own curiosity. 
What is gain in performance compared to other programming language, for 
example, PHP-based framework?
I used PHP-based (Slim, Phalcon, Laravel) and Javascript-based (Express) 
framework in my day job. this framework drew inspiration from those existing 
frameworks.
And of course it is not production-ready. I would advise you not to use it in 
production setup.
Zamrony P. Juhara 
 
  On Fri, Feb 15, 2019 at 4:04, Anthony Walter wrote:   Your 
documentation looks good, along with the examples, instructions, and general 
site aesthetics. Beyond providing your own mechanism for implementing a pascal 
based CGI wrapper, what functionality does or do you plan to expose? That is, 
what do you imagine doing with it aside from the normal CGI stuff?  
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Web application framework in Free Pascal

2019-02-12 Thread Zamrony P. Juhara via fpc-pascal
Hi, everyone
I just want to announce web application framework that I am developing, in case 
anyone interested. 
Not yet mature but beginning to take shape.

Source code
fanoframework/fano  
|  
|   
|   
|   ||

   |

  |
|  
|   |  
fanoframework/fano
 
Pascal web application framework. Contribute to fanoframework/fano development 
by creating an account on GitHub.
  |   |

  |

  |

  
Documentation
https://fanoframework.github.io

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal