[fpc-pascal] Re: What are the changes between FPC 2.4.4 and 2.4.5?

2011-08-06 Thread leledumbo
http://www.freepascal.org/faq.var#versions -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/What-are-the-changes-between-FPC-2-4-4-and-2-4-5-tp4673155p4673681.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] Redirecting heap trace output to stdout

2011-08-17 Thread leledumbo
The only available function for dumping heap trace output is DumpHeap, which outputs to stderr. However, it's problematic to use it in a web environment, because web servers tend to give internal server error whenever stderr is not empty. Therefore, I'd like to redirect it to stderr, but I have no

[fpc-pascal] Re: Redirecting heap trace output to stdout

2011-08-17 Thread leledumbo
If it's on Linux, you can redirect stderr to stdout on the commandline... Err... it's the web server that calls my app, I didn't call it directly -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Redirecting-heap-trace-output-to-stdout-tp4708982p4709036.html

[fpc-pascal] Re: Redirecting heap trace output to stdout

2011-08-17 Thread leledumbo
assign(stderr,'somefile'); rewrite(stderr); Thanks, nicely done. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Redirecting-heap-trace-output-to-stdout-tp4708982p4710217.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] How does fpc Makefiles generate paths?

2011-09-13 Thread leledumbo
I don't want to maintain two separate tools, so I use unix tools from msys to build FPC. Since a few latest release, the tools no longer produce path in windows style (e.g. c:/folder/), but in unix style (e.g. \c\folder\). This causes failure when building fpc with 'cannot create archive

[fpc-pascal] Re: How does fpc Makefiles generate paths?

2011-09-13 Thread leledumbo
I've just found that the current pwd could be invoked with -W parameter to produce Windows style path. Perhaps overriding PWD with pwd -W when calling make helps? -- View this message in context:

[fpc-pascal] Writing generic enumerator

2011-10-10 Thread leledumbo
Is it possible to write one? Due to the nature of enumerator, the iterator and iterated class usually form mutual dependency. With normal classes, this is no problem as mutual dependency can be resolved with forward type declaration. But what if it's used with generic classes (and therefore

[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-19 Thread leledumbo
Hmm... I'm not really sure though, but I guess you could make use of array of const feature. See the documentation here: http://www.freepascal.org/docs-html/ref/refsu60.html -- View this message in context:

[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-21 Thread leledumbo
Maybe anonymous methods were introduced in other languages because they didn't have something like OP's procedure variables IMO, it's because they're lazy to declare things before they use it. Often, an anonymous function which first used just once eventually used more than once. When that

[fpc-pascal] Re: pchar with more than 255 characters

2011-11-12 Thread leledumbo
It works when {$LONGSTRINGS ON} or {$H+} directive exists. I think the compiler treats functions receiving array of char (or pointer to it) as ShortString when none of the directives above exist. -- View this message in context:

[fpc-pascal] Re: More fun with dynamic arrays

2011-11-18 Thread leledumbo
The correct results are obtained if 1) I substitute Var for Out. This leads to the warning that X is not initialized. var could be used to treat the parameter as in-out, so the warning is expected if you haven't initialized the variable before. As stated in the docs

[fpc-pascal] Advantages of THTMLPageProducer

2011-11-20 Thread leledumbo
What are the advantages of using THTMLPageProducer compared to directly generate HTML output (or via THTMLWriter)? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Advantages-of-THTMLPageProducer-tp5008206p5008206.html Sent from the Free Pascal - General mailing

[fpc-pascal] Re: Fatal: internal error 200611083

2011-11-26 Thread leledumbo
AFAIK an internal error is something that should NEVER happen, and when it does, it should be regarded as compiler bug. Just create a small program that could reproduce the behavior and send it to the bugtracker. -- View this message in context:

[fpc-pascal] Re: PPU checksum issue

2011-12-13 Thread leledumbo
Old PPU of base64, try recompiling everything (because there's a chance that more packages are having the same problem), make a clean build if possible. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/PPU-checksum-issue-tp5072092p5072617.html Sent from the Free

[fpc-pascal] Re: Testing applications with FPCUnit

2011-12-19 Thread leledumbo
Graeme, I think you should at least make a wiki page for this project. I also just know about it here. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Testing-applications-with-FPCUnit-tp5080219p5086098.html Sent from the Free Pascal - General mailing list

[fpc-pascal] Re: Forward declarations

2011-12-23 Thread leledumbo
Back to high school time, I use it for turn based battle system for a game. I have two mutually (tail-)recursive procedures where one is the player movement decision (full with prompts) while the other is the enemy's (some AI calculation takes the decision). The battle could start ambushed (enemy

[fpc-pascal] Re: Finished full JVM Android application

2011-12-30 Thread leledumbo
If there is interest I can publish the source code. I want it, I need it, give 'em to me, yeah! Anyway, are you using FPC-JVM or Lazarus-Android interface to accomplish this? -- View this message in context:

[fpc-pascal] Re: Finished full JVM Android application

2012-01-03 Thread leledumbo
Anyway, I have published the first version of the sources licensed under GPL here: Downloaded, will learn tonight ;) I thought the subject of the mail already says that I have used FPC-JVM for this. ;) Forget that question, my brain was crumpled. -- View this message in context:

