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

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 th

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-

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

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

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 sch

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,@fun

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

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

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:

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

2019-04-17 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/

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

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

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 -

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

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

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:

Re: [fpc-pascal] Lazarus and Linked Lists

2018-06-26 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.

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 actu

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

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

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

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

2018-03-21 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.Sess

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_Initializ

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 opt

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

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

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 an

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

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

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://fr

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

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

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

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/

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

Re: [fpc-pascal] compiler option for $J directive

2017-10-08 Thread leledumbo via fpc-pascal
> There is my old feature request about it > https://bugs.freepascal.org/view.php?id=30344 :) You can monitor it. No one seems to care to implement it, so if you badly need it: sj.patch Apply in compiler directory (please

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

2017-09-26 Thread leledumbo via fpc-pascal
> I thought FPC had the ability to execute a fragment of Lua, and Lua I believe can call C++ directly. No, Lua can only call C, just like FPC. You do know the problem of C++ interfacing, don't you? -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/

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

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

Re: [fpc-pascal] Container class for key-value pairs

2017-09-11 Thread leledumbo via fpc-pascal
> Which container class ist the easiest to use for key-value pairs? All are just as easy. Instead you should state for non-functional requirements. Does it have to be fast? Does it have to be memory efficient? Or as long as you can access it as key-value then it would be fine no matter what the im

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

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 c

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

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 mess

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 sol

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

Re: [fpc-pascal] ppcjvm issues

2017-01-07 Thread leledumbo
> The first issue I ran into is this: > > procedure Cppp1Activity.onResume; > begin > inherited onResume; > with AAAlertDialog.InnerBuilder(self) do begin > setTitle(R.strings.app_name); > end; > end; I don't check by running the code directly, but looking at the so

Re: [fpc-pascal] Linux installation, where to put fpc?

2016-12-31 Thread leledumbo
> Is there some reason I have overlooked for not installing fpc into say > ~/fpc//? In your case, I see none. Since you don't want to share it among users, it's perfectly fine to install under your only user home directory. -- View this message in context: http://free-pascal-general.1045716.

Re: [fpc-pascal] minimal database example

2016-12-16 Thread leledumbo
> However it is not clear to me how this source code can be used by fpc. > > I added the zeos path to the fpc.cfg file, but I get a number of > compilation error. > > For instance > Fatal: Can't open include file "../Zeos.inc" > > With Lazarus I would build a package and all zeos components

Re: [fpc-pascal] For..in enumerator for generic records?

2016-11-30 Thread leledumbo
> I just tried this really quick and it doesn’t seem to work with records but if I changed it to a class that worked. Just as you can't declare next field to be a record when learning linked list (well, we normally learned that some time in the past), the solution is just the same here: declare an

Re: [fpc-pascal] For..in enumerator for generic records?

2016-11-30 Thread leledumbo
> I have a generic record I would like to enumerate using for..in loops. Is this even possible? I tried briefly and it wasn’t clear this was possible so I thought I’d ask first. Thanks. Take a look at how gvector implements it: http://svn.freepascal.org/svn/fpc/tags/release_3_0_0/packages/fcl-stl

Re: [fpc-pascal] Docs: Type A = Integer?

2016-11-13 Thread leledumbo
> Maybe this helps: > http://www.freepascal.org/docs-html/current/ref/refse19.html I think the OP means that type block is shouldn't be there. The page is talking about include directive and that type definition is not related in anyway with paragraphs below or above it. -- View this message in

Re: [fpc-pascal] TMS Aurelius Free today

2016-11-10 Thread leledumbo
> I don't know whether it is better than mormot but might just download first. It's a pure ORM rather than a complete end-to-end solution like mORMot, but it does its ORM things greatly (looking at its feature table). -- View this message in context: http://free-pascal-general.1045716.n5.nabbl

Re: [fpc-pascal] New Feature: 'Management Operators'

