Re: [fpc-pascal] parameter list declaration

2017-04-01 Thread leledumbo via fpc-pascal
> I found this: http://www.freepascal.org/docs-html/ref/refse91.html but I
think it's not really clear, especially for newbie

Newbies often skip http://www.freepascal.org/docs-html/ref/refli5.html so
they can't read the diagrams used in all later sections.

> Compare that to official document from Delphi here:
> http://docwiki.embarcadero.com/RADStudio/Berlin/en/Parameters_(Delphi)
> which I think a bit more clear.

Their wiki content is actually user contributed, no better than Lazarus/FPC
wiki. It sometimes feels easier to read because it's written from user POV,
while official docs are written in more in-depth technical POV.



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/parameter-list-declaration-tp5728069p5728088.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] Partial text search in a dictionary

2017-05-16 Thread leledumbo via fpc-pascal
> However i would like to be able to do a partial text search on the 
strings, prefeably with a result as a list of matching string/object 
pairs but getting an index to the first matching pair would be fine. The 
match only has to be done from the first character of both strings, so a 
complex solution like Regex search is not needed. 

Google for prefix tree (or radix tree or trie) implementation. I believe
I've seen one in either Blaise Pascal Magazine or Pascal Gamer Magazine, the
topic is about building autocomplete combobox if I'm not mistaken.



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Partial-text-search-in-a-dictionary-tp5728562p5728601.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] Browser and exe

2017-05-23 Thread leledumbo via fpc-pascal
> Is there a way to call an Exe (previously installed, no problem with that)
to interact with an Exe, working in IE and Chrome?

Not from client side AFAIK. You'll need to create a local server side app,
let that one executes the exe and response back to the client (if needed).



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Browser-and-exe-tp5728798p5728804.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] GLM library alternative?

2017-05-27 Thread leledumbo via fpc-pascal
> Has anyone converted these to Pascal before or having some similar I could
look at? 

I don't usually do the matrix calculation myself, I delegate that by calling
OpenGL functions in proper order. However, just a few days ago I found this:
https://paginas.fe.up.pt/~paco/pmwiki/index.php?n=DynMatrix.DynMatrix

which does seem to have enough matrix operations for most use cases.



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/GLM-library-alternative-tp5728879p5728887.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] Error building FPC 3.0.2 from svn sources on RPi3

2017-05-29 Thread leledumbo via fpc-pascal
> I do not understand what -iVSPTPSOTO is... 

That's what happened when the compiler cannot be called by make. Watch:

> make: -iVSPTPSOTO: Command not found

it's a parameter list for fpc to get (from fpc -h):

  -i Information
...
  -iSO   Return compiler OS
  -iSP   Return compiler host processor
  -iTO   Return target OS
  -iTP   Return target processor
  -iVReturn short compiler version
...




--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Error-building-FPC-3-0-2-from-svn-sources-on-RPi3-tp5728941p5728942.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] JavaScript versions of pascal RTL functions (FormatFloat, DateToStr etc)

2017-10-15 Thread leledumbo via fpc-pascal
> The component developer is doing fantastic work with the visual components, 
and it starts to look really good. 

visual? how and/or what does it output? will be interesting if ExtPascal
dream can be revived somewhat.



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

Re: [fpc-pascal] Google Drive API