[fpc-pascal] FPC JVM checkout problem

2012-01-03 Thread leledumbo
I'm checking out FPC JVM branch, however, in the middle of the process, it fails with Decompression of svndiff data failed. The error keeps occuring, so I guess it's not a connection problem or something unpredictable. I'm using latest TortoiseSVN by the way, which is compiled for SVN 1.7. --

[fpc-pascal] Re: FPC JVM checkout problem

2012-01-03 Thread leledumbo
I just repeat the procedure to it work again. It doesn't work for me :| Could you send me a zipped archive? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FPC-JVM-checkout-problem-tp5116983p5117086.html Sent from the Free Pascal - General mailing list archive

[fpc-pascal] Re: FPC JVM checkout problem

2012-01-04 Thread leledumbo
The problem might still be related to the MTU. Maybe a patch since then has exactly the right size to trigger the problem. Try lowering it a bit to see what happens. Hell yeah, I follow the suggestion in the thread to lower it down from 1500 to 1300 and it works! Thanks Jonas. -- View this

[fpc-pascal] Supported FPC revision to compile jvmbackend port

2012-01-07 Thread leledumbo
I've just updated my both normal fpc and jvmbackend port to revision 19992. However, the resulting compiler from normal fpc cannot be used to compile the jvmbackend port. It fails when compiling system unit, with these messages: make[7]: Entering directory

[fpc-pascal] Re: FPCUnit without Lazarus

2012-01-07 Thread leledumbo
FPCUnit is part of FCL and it doesn't require LCL. Of course if you install via packages under Lazarus components folder, it would depend on Lazarus parts (e.g, LCL), esp. for the runner. Open fpc/packages/fcl-fpcunit/src/demo for a pure FPC example. Or

[fpc-pascal] Re: Supported FPC revision to compile jvmbackend port

2012-01-08 Thread leledumbo
The same as always: the latest release. As of January 1st, 2012, that means 2.6.0 OK, I finally have a reason to use stable release... -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Supported-FPC-revision-to-compile-jvmbackend-port-tp5127717p5129054.html Sent

[fpc-pascal] Some questions regarding jvmbackend port

2012-01-08 Thread leledumbo
I finally managed to compile the latest revision of jvmbackend port, however I've got some problems during compilation and execution: 1. The wiki instruction The first paragraph says: Building the JVM compiler, RTL and utilities is currently not yet supported using the top-level makefile yet

[fpc-pascal] Re: Some questions regarding jvmbackend port