2016-11-10 Thread leledumbo
> FPC will have the garbage collection, but the question remains what happens in Delphi? None of my concern actually. It's a simple unit without compiler magic (but requires compiler support for the operator syntax). > Would delphi create a similar feature, but make it incompatible with fpc? AF

Re: [fpc-pascal] New Feature: "Management Operators"

2016-11-09 Thread leledumbo
> anyway probably I have no motivation anymore to continuing my work. Too bad, if only at least the patch for this feature is integrated, I can start arguing to my employer again that Pascal has simple, user selectable garbage collection mechanism. I really wanna know who's the person that you men

Re: [fpc-pascal] picture preview

2016-11-08 Thread leledumbo
> if I want load a bitmap picture for extracting a small preview of it, > what component or library would be best? fcl-image (http://wiki.freepascal.org/fcl-image) is the basis of LCL image processing components and routines, so you can for sure use that. I use it to resize uploaded pictures in

[fpc-pascal] Hot switching RTL locale

2016-11-04 Thread leledumbo
My web application is currently serving two languages, I use a simple TStringList based translation strings to achieve that. However, things are a little harder for locale, especially day and month names. The web application is an embedded server one, so its lifetime is not on a per process basis,

Re: [fpc-pascal] JSON Test Suite

2016-11-01 Thread leledumbo
> Nono: the test is correct. > fcl-json gives an error, but in your test result it shows up as accepting > it ? Eh? Will need to recheck. The requirement is clear: - 0 for accept - 1 for reject - >1 for crash Could it be one of the two except block is wrongly executed? -- View this message

Re: [fpc-pascal] JSON Test Suite

2016-10-31 Thread leledumbo
> No problem. What about the false positive I demonstrated ? I guess we'll need to talk (open issue?) to the author for that. I have no idea if it's really should be supported or just a misunderstanding from the author. Anyway, FPC fcl-json is now merged into the repository: https://github.com/ns

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread leledumbo
> I mean, if fcl-json wants to be on top. In comparison with others, we're among the second top lines (good cases mostly correct, bad cases a bit behind). To make us proud, for the good cases, there are only 2 parsers that fully accept the test suite: java's nanojson & fcl-json -- View this me

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread leledumbo
> In comparison to Go, no it isn't. I guess we have some work to do. I mean, if fcl-json wants to be on top. In comparison with others, we're among the second top lines (good cases mostly correct, bad cases a bit behind). At least fcl-json is way above 3 of Perl's parsers and Haskell which crashe

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread leledumbo
Whoops, it looks like a CSS is missing: style.css Plus, I compare it with Go 1.7's encoding/json package. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/JSON-Test-Suite-tp5726702p57

Re: [fpc-pascal] JSON Test Suite

2016-10-30 Thread leledumbo
> Has anybody tried the FPC JSON parser with these tests? I just did with the following program: {$mode objfpc} uses Classes,SysUtils,fpjson,jsonparser; var Input: TStringList; JSON: TJSONData; begin try try Input := TStringList.Create; Input.LoadFromFile(ParamStr(1));

Re: [fpc-pascal] Smart Link definition ?

2016-10-10 Thread leledumbo
> Sorry, for the question, but is it really working for FPC+Lazarus? Yes, links fine here, just eating quite significant amount of RAM. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Smart-Link-definition-tp5726480p5726515.html Sent from the Free Pascal - Gen

Re: [fpc-pascal] ERESTAPI: TBuckets: unsupported array element type :

2016-09-26 Thread leledumbo
> What version of FPC are you using ? If it is trunk, there is currently a bug which can cause this kind of behaviour, due to the changed RTTI. Yes, it's trunk. OK, I'll refrain from using it for now, not really an urgent need, but I'm looking forward to using it for my website's cdn storage.

[fpc-pascal] ERESTAPI: TBuckets: unsupported array element type :

2016-09-24 Thread leledumbo
I'm testing google cloud storage API with the following simple console program, just to list the buckets: {$mode objfpc}{$H+} uses googleservice, googleclient, googlestorage, openssl, jsonparser, fpjson, fpoauth2, fpwebclient, fphttpwebclient; type TAuthHelper = class pro

Re: [fpc-pascal] Cross platform mobile development

2016-09-08 Thread leledumbo
> I did enough research in Android for FPC to know I could do a simple OpenGL game using the JNI but it didn’t look very complete and I never could get the compiler built on my Mac. Is there enough of the Android NDK (I think it’s called) ported to Pascal so that it’s useful? I don't have Mac, bu

Re: [fpc-pascal] Cross platform mobile development

2016-09-07 Thread leledumbo
> Out of curiosity, is this ARM-specific or does it also work with e.g. Intel-based tablets or desktop implementations of Android? I haven't tried myself (I have x86 based Android tablet, though), but the option is there: lamw-setup-dialog.png

Re: [fpc-pascal] Cross platform mobile development

2016-09-07 Thread leledumbo
> Coming from the background of a Pascal programmer (on Mac specifically) does anyone have any ideas as to what the best cross platform development environment/language is right now for mobile apps? I’d like to do some learning and maybe start some projects but I’m not sure if there are any that co

Re: [fpc-pascal] generic way of writing Sets or Enum values to a String

2016-09-06 Thread leledumbo
> Is there a way to have a single implementation of Enum-to-String or > Set-to-String (and the reverse), but pass in the type, instead of having > a separate implementation of each Enum or Set types. > > Could RTTI help? Could Generics help? Is there some other language > construct I might hav

Re: [fpc-pascal] Correct way to write generic type aliases

2016-08-29 Thread leledumbo
> Remind me not to jump over code examples... Yes, the last three should work. Would you please report a bug? Done: http://bugs.freepascal.org/view.php?id=30530 -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Correct-way-to-write-generic-type-aliases-tp5726179

Re: [fpc-pascal] Correct way to write generic type aliases

2016-08-28 Thread leledumbo
> Type aliases for generics are not supported. OK, but Delphi seems to support the last 3 variant which creates a generic subclass of a specialized generic type: http://stackoverflow.com/questions/10060009/is-it-possible-to-create-a-type-alias-to-a-generic-class-in-delphi At least, it shouldn't ma

[fpc-pascal] Correct way to write generic type aliases

2016-08-28 Thread leledumbo
I want my in-project units depend on a single in-project unit which abstracts the actual used out-project units. i.e. instead of: MyUnit1 -> RTLUnit MyUnit2 -> RTLUnit I want it to be: MyUnit1 -> RTLAbstractorUnit MyUnit2 -> RTLAbstractorUnit RTLAbstractorUnit -> RTLUnit So I try to write: uni

Re: [fpc-pascal] New Arc attempt

2016-08-02 Thread leledumbo
> In FPC (branch for smart pointers) we have own much faster implementation (based on the default field): > > https://github.com/maciej-izak/PascalSmartPointers > > which is usable also for nullable types. I think I've seen this before, but never really dig in to the implementation. -- View t

[fpc-pascal] New Arc attempt

2016-08-02 Thread leledumbo
Just came across this on my fb timeline: https://pascal.today/2016/08/01/arc-for-non-managed-types/ would be interesting for gc lovers. WARNING: the given code there doesn't compile with FPC, even on trunk -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/New-Ar

Re: [fpc-pascal] Initialization of packed record local variables?

2016-07-22 Thread leledumbo
> OK, I did not know about the default keyword. > > Is "default" zero? http://wiki.lazarus.freepascal.org/FPC_New_Features_3.0#New_compiler_intrinsic_Default -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Initialization-of-packed-record-local-variables-tp5

Re: [fpc-pascal] CGI, Handle Exceptions

2016-07-20 Thread leledumbo
> I need to know the Request instance too, to treat the exception properly. As Michael has pointed out, the current design has no access to the TRequest instance. My alternative solution would be to create descendant Exception class that has Request property. For every exception you raise deliber

Re: [fpc-pascal] Hello, I suggest that you change the TFPGMap in fgl.

2016-07-17 Thread leledumbo
> i don't know why free pascal's map is based on array. Because the unit was meant mainly for testing the generics support and if you read the line right before the unit clause: https://github.com/graemeg/freepascal/blob/master/rtl/objpas/fgl.pp#L20 Still, there's no problem having array backed m

Re: [fpc-pascal] Is there a way to interact with this list via the Web?

2016-07-13 Thread leledumbo
> Is there a way to interact with this list via the Web? Alternatively (if you prefer forum-like interface): http://free-pascal-general.1045716.n5.nabble.com/ -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Is-there-a-way-to-interact-with-this-list-via-the-Web

Re: [fpc-pascal] Is there a reactive framework for Free Pascal?

2016-07-06 Thread leledumbo
> Is there something like Rx.net for Free Pascal? As far as I can search, none. Just reading the description already makes me want to take aspirins. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Is-there-a-reactive-framework-for-Free-Pascal-tp5725635p572563

Re: [fpc-pascal] Bls: Writing fpWeb app without Lazarus

2016-06-09 Thread leledumbo
> On > http://www.freepascal.org/~michael/articles/ > you can find some articles that explain the workings of fcl-web. > See web1, web2. WOW! You never said you did document for many things we don't know how to use properly yet. Must be put somewhere everyone else can see, Lazarus wiki would be

[fpc-pascal] Reasoning behind the inability to override a property

2016-06-05 Thread leledumbo
Just my curiosity about this particular "feature", why is property overriding not allowed (redeclaring with different visibility is however allowed)? e.g. consider the following code fragment: type TA = class private FP: Integer; public property P: Integer read FP; end; TB = cla

Re: [fpc-pascal] Parser Generator

2016-05-19 Thread leledumbo
> I am currently looking into integrating a custom language parser into my > program and have been > searching the web for parser generators that can create Pascal code from > a custom language. No parser generator that I know includes a code generator, you must write that part yourself at least

Re: [fpc-pascal] FCL: moving FastHTMLParser

2016-05-04 Thread leledumbo
> Isn't it in fpc.cfg? > -Fu/usr/local/bin/x.x.x/units/$fpctarget/* Must be. There's no magic in FPC, except there seems to be a hardcoded -Fu.. in the compiler. Try to execute `fpc -n -vt bogus` and you'll see the predefined paths. -- View this message in context: http://free-pascal-general.1

Re: [fpc-pascal] Is Generics.collections stable?

2016-04-21 Thread leledumbo
> I don't see a single unit test, so that would make me weary. I just fork it. I'll try to work on the unit test. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Is-Generics-collections-stable-tp5725030p5725034.html Sent from the Free Pascal - General mailing

Re: [fpc-pascal] Build in a C compiler

2016-04-20 Thread leledumbo
> C's comma (sequence) operator is possible to use in Pascal But your example doesn't show its use, probabyl you don't understand which comma operator I mean. Comma is used both as operator and argument/parameter separator in C, what I mean is the former, what you show is the latter. Here's the wi

Re: [fpc-pascal] Build in a C compiler

2016-04-19 Thread leledumbo
> That would be great. Nope > It is not that difficult. > { = begin > } = end > > and the other stuff is quite similar. Syntax is easy, well once you have fully working preprocessor too, but how about libraries? How will you convert scanf/printf/puts/etc? What if it uses 3rd party librarie

Re: [fpc-pascal] Any chance to add the TStringBuilder to FCL?

2016-04-15 Thread leledumbo
> We already have zero based strings in 3.0.0 if {$ZeroBasedStrings On} is > used (it's a local switch). It works with Ansi-, Wide- and > UnicodeString, but not with ShortString. *shocked* so many hidden treasures in FPC... -- View this message in context: http://free-pascal-general.1045716

Re: [fpc-pascal] Any chance to add the TStringBuilder to FCL?

2016-04-14 Thread leledumbo
> Is there any chance to add a class like Delphi's TStringBuilder to FCL? It would be very useful to port Delphi code libraries to Free Pascal. That exists mainly to overcome the read-only, 0-based string implementation limitations in Delphi NextGen, doesn't it? Porting will still require 0-based

Re: [fpc-pascal] TP lex change input buffer

2016-04-13 Thread leledumbo
> I'm using TP lex in my application and I would like to change the input buffer from using files to (memory) strings. What is the supposed way to do this? >From the comments: "The variables yyinput and yyoutput are the text files which are used by the lexical analyzer. By default, they are assign

Re: [fpc-pascal] Sqldb - How to pass an array of values as a param to be used with SQL IN operator?

2016-04-10 Thread leledumbo
> But until now i havent figured a way to pass an array of values (mostly integers) to be used with IN operators. That, unfortunately, is not possible. It's a DBMS limitation, parameterized values are actually passed as is to DBMS. So there's nothing you can do unless you can convince DBMS maintai

Re: [fpc-pascal] How do record variants without a field name?

2016-04-09 Thread leledumbo
> I posted this to Stack Overflow (http://stackoverflow.com/questions/36504292/iso-pascal-record-variants-without-a-field-name), but it hasn't gotten any feedback There are 2 answers already ATM, so I won't add the 3rd one (hard to get upvote :p) > what's the purpose of the Case Boolean part? Th

Re: [fpc-pascal] SVN FPC tag content?

2016-04-02 Thread leledumbo
> I am wondering if the FPC release tag for 3.0.0 is ever updated with > the bugfixes or if it is static. > I.e. if I want to get the bugfixes into my FPC do I have to update to > a new tag then? > Or is it OK just to make a svn up in the source dir? It seems to be static, otherwise branches/

Re: [fpc-pascal] Write Applet with FPC JVM

2016-04-02 Thread leledumbo
> It compiles with both Java and FPC, but the FPC version doesn't run. Works fine here: fpc-helloworld-applet.png > Any ideas? Any obvious mistakes of mine? I change your program to a unit, though I do

Re: [fpc-pascal] [heaptrc] no output for weblaz projects.

2016-03-26 Thread leledumbo
> Thanks, I tried that but it still does not work. But I discovered that's > because the program is never terminated gracefully. Stopping the > debugger after the html page is displayed (if ran from Lazarus) or using > Ctrl+C (if ran from the command line) does not fill heap.trc. > > However u

Re: [fpc-pascal] CMS in Pascal ?

2016-03-13 Thread leledumbo
> I am looking for an engine that takes some simple html or markdown and presents it using one or another nice template, with the necessary page links and whatnot. (as in the sample link I presented). Does this fit? http://www.biitsoft.com/products/cmsencorepro/index.htm -- View this messag

Re: [fpc-pascal] Android porting ideas

2016-02-21 Thread leledumbo
> Any ideas? Learn how Castle Game Engine and ZenGL managed to do it. They don't use JVM, but the ARM target of the compiler. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Android-porting-ideas-tp5724239p5724243.html Sent from the Free Pascal - General maili

Re: [fpc-pascal] Happy tickets benchmark

2016-02-19 Thread leledumbo
> Do you have any ideas why this kind of optimization is special? Didn't Florian said that this kind of optimization has no benefit in real world programs and will only increase compilation time? > For info, simple loop test like > > while i < 10 do > i := i + 1; > > shows that t

Re: [fpc-pascal] Primitive Record Wrappers

2016-02-18 Thread leledumbo
> What do you think about it? Is there any other solution? There's a reason why http://www.freepascal.org/docs-html/3.0.0/fcl/db/tfield.isnull.html is invented -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Primitive-Record-Wrappers-tp5724175p5724180.html Sen

  1   2   3   4   5   6   7   8   >