2017-10-13 Thread leledumbo via fpc-pascal
Marcos Douglas B. Santos wrote
> I didn't found...  In this path \packages\googleapi\examples only
> exists \generator directory.  :(
> 
> Trunk, rev 37453.

Try this, it wasn't running well due to RTTI changes back then, but probably
works now:
http://free-pascal-general.1045716.n5.nabble.com/ERESTAPI-TBuckets-unsupported-array-element-type-lt-looks-like-empty-string-gt-td5726387.html




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

Re: [fpc-pascal] How to call C++ function with Vector

2017-09-26 Thread leledumbo via fpc-pascal
> Would it be possible to do this via a Lua shim?

How is it even related with that?



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

Re: [fpc-pascal] How to call C++ function with Vector

2017-09-26 Thread leledumbo via fpc-pascal
> I am stuck at the keyword vector. 
>
> How is it translated into free pascal?

It's hard, you must create additional wrapper that exposes simpler type
(pointer or array of pchar) OR make wrapper for the vector methods and
simply declare it as an opaque pointer. std::vector is template/generic C++
class that implements a dynamic array functionality, but it can't be used
outside C++.



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

Re: [fpc-pascal] fpReport released

2017-08-21 Thread leledumbo via fpc-pascal
> fpreport has been committed to FPC SVN: packages/fcl-report. 
> It should compile on windows, linux, freebsd and darwin.

From the wiki:
"An important use-case was a Linux server running in a container without X
libraries installed"

Yep, yep, yep. Finally I can replace my old statically designed reports :)



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/fpReport-released-tp5729564p5729578.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] Compiler directive to compile to 64 bits

2017-11-02 Thread leledumbo via fpc-pascal
> Hi, a newbie question but the docs aren't clear on how to say that I 
want to use the 64-bit compiler, not the i386

fpc -Px86_64 -Twin64 




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

Re: [fpc-pascal] Object-oriented file (path) handling library

2017-11-09 Thread leledumbo via fpc-pascal
> is there something simliar to Java's java.io.File or java.nio.Path for 
FPC? Google makes me think there isn't... 

No, there isn't. Welcome to hybrid paradigm programming language. It's not
difficult to make an OO wrapper for File* SysUtils functions or even the
classic ones in System unit, though.



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

Re: [fpc-pascal] installing cross fpc in parallel to systems fpc

2017-11-09 Thread leledumbo via fpc-pascal
> When I'm in doubt 
about the conditional defines, I either google or take advantage of 
Lazarus: in project->options I select the target CPU family and the 
target processor, and then I use "show all options" to see which defines 
are set. 

fpc -vc is your friend here.



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

Re: [fpc-pascal] Use OpenDocument (.odt) files as templates

2017-12-02 Thread leledumbo via fpc-pascal
> Does someone knows a component to use OpenDocument (.odt) files as
templates to generate a .odt output file given some data?

FPVectorial seems to support it:
http://wiki.freepascal.org/fpvectorial_-_Text_Document_Support




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

Re: [fpc-pascal] Is there any pascal interface to TensorFlow or other neural network tools?

2017-10-28 Thread leledumbo via fpc-pascal
> or even neural network libraries written in Pascal?

Try contacting schuler in Lazarus forum.




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

Re: [fpc-pascal] fpWeb: How can I use heaptrc in standalone mode?

2018-05-06 Thread leledumbo via fpc-pascal
> Create a call that calls Application.Terminate. 

I just call DumpHeap(false); instead



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

Re: [fpc-pascal] detecting recursive loops

2018-05-06 Thread leledumbo via fpc-pascal
> Any ideas how to identify potential unintentional loops?

That depends on your design. Is it intended that the 3 procedures can call
each other, directly or indirectly? If no, then things are a lot easier. You
can just put on the currently entered procedure name to a map shared by the
3 (or just make it global) and on start of each procedure, you check whether
the current procedure is in the map already or not. If yes, then the current
call stack has formed a recursion.



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

Re: [fpc-pascal] FPC on Android tablets: ARM, x86_64

2018-05-11 Thread leledumbo via fpc-pascal
> Has anybody come across https://wiki.termux.com/wiki/Main_Page which I've
seen mentioned elsewhere? 

Yes, that's current terminal emulator in my android devices.
We can contribute just by making pull request here:
https://github.com/termux/termux-packages/pulls



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

Re: [fpc-pascal] Default record fields

2018-06-23 Thread leledumbo via fpc-pascal
> My thinking was that because variables can assign values at declaration it
would be reasonable to assume that record fields could have default values
which would be assigned at declaration. It sounds like a natural extension
of the syntax that already exists. 