2012-01-08 Thread leledumbo
Additional info: assembling the resulting .j manually and execute the resulting .class works though -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Some-questions-regarding-jvmbackend-port-tp5129886p5129888.html Sent from the Free Pascal - General mailing list

[fpc-pascal] Re: Some questions regarding jvmbackend port

2012-01-08 Thread leledumbo
Pass -XP (without the quotes, but with the space after the parameter) to the compiler, then it will not prepend jvm-java- to the java binary. You might also want to check your fpc.cfg as there it might add the cpu-os-prefix unconditionally if it detects a crosscompilation (check for #IFDEF

[fpc-pascal] Re: Some questions regarding jvmbackend port

2012-01-08 Thread leledumbo
Since the title is still valid, I'd like ask about the usage of java collections in generic style. For instance java.util.ArrayList. How can I construct JUArrayList with Integer constraint as in Java? e.g.: ArrayListInteger a = new ArrayListInteger; -- View this message in context:

[fpc-pascal] Re: procedure variable and inc/dec procedures

2012-01-20 Thread leledumbo
more info: That TOrdinal type doesn't really exist. It serves as a generalization of all ordinal types, including user defined ones. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/procedure-variable-and-inc-dec-procedures-tp5153021p5160994.html Sent from the

[fpc-pascal] Re: Access violation that I do not understand while creating a class instance

2012-01-24 Thread leledumbo
Also you don't need to manually manage the storage, it will shrink and grow automatically as you append / delete it. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Access-violation-that-I-do-not-understand-while-creating-a-class-instance-tp5166208p5281650.html

[fpc-pascal] Re: TLinkedList

2012-02-10 Thread leledumbo
I don't remember having that since 2.X.X... there was always TList, however. And that's what I was using (I use generics for all my containers use now). -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/TLinkedList-tp5469685p5472934.html Sent from the Free Pascal

[fpc-pascal] Re: benchmarking functions

2012-02-16 Thread leledumbo
What I use: uses SysUtils,DateUtils; var BeginTime,EndTime: TDateTime; begin BeginTime := TimeOf(Now); // call the function here EndTime := TimeOf(Now); // whatever you need to do WriteLn(SecondSpan(BeginTime,EndTime)); // change to whatever XXXSpan function you like end. -- View

[fpc-pascal] Logging full runtime-error/exception backtrace

2012-02-20 Thread leledumbo
I want to log the full runtime-error/exception backtrace to a file. I've tried all methods explained http://wiki.lazarus.freepascal.org/Logging_exceptions here but none seems to give the full backtrace. i.e. when compiled with -gl, instead of just the address, I could also get line NN of file

[fpc-pascal] Re: level curve and surface generation code

2012-02-20 Thread leledumbo
Something like http://www.sulaco.co.za/opengl_project_terrain_generation_using_heightmaps.htm terrain ? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/level-curve-and-surface-generation-code-tp5499029p5499298.html Sent from the Free Pascal - General mailing

[fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-20 Thread leledumbo
I use this units to do that. Was someone with the nickname crhonos who made. Thanks, I'll try it :) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Logging-full-runtime-error-exception-backtrace-tp5499290p5500483.html Sent from the Free Pascal - General

[fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-20 Thread leledumbo
The resolution of file and address can only be done if your code is a) compiled with debug info and b) some code is available that can translate the debug info to the output. The first is done by -g, while the second is done by adding the l option. The latter adds the unit lineinfo or

[fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-21 Thread leledumbo
So the savest way to ensure that BackTraceStrFunc returns more than just the address us to use -gl I think I'm not clear enough to say that I have used -gl for this, and I don't get the line information. I've tried this on 2 places: ExceptProc and TApplication.OnException. -- View this message

[fpc-pascal] Re: dynamic array as a part of dynamically allocated records behavior

2012-02-25 Thread leledumbo
New is GetMem+Initialization. Dispose is Finaliziation+FreeMem. Working GR8, thanks! I didn't know about above equation until just now :p -- View this message in context:

[fpc-pascal] Re: What is the most widely used Pascal on Linux and other Unix variants?

2012-02-29 Thread leledumbo
That shouldn't happen. You are allowed to alias identifiers found in units used (and that's the unit scoping rule). The only case where duplicate identifier error occurs is when you have them in the same unit (either directly or via include files). -- View this message in context:

[fpc-pascal] Re: Duplicate Identifier

2012-02-29 Thread leledumbo
That's different case IMHO (In My Humble Observation), I guess it's something like this: {$mode objfpc} type TTestClass = class FTile: Integer; property Tile: Integer read FTile write FTile; procedure Test; end; procedure TTestClass.Test; var Tile: Integer; begin end; begin

[fpc-pascal] Re: Duplicate Identifier

2012-03-01 Thread leledumbo
However the compiler specifically names other units as the culprit, so who knows. Yep, and according to the error message, what if you open the corresponding unit at the position told by the compiler? Hint: Your form must be a descendant of TForm which perhaps has... guess it ;) -- View this

[fpc-pascal] Re: Duplicate Identifier

2012-03-02 Thread leledumbo
But if I have many methods with a identifier like Value, I will have to modify all methods and put something like lValue, Value1, etc. Trust me, that's MUCH better than letting the compiler compiles wrong code. i.e. it refers to identifier we don't mean to refer. I've had a lot of this before

[fpc-pascal] Re: Trim(): incompatibility with Delphi

2012-03-05 Thread leledumbo
Fpc Trim(): Trim whitespace from the ends of a string. Where did you get that? The documentation (http://www.freepascal.org/docs-html/rtl/sysutils/trim.html) doesn't say so... -- View this message in context:

[fpc-pascal] FPWebModule: BeforeResponse event?

2012-03-24 Thread leledumbo
I want to do something like this: A base module (call it ModLayout) writes a header, then a descendant module (say Mod1, Mod2 and so on) writes the inner content, ended by ModLayout writes the footer. With this scenario, the header and footer don't need to be written for each Mod1, Mod2 and so on,

[fpc-pascal] Request redirection + login session in fpweb

2012-03-28 Thread leledumbo
I'm currently building a web app using HTTP server application project + fpweb + tiopf (with sqlite backend). However, I'm stuck in this scenario: Imagine a user log's in to my web app, which could be done from any page (it's part of the layout), how can I: Save login data in session, in case the

[fpc-pascal] Re: Request redirection + login session in fpweb

2012-03-29 Thread leledumbo
Thanks, Michael. This framework is great, it just needs proper documentation... -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Request-redirection-login-session-in-fpweb-tp5602126p5603802.html Sent from the Free Pascal - General mailing list archive at

[fpc-pascal] Re: Request redirection + login session in fpweb

2012-03-29 Thread leledumbo
I've tried it out, but the session doesn't seem to be shared among modules, is it correct that I set CreateSession to true for all modules? Please try the updated project (attached). The authentication is handled by ModAuth, but the login form (or welcome message + logout link) is handled by

[fpc-pascal] Re: Request redirection + login session in fpweb

2012-03-31 Thread leledumbo
Found it in the combined example project, set Session.SessionCookiePath to the same string, whatever it is. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Request-redirection-login-session-in-fpweb-tp5602126p5609810.html Sent from the Free Pascal - General

[fpc-pascal] Re: Fileread function

2012-04-01 Thread leledumbo
Do you mean if FileRead executed when the file pointer is at the end of file, it would wrap around to the beginning? Or are you asking how to move the file pointer to the beginning of file? -- View this message in context:

[fpc-pascal] tiOPF: automapping for m-n relationships