Those are two different things actually: Declaration time initialization for
variables vs default record field values. The former doesn't cause confusion
because the value and the variable are in the same place, but the latter
does, as Sven said: "On the other hand to know whether the fields are
initialized or not you'd need to navigate to the type which means leaving
your current zone of development."

Now suppose you have that feature a record type T in unit A, then a code
somewhere that uses unit A has a variable V of type T declared. How could
you be sure what value that V holds? At best you have to initialize it right
there anyway, making the default value useless. Certainly don't imagine
you're the writer of unit A who knows that T has some default values. Other
languages POV are mostly simply ease of typing, they don't think the
consequences this far.



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

Re: [fpc-pascal] Lazarus and Linked Lists

2018-06-27 Thread leledumbo via fpc-pascal
> Is there a basic linked List object for Lazarus? 

https://svn.freepascal.org/svn/fpc/tags/release_3_0_4/packages/fcl-stl/src/glinkedlist.pp



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

Re: [fpc-pascal] List of chars for case

2018-07-02 Thread leledumbo via fpc-pascal
> So it can’t be done?

Only through macro ATM, I believe. Note that case statement body does NOT
expect a set (it expects values, list of values and/or range of values),
despite the very similar look (missing enclosing angle brackets only), hence
the inability to do what you want.



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

Re: [fpc-pascal] CGI/FastCGI and WS request with a max time response

2018-01-04 Thread leledumbo via fpc-pascal
> The problem is that the WS could take so long time that the entire request
will broke with a "time out".

I suggest making the request handling asynchronous instead. So request will
only register and return some unique id to the requester, then do call to
the WS in background thread. An endpoint shall be provided that when given a
unique id will check whether the corresponding thread has finished executing
or not, returning 200 + response data when done, and 202 if still in
progress. This endpoint shall be called in regular interval by the
requester, until it finishes processing or your server dies (500).




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

Re: [fpc-pascal] Get user ID for name on Linux

2018-01-04 Thread leledumbo via fpc-pascal
> Is there a complete list of packages available somewhere? 

$ svn co https://svn.freepascal.org/svn/fpc/trunk fpc
$ cd fpc/packages
$ ls

tadaaa...




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

Re: [fpc-pascal] Modern Compiler Construction using Pascal

2018-01-04 Thread leledumbo via fpc-pascal
I used to play with this a bit: https://github.com/lysee/lysee
It's written by a Chinese programmer and I remember reading his page about
the language using google translate :p
The github page is without documentation, but its older google code page is
still accessible (just hope he didn't break anything lately):
https://code.google.com/archive/p/lysee/



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

Re: [fpc-pascal] Python interaction... how?

2018-02-16 Thread leledumbo via fpc-pascal
> Does anyone know of a minimal example or pseudo code or just an
explanation?

Python actually provides a Python.h that you can convert to a Pascal unit.
But inside, it includes a bunch of other header files and conversion might
be a tedious task. If you made it, though, simply call:

Py_Initialize();
Py_WhateverThereAreMultipleChoicesHere(ProbablyAPythonScriptAsCString);
Py_Finalize();

and you're done.

But if I have to, I would take the external program approach instead using
its interpreter's -c option through TProcess. Communication will then be
done through pipes. It's probably slower, but quicker to work. If you take
the header conversion approach, however, that might benefit everyone else
needing to do the same, just like how the Lua bindings are done (but they're
a lot cleaner that makes conversion simpler).



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

Re: [fpc-pascal] Trying to compile ZeosDBO cli program

2018-02-15 Thread leledumbo via fpc-pascal
> Never mind I have it figured out.  You have to add the path to 
> the /etc/fpc.cfg file, such as: 

You can do it from command line, too. In fact, if you already have it
working from Lazarus, simply open Project Options->Show Options->Command
Line Parameters tab, copy the content for your fpc options, done.



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

Re: [fpc-pascal] Why win64 program are considerably bigger in exe size than win 32?

2017-12-22 Thread leledumbo via fpc-pascal
> Why?

At least pointer size takes double space, multiply it with every instances
1.5x bigger is not impossible.



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

Re: [fpc-pascal] FPC for linking only

2018-08-20 Thread leledumbo via fpc-pascal
> Is it possible to use FPC for linking only?

I've asked this in the past with straight "no" answer.



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

Re: [fpc-pascal] FPC_PCHAR_LENGTH dog slow

2018-07-03 Thread leledumbo via fpc-pascal
> i think i'm still waiting for the string "length byte" becoming a "length
word" 
or possibly a "length long" so the speed of pascal strings can be reacquired
-=B-) 