2012-04-01 Thread leledumbo
I have the following tables in sqlite (in create table statement): CREATE TABLE users ( id autoinc_int, name varchar(30), password varchar(30) ); CREATE TABLE roles ( id autoinc_int, name varchar(20) ); CREATE TABLE users_roles ( id autoinc_int, user_id int, role_id int,

[fpc-pascal] Re: tiOPF: automapping for m-n relationships

2012-04-02 Thread leledumbo
Ouch, that's a bit bad to hear, I thought I could get something simpler. I'll try to implement that relationship manager pattern because I want to avoid direct sql. -- View this message in context:

[fpc-pascal] Re: tiOPF: automapping for m-n relationships

2012-04-03 Thread leledumbo
Use the tools! :-) Lazarus's Data Desktop (I think that's the name) can generate complete units of code with SQL for you. Oh, yeah. I remember ever tried that feature (generating tiOPF classes) but only had a glance look at it. I guess this is the time to have a serious look at it B) -- View

[fpc-pascal] Re: CGI under Linux using FCL-Web

2012-04-04 Thread leledumbo
If I had debug writelns in the code, it complained about misformed header format - showing the first debug output line) michael said: * Do not attempt I/O to standard input/output/error. -- View this message in context:

[fpc-pascal] Re: [Help] fppkg on Windows

2012-04-10 Thread leledumbo
Try set a full path to the compiler driver binary (fpc.exe) or put its directory in PATH. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Help-fppkg-on-Windows-tp5628510p5629238.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] Re: Problems with assigning pointers

2012-04-10 Thread leledumbo
Can't reproduce with the following program: type TVertex = record x: double; y: double; end; PVertex = ^TVertex; TEdge = record v1: PVertex; v2: PVertex; end; var edge_count: LongWord = 0; edge_list: array of TEdge; procedure add_edge(v1, v2: PVertex); begin

[fpc-pascal] for FPC JVM users: Small tool to help converting R.java to Pascal

2012-04-11 Thread leledumbo
I've developed a small tool to help converting the autogenerated R.java to Pascal. It's made in a quick and dirty way, but it works. It could be added to build script to automatically do the conversion before compiling. It takes 1 command line parameter which is the path to R.java and outputs the

[fpc-pascal] Re: Program without window but messages

2012-04-25 Thread leledumbo
You need to call Application.Initialize prior to anything if you want to use LCL features (including its dialogs). Your uses clause seems overkill. Only Interfaces, Forms and Dialogs units required for ShowMessage function. -- View this message in context:

[fpc-pascal] Re: How to install another version of fpc?

2012-04-30 Thread leledumbo
fpc would look for the compiler in the same directory as it is. I believe your fpc resides in /usr/bin or /usr/local/bin -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/How-to-install-another-version-of-fpc-tp5672688p5675207.html Sent from the Free Pascal -

[fpc-pascal] Re: Linux sound (especially MIDI) programming: ALSA?

2012-05-07 Thread leledumbo
http://sourceforge.net/projects/fpalsa/ http://sourceforge.net/projects/humus/ -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Linux-sound-especially-MIDI-programming-ALSA-tp5688908p5690300.html Sent from the Free Pascal - General mailing list archive at

[fpc-pascal] Re: Parsing parameters inside an interpreter

2012-05-14 Thread leledumbo
SScanf from SysUtils unit. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Parsing-parameters-inside-an-interpreter-tp5708067p5708704.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___

[fpc-pascal] fcl-web: custom URL dispatcher/mapper

2012-05-26 Thread leledumbo
By default, fcl-web uses the following dispatching schema: host/module/action Is there anyway to customize this behavior? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fcl-web-custom-URL-dispatcher-mapper-tp5709875.html Sent from the Free Pascal - General

[fpc-pascal] Re: Getting an output string from a TProcess

2012-06-01 Thread leledumbo
Commandline is signed as deprecated, so what is the best way to pass a string to TProcess? Is the commandline the first item of the tstrings called parameter? http://www.freepascal.org/docs-html/fcl/process/tprocess.commandline.html See something that explains it there? The output is a

[fpc-pascal] Re: Getting an output string from a TProcess

2012-06-02 Thread leledumbo
WUAOOOW!!! Where are those functions, Marco? Which revision implements them? And last but not least, do those functions consider BIG output? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Getting-an-output-string-from-a-TProcess-tp5709934p5709940.html Sent from

[fpc-pascal] jvmbackend merge

2012-06-02 Thread leledumbo
I saw a big commit merging jvmbackend branch into the main branch. Is it stable already? I currently have both from svn, if it's already stable I'm planning on deleting the jvmbackend only. -- View this message in context:

[fpc-pascal] Re: Getting an output string from a TProcess

2012-06-02 Thread leledumbo
In 2.7.1 (trunk) I mean... which unit? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Getting-an-output-string-from-a-TProcess-tp5709934p5709943.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] Re: jvmbackend merge

2012-06-03 Thread leledumbo
I tried building the compiler, it passes but I have to do some changes. The make process fails after compiling the compiler ended with some warnings regarding constructing a class with abstract method in compiler/jvm/hlcgcpu.pas. The compiler seems to return exit code 1 on warnings and that's the

[fpc-pascal] Re: asm statement

2012-06-12 Thread leledumbo
What happens if there is only the end; statement without the used registers? The compiler couldn't save the values in the registers prior to the asm block. If they contain intermediate result, they may be gone and unexpected result would come. CMIIW. -- View this message in context:

[fpc-pascal] Re: encryption and decryption

2012-06-23 Thread leledumbo
How to use TBlowFishEnCryptStream? Is there any example for mortals? No but I guess the doc is clear enough. To encrypt: 1. Create TBlowFishEnCryptStream instance supplying a key and the stream to write encrypted data to 2. Write the data using its Write method 3. Flush or Free (Free implies

[fpc-pascal] Re: encryption and decryption

2012-06-24 Thread leledumbo
For examples, I think it's better to use the data type wrapper of the Read/Write, instead of using the low level methods: {$mode objfpc}{$H+} uses classes,blowfish; var en: TBlowFishEncryptStream; de: TBlowFishDeCryptStream; s1,s2: TStringStream; key,value,temp: String; begin key :=

[fpc-pascal] Re: Longstrings

2012-07-03 Thread leledumbo
Example of this no effect? {$H+} should do it. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Longstrings-tp5710228p5710229.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal

[fpc-pascal] Re: Longstrings

2012-07-04 Thread leledumbo
No, directives at most have only unit scope. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Longstrings-tp5710228p5710236.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal

[fpc-pascal] Should FCL documentation be splitted?

2012-07-05 Thread leledumbo
I would like to document some of the FCL, however the layout is still like the first time it appears in FPC. Current FCL are splitted into many subpackages, and since the number of units is HUGE (which I guess the same reason why the package was splitted) would it be better to split the

[fpc-pascal] Re: Should FCL documentation be splitted?

2012-07-06 Thread leledumbo
OK, I'll keep it that way. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Should-FCL-documentation-be-splitted-tp5710248p5710250.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___

[fpc-pascal] Re: Should FCL documentation be splitted?

2012-07-06 Thread leledumbo
No, I only want to (and am capable to) document FCL :p -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Should-FCL-documentation-be-splitted-tp5710248p5710252.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] Define for -gh

2012-07-09 Thread leledumbo
Seems like I can't find it. Is there anything defined when I pass -gh? I need it to create optional feature of memory leak tracer. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Define-for-gh-tp5710270.html Sent from the Free Pascal - General mailing list

[fpc-pascal] Cross platform signal handler?

2012-07-14 Thread leledumbo
Do we have it? And if not, what's the available solution for windows? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Cross-platform-signal-handler-tp5710328.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] Re: Cross platform signal handler?