Ansi and any other dynamic strings already have length longint that allows
2GB string length with O(1) length retrieval.



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

Re: [fpc-pascal] [FCL-WEB] Multiple Modules - On Session

2018-03-22 Thread leledumbo via fpc-pascal
> It seems that session management create one separate session by each module

That's right but should be OK, as the session is created based on cookie,
which if already exists, will be loaded instead of created. If memory serves
right, I remember you should set one or a few of these:
* fphttp.SessionFactory.SessionCookie
* fphttp.SessionFactory.SessionCookiePath

optionally, to easily check the created session files, you might want to
also set:
* (fphttp.SessionFactory as iniwebsession.TIniSessionFactory).SessionDir




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

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread leledumbo via fpc-pascal
> But *if* I had to decide I would pick #1, cause then there wouldn't be 
> the chance to break existing code if a user decides to add a constructor 
> to their record and some other code relies on there not being a 
> constructor. Also due to the syntax 
> TYPENAME(FIELDNAME:VALUE[;FIELDNAME:VALUE[;…]]) it's in principle 
> possible to have the parser distinguish whether it's a typecast or a 
> default constructor. 

I would pick #1, too, seems more natural to me. There's no ambiguity as well
thanks to : in the syntax. I do wonder how often this would be used, though.
Despite being idiomatic in many languages, it doesn't really save much
typing that traditional way (if that's the main purpose).



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

Re: [fpc-pascal] Running tests with FPC units only

2018-11-11 Thread leledumbo via fpc-pascal
> acording example I found in FPC examples directory, 

Check the one here instead:
$(fpcsrcdir)/packages/fcl-fpcunit/src/demo/consolerunner/testrunner.pp
It depends only on FPC units. I guess you're looking at examples from
Lazarus directory instead of FPC.



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

Re: [fpc-pascal] Announcement GLPT

2018-09-24 Thread leledumbo via fpc-pascal
> https://github.com/daar/GLPT

This is more GLFW rather than GLUT. Good, I prefer it this way as I have
much greater control with regards to the event handling.



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

Re: [fpc-pascal] CopyFile for FreePascal without Lazarus?

2019-04-18 Thread leledumbo via fpc-pascal
> but that seems to only work with Lazarus.

The unit is part of LazUtils package. It has no dependency on other packages
but indeed can't be used as a standalone unit, you need other units from the
same package but that's all.



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

Re: [fpc-pascal] Using docker to build software

2019-05-28 Thread leledumbo via fpc-pascal
> I am curious to know if there is someone out there that have tried to 
> use Docker (https://www.docker.com) containers to build fpc applications? 

Search docker hub, you will find a lot of them, either fpc only, with
lazarus, single target or even cross compiling ready.



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

Re: [fpc-pascal] Improve message "Wrong ppu found"

2019-04-27 Thread leledumbo via fpc-pascal
> Please provide a real example of a compiler output, cause I can't find
"Wrong ppu found" in the sources. 

I think what he meant is:

$ grep -i 'wrong ppu version' -r *
pkgutil.pas: Comment(V_Error,'Wrong PPU Version
'+tostr(ppuversion)+' in '+PPUFn);
utils/ppufiles.pp: Error('Error: Wrong PPU Version : '+PPUFn,false);
utils/ppumove.pp: Error('Error: Wrong PPU Version '+tostr(ppuversion)+'
in '+PPUFn,false);



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

Re: [fpc-pascal] Documentation generation

2019-08-17 Thread leledumbo via fpc-pascal
> How are the FPC RTL documentations generated? I wanted to see if I could
generate .docsets files from them also.

A starting point: https://wiki.freepascal.org/FPCDocs_Tutorial
I believe that "write me" part is not far from calling make with certain
options.



--
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


Re: [fpc-pascal] Calling function pointer to main program

2020-01-02 Thread leledumbo via fpc-pascal
> I know I can use -XM to set another function name besides "main" but then
how do I call back the original function "main" later?

I quickly analyze the generated assembly when you don't pass -XM:

.globl  main
.type   main,@function
main:
.globl  PASCALMAIN
.type   PASCALMAIN,@function
PASCALMAIN:

vs when you do (-XMmymain):

.globl  mymain
.type   mymain,@function
mymain:
.globl  PASCALMAIN
.type   PASCALMAIN,@function
PASCALMAIN:

so basically the original main does nothing and jump straight to PASCALMAIN,
which is always there. So you can make your own main in a separate file that
must be linked in during linking which calls whatever name you pass to -XM.



--
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


Re: [fpc-pascal] Linux GTK-2 GUI app

2020-08-31 Thread leledumbo via fpc-pascal
> I meant to say that, without a .desktop file, the app is not
double-clickable.

This is DE/WM/FM dependent, you app must already have execute bit set anyway
(otherwise, it won't be executable even through CLI). Some allow double
clicking, some not, some configurable.



--
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


Re: [fpc-pascal] Linux GTK-2 GUI app

2020-08-31 Thread leledumbo via fpc-pascal
> Or create different packages for different distros ?

If you can afford the maintenance burden, this is the best that every
specific distro user will love. Otherwise, just provide a compressed archive
with README inside.



--
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


Re: [fpc-pascal] Procedural generics question

2020-08-24 Thread leledumbo via fpc-pascal
> I remember something like this in RTTI though but can't find it in your
docs yet for generics.

{$mode objfpc}

uses
  typinfo;

generic procedure Add;
begin
   if TypeInfo(T) = TypeInfo(Integer) then WriteLn('an integer');
   if TypeInfo(T) = TypeInfo(String) then WriteLn('a string');
end;

begin
  specialize Add;
  specialize Add;
end.



--
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


Re: [fpc-pascal] Database migration

2020-06-20 Thread leledumbo via fpc-pascal
> But before I proceed I would like to check here if something like this
already exists

None that I know of for native Pascal. As I no longer use ORM, Sqitch does
the job for me these days. Basically it's like a git for database schema
(surely you can do CRUD as well there, but it's mainly for schema). I have
an experience of building such a tool myself, not a good days. I'd rather
use what others have already made and proven to be working well.



--
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


Re: [fpc-pascal] Graphing library

2020-11-15 Thread leledumbo via fpc-pascal
> I am looking for a simple to use non-visual graphing library to produce x-y
plots in a  raster file format (similar to how pyplot works). Rather than
developing something from scratch or writing a wrapper to GNU plot
(additional dependency), I was hoping something like this already would
exist that I could build upon.

TAChart works with NoGUI LCL interface:
https://wiki.freepascal.org/TAChart_Demos#nogui



--
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


Re: [fpc-pascal] Mustache templates implementation

2021-04-20 Thread leledumbo via fpc-pascal
> Since dmustache (part of mORMot) fails the official mustache tests and did
not work
> on the platform I needed it for, I wrote my own implementation.

I do remember it didn't pass all the tests, but still works for my needs so
I let it be.

> The result has been committed to packages/fcl-mustache, in case someone
> else
> has a need for it.

Now thank you for this, I'll be sure to check it out to replace dmustache.



--
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