2012-07-15 Thread leledumbo
It will depend on what you want to achive. So, what do you need it for? Handle Ctrl+C and other kinds of forced program termination. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Cross-platform-signal-handler-tp5710328p5710332.html Sent from the Free Pascal

[fpc-pascal] Re: Cross platform signal handler?

2012-07-16 Thread leledumbo
Thanks, that's closer, I hope the linux ifdef could be replaced with unix (Mac OS X is *nix, right?). I wonder why we don't have it at RTL level... -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Cross-platform-signal-handler-tp5710328p5710355.html Sent from the

[fpc-pascal] Re: UnicodeString comparison performance

2012-07-20 Thread leledumbo
I look at the generated code and in the direct one there's additional overhead of decrementing the reference counter on each iteration. Here's what the core code looks like: Direct: leal -56(%ebp),%eax call fpc_unicodestr_decr_ref leal -56(%ebp),%eax call

[fpc-pascal] Nginx, FastCGI and /module/action vs ?module=moduleaction=action

2012-07-22 Thread leledumbo
I have a web app that works fine with embedded http server, but due to its current bugs, I need to switch to something more reliable. So I choose FastCGI and a great web server for this so far is Nginx for me. This is the configuration for my web: server { listen 80; index

[fpc-pascal] Re: Nginx, FastCGI and /module/action vs ?module=moduleaction=action

2012-07-22 Thread leledumbo
Please report any bugs you find. I know of only 1 bug that is connected to reliability. I would, but the error is intermittent and it's difficult to create a test program that always generates the bug. Module/action syntax depends on how the PATHINFO variable is passed to the CGI/FastCGI

[fpc-pascal] Re: Nginx, FastCGI and /module/action vs ?module=moduleaction=action

2012-07-22 Thread leledumbo
It's indeed nginx fastcgi configuration issue, I've managed to make it work somehow by reading its documentation. Thanks :) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Nginx-FastCGI-and-module-action-vs-module-module-action-action-tp5710411p5710416.html

[fpc-pascal] Re: Nginx, FastCGI and /module/action vs ?module=moduleaction=action

2012-07-22 Thread leledumbo
Basically I just have to add this: http://wiki.nginx.org/HttpFastcgiModule#fastcgi_split_path_info location / { fastcgi_split_path_info ^((?U).+www.tkd1depok.org)(/?.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED

[fpc-pascal] Re: UnicodeString comparison performance

2012-07-23 Thread leledumbo
That one I cannot answer, please summon Florian/Jonas/Marco/Michael/whoever capable to answer -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/UnicodeString-comparison-performance-tp5710405p5710423.html Sent from the Free Pascal - General mailing list archive

[fpc-pascal] Re: Nginx, FastCGI and /module/action vs ?module=moduleaction=action

2012-07-23 Thread leledumbo
Seems like the old IncludeHTTPPathDelimiter bug strikes back (AFAIR it's been closed when I said Marco's patch works), I need to change: procedure RegisterFileLocation(const ALocation,ADirectory: String); begin ... if (ADirectory='') then

[fpc-pascal] Re: Generating templates with FPTemplate

2012-07-27 Thread leledumbo
try this: type TMyTemplate = class(TFPTemplate) private procedure ReplaceMyTags(Sender : TObject; Const TagString : String; TagParams:TStringList; Out ReplaceText : String); public constructor Create; end; procedure TMyTemplate.ReplaceMyTags(Sender : TObject; Const TagString :

[fpc-pascal] Re: Generating templates with FPTemplate

2012-07-27 Thread leledumbo
Hey, that's nice, Michael. I never think of using TTemplateParser directly as I thought it was meant to be used internally by TFPTemplate only. Now I see that it actually has more features through OO approach instead of event driven. -- View this message in context:

[fpc-pascal] Re: File Enumeration speed

2012-07-28 Thread leledumbo
does the operating system keep an index somewhere ? ls doesn't, find does AFAIK. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/File-Enumeration-speed-tp5710462p5710465.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] Re: Initialization of class field

2012-07-31 Thread leledumbo
I think the fast point from OP point of view is the less typing, less source code. Not from executable point of view. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Initialization-of-class-field-tp5710475p5710478.html Sent from the Free Pascal - General

[fpc-pascal] Re: printing each Friday the 13 using Pascal

2012-08-06 Thread leledumbo
Converting one of the answers there... uses SysUtils; const StartingYear = 2012; var Year,Month: Byte; Date: TDateTime; begin for Year in [0 .. 5] do begin for Month in [1 .. 12] do begin Date := EncodeDate(Year,Month,13); if DayOfWeek(Date) = 5 then begin

[fpc-pascal] Re: printing each Friday the 13 using Pascal

2012-08-06 Thread leledumbo
Sorry, missing one thing: Date := EncodeDate(StartingYear + Year,Month,13); -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/printing-each-Friday-the-13-using-Pascal-tp5710496p5710498.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

[fpc-pascal] GDB 7.4 FP IDE

2012-08-18 Thread leledumbo
I would like to build FP IDE with debugger support, it's been a long time since I did it (and it was on windows). I've built GDB plainly (simply ./configure), and I have all necessary libraries (python, expat, decnumber, zlib) but upon linking the IDE I got undefined references to those libraries.

[fpc-pascal] Re: GDB 7.4 FP IDE

2012-08-18 Thread leledumbo
Sorry, please ignore. My 7.4-2012.04 version is detected as 7.5 which doesn't have a define yet in gdbint, I simply copy from 7.4 and it works. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/GDB-7-4-FP-IDE-tp5710850p5710851.html Sent from the Free Pascal -

[fpc-pascal] Re: Assembler file generate by compiler

2012-08-19 Thread leledumbo
For finding a solution: what does the message from fpc compiler: Note: Switching assembler to default writing assembler means exactly? http://www.freepascal.org/docs-html/user/userse70.html AFAIK when -a is given, the internal assembler can't be executed (the internal assembler seems to work

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread leledumbo
Requiring all functions to be allways fully qualified will make the most commom case worse than current implementation just to be better for the uncommon case. This is a step back, not forward... Indeed, and the way unit system works has an advantage: changing entry order / entry name in the

[fpc-pascal] Link against .so generated by ppumove

2012-08-22 Thread leledumbo
I've created a .so from a unit by compiling it to .ppu and .o and then executes ppumove on the .ppu. Now I've got the .so and .ppl (extension specified with -e), how can I tell fpc to link against them instead of the .ppu and .o? I've tried with -XD with no success. -- View this message in

[fpc-pascal] FP IDE: Debuggee redirection under Linux

2012-08-24 Thread leledumbo
When I was on Windows, use another tty for debuggee works fine. The output gets its own console, and I can debug while watching the output. I'm on Kubuntu now so my terminal is Konsole. If I set /usr/bin/konsole as debuggee, then the program doesn't seem to run (the breakpoint line never gets

[fpc-pascal] Re: Identifier not found result

2012-08-30 Thread leledumbo
Since this behavior is documented, one should read the documentation first: http://www.freepascal.org/docs-html/ref/refse76.html Anyway, how could one find that Result is used as function result without reading the docs? -- View this message in context:

[fpc-pascal] Re: Identifier not found result

2012-08-31 Thread leledumbo
I question your assumption that Result is specifically more important than the other incompatibilities among different modes (i.e. your statement that it will help...a lot). I do not say that it is wrong to be more helpful in error messages, but rather that your proposal tries to fix a very

[fpc-pascal] ELF internal linker state

2012-09-09 Thread leledumbo
I see ELF internal linker is already in the compiler source, how's the current state? Is it usable already? Passing -Xi doesn't seem to call it however. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/ELF-internal-linker-state-tp5711193.html Sent from the Free

  1   2   3   4   5   6   7   8   >