Re: [fpc-pascal] Import Pascal record function to C

2005-11-01 Thread Team Z505


> > On 10/31/05, Marco van de Voort <[EMAIL PROTECTED]> wrote:
> > > Runtime library initialising might also be a problem if the DLL uses 
> > > complex
> > > stuff internally?
> >
> > What do you mean by complex?
>
> Anything that needs stuff in the RTL initialised. Since this includes
> heapmanagement this affects a lot. (like ansistring usage)
>
> Can maybe get solved relatively easy btw (like a call to the DLL init code)

So you mean automated types, stringlists, and what not?

At least in my case, I will just be using just portable stuff like Pchars, 
arrays, bools,
longints, and simple stuff like that.

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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Team Z505


>It's a major issue. In here, we're having a serious programmer
>shortage. One of the coolest things about Lazarus is that it could
>allow us to hire people that comes from a Windows/Delphi background
>and integrate them into our Whatever/Linux enviroment. The problem is
>that not everyone is capable of writing correct (in terms of grammar
>and spelling) english code documentation.

>I have nearly 600k lines of Delphi code that was extensively
>documented in Spanish. I don't want to rewrite the whole documentation
>just because of a bug!


Have to tried translation tools? I have converted many Russian source code help 
files from
the KOL project into English using PROMT translator online. Once in a while you 
get a funny
translation like "I hit the code twice before she compiled me". But most of it 
is pretty
good and pretty legible, and A LOT more automated than doing it manually.

Translators like alta vista or babelfish are not nearly as good as PROMT.

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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Team Z505


>Well, I am aware of the fact that a visual design environment like lazarus
>(and delphi and VB), it's easy to fall into the trap to base your backend
>design on the GUI design. If Eclipse or KDevelop have a solution for this
>problem, then I'd like to hear it, but if they "solve" the problem by not
>being a visual design environment at all, the complete point is moot; then
>it's really unfair to say they're better because they *lack* features :-).
>
>Micha

Which is why again all that needs to be done is simply the programmer needs to 
ignore the
component palette, ignore Form1, and write everything from scratch in these 
cases if he
wants to. Just because Emacs has a crumby and slow textbased tetris games in 
it, doesn't
mean you have to use them either. It's just their for your convenience (yes, 
I'd hate to see
games inside Lazarus).

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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Micha Nelissen

Elio Cuevas Gómez wrote:

(and delphi and VB), it's easy to fall into the trap to base your backend
design on the GUI design. If Eclipse or KDevelop have a solution for this


Well, i never said these were better than Lazarus (in fact this is the first 
time i even mention them in this list). For me Eclipse is a resource hog and 


Yes, sorry, I replied to the wrong message, I was trying to get a 
response from Agustin, not necessarily from you; he did make the Eclipse 
comparison, and he said he liked that IDE better for OO stuff. But maybe 
that's because the unicode works and there is better refactoring (please 
be more specific, Agustin?) ?


Micha

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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Mattias Gaertner
On Mon, 31 Oct 2005 17:03:09 -0800
Team Z505 <[EMAIL PROTECTED]> wrote:

> 
> 
> >Well, I am aware of the fact that a visual design environment like
> >lazarus (and delphi and VB), it's easy to fall into the trap to base your
> >backend design on the GUI design. If Eclipse or KDevelop have a solution
> >for this problem, then I'd like to hear it, but if they "solve" the
> >problem by not being a visual design environment at all, the complete
> >point is moot; then it's really unfair to say they're better because they
> >*lack* features :-).
> >
> >Micha
> 
> Which is why again all that needs to be done is simply the programmer
> needs to ignore the component palette, ignore Form1,

I added menu items to hide the component palette and speed buttons.
See View -> View Component Palette
The IDE bar is not yet resized automatically. Use custom positions in the
environment options.


> and write everything
> from scratch in these cases if he wants to. Just because Emacs has a
> crumby and slow textbased tetris games in it, doesn't mean you have to use
> them either. It's just their for your convenience (yes, I'd hate to see
> games inside Lazarus).

Too bad. With the IDEIntf it is possible to add them.


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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Agustin Barto
On 10/31/05, Team Z505 <[EMAIL PROTECTED]> wrote:
> Have to tried translation tools? I have converted many Russian source code 
> help files from
> the KOL project into English using PROMT translator online. Once in a while 
> you get a funny
> translation like "I hit the code twice before she compiled me". But most of 
> it is pretty
> good and pretty legible, and A LOT more automated than doing it manually.
>
> Translators like alta vista or babelfish are not nearly as good as PROMT.
>

That'll be nice if I WANTED to translate it to english. There's a very
good reason why the code was written in spanish in the first place: El
programa va a ser liberado con licencia GPL, pero si alguien quiere
usarlo, sera mejor que comience a estudiar español desde ahora.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Vincent Snijders

Agustin Barto wrote:

On 10/31/05, Team Z505 <[EMAIL PROTECTED]> wrote:


Have to tried translation tools? I have converted many Russian source code help 
files from
the KOL project into English using PROMT translator online. Once in a while you 
get a funny
translation like "I hit the code twice before she compiled me". But most of it 
is pretty
good and pretty legible, and A LOT more automated than doing it manually.

Translators like alta vista or babelfish are not nearly as good as PROMT.




That'll be nice if I WANTED to translate it to english. There's a very
good reason why the code was written in spanish in the first place: El
programa va a ser liberado con licencia GPL, pero si alguien quiere
usarlo, sera mejor que comience a estudiar español desde ahora.


I don't understand why a user should learn spanish. User and program 
maintainer are two different entities, even for GPL released programs.


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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Agustin Barto
On 11/1/05, Micha Nelissen <[EMAIL PROTECTED]> wrote:
> Yes, sorry, I replied to the wrong message, I was trying to get a
> response from Agustin, not necessarily from you; he did make the Eclipse
> comparison, and he said he liked that IDE better for OO stuff. But maybe
> that's because the unicode works and there is better refactoring (please
> be more specific, Agustin?) ?

The answer is very simple: I can code faster. Eclipse is a
code-centric IDE (at least for the Java's views) with a lot of very
useful features to speed up the coding/refactoring process.

Lazarus, in that sense, is as good as Delphi; with source code
management tools that are a little simplistic (not entirely a bad
thing). That may be enough for a lot of people, but it certainly isn't
for me.

Of course this comparison means absolutely nothing given that we're
talking about completely different programming languages like
ObjectPascal (and the various fpc supported dialects) and Java (and/or
C++). Also I'm comparing a tool that's backed up huge corporations
against one that's developed with no corporate sponsorship (AFAIK).

At the end of the day it all comes down to which tool generates better
profit margins (I could say something about NetBeans vs Eclipse, but
that would be way off-topic). For my personal projects I don't
have a problem with Lazarus, or any other IDE/RADs, as long as their
"fun" to use (Lazarus is) and free (speech).
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Felipe Monteiro de Carvalho
On 11/1/05, Vincent Snijders <[EMAIL PROTECTED]> wrote:
> I don't understand why a user should learn spanish. User and program
> maintainer are two different entities, even for GPL released programs.

You guys are missing the point  the problem was never about the
users needing to read a language, but about programmers needing to
write comments on their own language.

And no, I won´t comment in english. Right now I just forget the á à ê
and substitute them by a and e.

--
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Learning new things in an imperfect world

2005-11-01 Thread Alan Mead
David Chandler <[EMAIL PROTECTED]> wrote:

> I am having trouble getting a standard top-of-the-page menu system
> to 
> work properly in Lazarus (Version 0.9.10 beta downloaded a few
> weeks ago).

I think you'll get more help with this on the Lazarus mailing list.

I think when you get results that don't make sense... like compiling
an example program and having it not work properly, then you don't
need to assume it is your own ignorance.

> --The strange thing is that when I exit the Lazarus development 
> environment and run the exe file, they all (the example program and
> my 
> test programs) work flawlessly.  The problem seems to be in Lazarus
> 
> being able to run its own code.

The problem of paths isn't unique to Lazarus ... I've had similar
problems in the old BP IDE.  And again the folks on the Lazarus
mailing list will be better equipped to lend a hand.

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


Re: [fpc-pascal] Learning new things in an imperfect world

2005-11-01 Thread Inpromptu

I'am the newbiest newbie in the known galaxy.

I've experimented the same problem: I can't run my program inside Lazarus 
(pressing F9). But, I can (and I do) just compile it (ctrl+F9), and run it from 
console (linux), or just doubleclick it (windows).

Imho, this is not an important problem. My program compiles fine, and works 
fine, in both Linux and Windows. 
With the SAME SOURCE CODE !!. This is the important thing, imnsho. Freepascal 
is an excelent compiler. I use it since 1.0.4 , and all my DOS legacy code run 
now on linux (dos, windows etc).

Excuse my english.

Inpromptu




> 
> I am having trouble getting a standard top-of-the-page menu system 
> to work properly in Lazarus (Version 0.9.10 beta downloaded a few 
> weeks ago).
> 
> --I am able to construct the menu, put in events, etc. using the 
> tools in Lazarus, however at run time it locks up.  I click on the 
> menu item (such as File or Edit, etc.) and instead of dropping down 
> the sub menus, the program locks up.
> --I tried a simple test program with no frills: just a menu, a 
> single menu item, and a sub menu.  I double clicked the submenu 
> item to create stub code for a handler.  Same result.  If there are 
> several menu items with no sub-menus, there is no problem, however.
> --I also tried one of the example programs that comes with Lazarus. 
>   Same result.  The error message I get when I stop the program is 
> "Project raised external exception class 'Externals: SIGSEGV'".  I 
> tried stepping through the program with the debugger.  What I got 
> were various messages saying Lazarus couldn't find different inc 
> files.  It gave me an opportunity to supply my own path, so after 
> searching around I provided a path (C:\lazarus\fpcsrc\rtl\inc\...), 
> after which it kept working until it came to another missing inc 
> file.
> --The strange thing is that when I exit the Lazarus development 
> environment and run the exe file, they all (the example program and 
> my test programs) work flawlessly.  The problem seems to be in 
> Lazarus being able to run its own code.
> 
> My frustration in trying to learn Delphi-like programming in an 
> imperfect environment is I can never tell whether it is my own 
> ignorance or a flaw in the system that is creating the problems.  I 
> am using Mastering Delphi 6 as one guide and any online docs and 
> tutorials I can find.  Beyond that I have to ask stupid questions 
> and hope for your patience.  It seems that if anyone has created 
> anything of value with Lazarus they must surely have been able to 
> create menus, so I assume I am doing something stupid, but all the 
> recent discussion of the immaturity of the Lazarus IDE makes me 
> wonder. I would like to hear from anyone who has successfully 
> navigated these waters.  I will probably have a few more problems 
> like this in getting up and running.  (I am a successful 
> self-taught DOS Borland Pascal programmer from the 1980's but never 
> used Delphi.)  If anyone who knows FPC/Lazarus well would be 
> willing to correspond with me directly to help me get over these 
> initial hurdles I would be able to spare the rest of you from 
> hearing my newbie woes.  My direct email is david at davidchandler 
> dot com.
> 
> --David Chandler
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal


-- 
___
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

Powered by Outblaze
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Suggested bug fix.

2005-11-01 Thread Lowell C. Savage

Bug fix to the BGI compatibility stuff.

Line 81, in "gtext.inc" in the "rtl\inc\graph" directory, needs to be the 
following:



opcodes = (_END_OF_CHAR, _DO_SCAN, _DRAW = 253, _MOVE = 254 );


This is so that it can properly read the old Borland BGI font files with 
line drawn fonts.


The original line (at least in V. 2.0.0) had just the default values and 
"_MOVE" was before "_DRAW" so that "_MOVE" was 2 and "_DRAW" was 3.  When I 
made this change, my program went from displaying nothing to displaying the 
proper fonts.


Hope this helps.

Lowell C. Savage
[EMAIL PROTECTED]



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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread L505


>That'll be nice if I WANTED to translate it to english. There's a very
>good reason why the code was written in spanish in the first place: El
>programa va a ser liberado con licencia GPL, pero si alguien quiere
>usarlo, sera mejor que comience a estudiar español desde ahora.


The internet uses english as the standard language. That is why I use it. If it 
is proven
that some other language should be used as the internet language, then I will 
use it. I do
enjoy the upside down question marks in spanish, as they help me locate 
questions in
articles easier (BEGIN and END of question).

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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Elio Cuevas Gómez
El Mar 01 Nov 2005 15:00, L505 escribió:
> >That'll be nice if I WANTED to translate it to english. There's a very
> >good reason why the code was written in spanish in the first place: El
> >programa va a ser liberado con licencia GPL, pero si alguien quiere
> >usarlo, sera mejor que comience a estudiar español desde ahora.
>
> The internet uses english as the standard language. That is why I use it.
> If it is proven that some other language should be used as the internet
> language, then I will use it. I do enjoy the upside down question marks in
> spanish, as they help me locate questions in articles easier (BEGIN and END
> of question).
>

Really? What's that standard, ihaven't read it :-).
For a GPL program is a good idea to document it in English if you want help 
from developers not speaking your language. The rest of the time, English 
stinks.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread L505

>Really? What's that standard, ihaven't read it :-).

http://z505.com/cgi-bin/qkcont/qkcont.cgi?p=English-Internet-Standard

>For a GPL program is a good idea to document it in English if you want help 
>from developers not speaking your language. The rest of the time, English 
>stinks.


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


Re: [fpc-pascal] Suggested bug fix.

2005-11-01 Thread Florian Klaempfl
Lowell C. Savage wrote:

> Bug fix to the BGI compatibility stuff.
> 
> Line 81, in "gtext.inc" in the "rtl\inc\graph" directory, needs to be
> the following:
> 
> 
> opcodes = (_END_OF_CHAR, _DO_SCAN, _DRAW = 253, _MOVE = 254 );
> 
> 
> This is so that it can properly read the old Borland BGI font files with
> line drawn fonts.

Applied, thx.

> 
> The original line (at least in V. 2.0.0) had just the default values and
> "_MOVE" was before "_DRAW" so that "_MOVE" was 2 and "_DRAW" was 3. 
> When I made this change, my program went from displaying nothing to
> displaying the proper fonts.
> 
> Hope this helps.
> 
> Lowell C. Savage
> [EMAIL PROTECTED]
> 
> 
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 

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


[fpc-pascal] File locking/protection in Linux

2005-11-01 Thread Antal
How can be avoided in Linux the file corruption due to simultaneous write 
access from two different process?

Or how can it be avoided to access the same file by two different process?
I experienced a few (but painful) data loss due to this problem, and I'm 
unable to solve the problem.

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


Re: [fpc-pascal] File locking/protection in Linux

2005-11-01 Thread L505
> How can be avoided in Linux the file corruption due to simultaneous write
> access from two different process?
> Or how can it be avoided to access the same file by two different process?
> I experienced a few (but painful) data loss due to this problem, and I'm
> unable to solve the problem.


The Pascal Server Pages project has a unit in it that allows this if you are 
interested. It
is not specific to Pascal Server Pages as far as I know.

Basically how it works is a simple time delay is put on the file until it is 
free again.
You can check FileShare.pp if you are intersted in a file locking read/write 
method.

SVN:
https://opensvn.csie.org/pspcgi/psp-1.5.x-devel/src/fileshare.pp

For documentation on how those units would be used, check:
http://z505.com/cgi-bin/psp/docs/1.4.1/psp_doc_i.cgi?p=mod.fileshare.html

Again, these units and documentation were written with regards to CGI 
programming. However,
file sharing is not specific to cgi programming of course!

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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Agustin Barto
On 11/1/05, L505 <[EMAIL PROTECTED]> wrote:
> The internet uses english as the standard language. That is why I use it. If 
> it is proven
> that some other language should be used as the internet language, then I will 
> use it. I do
> enjoy the upside down question marks in spanish, as they help me locate 
> questions in
> articles easier (BEGIN and END of question).
>

Yeah sure, and russian characters make killer smileys :)

The code for this program is in spanish because it is intended to be
used by researchers (basically it is an implementation of a method for
which there isn't any free implementation). The language choice is
only a matter of principles, it has nothing to do with any technical
reason, in fact I think spanish is a lousy language to use for coding
(it's too verbose and it's hard to get meaningful abbreviations).

I'd like to apologize to anyone that might have gotten offended by any
of my comments, it really wasn't my intention. It also wasn't my
intention to undermine the work of Lazarus' and fpc's developers. All
I can say is I'm sorry and thank you for providing us with a great
compiler and one of the very few integrated multi-platform free
(speech) RADs.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread L505



>The code for this program is in spanish because it is intended to be
>used by researchers (basically it is an implementation of a method for
>which there isn't any free implementation). The language choice is
>only a matter of principles, it has nothing to do with any technical

I think there isa  unicode version of synedit and it probably wouldn't take too 
much work to
get it working for freepascal

"Unicode Version: Actually into CVS there is available a UNICODE Version of 
synedit,
snapshots are available here"

I'm not experienced with unicode myself, but is this what you are looking for?

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


Re: [fpc-pascal] Lazarus and FPC integration

2005-11-01 Thread Agustin Barto
On 11/1/05, L505 <[EMAIL PROTECTED]> wrote:
>
> I think there isa  unicode version of synedit and it probably wouldn't take 
> too much work to
> get it working for freepascal
>
> "Unicode Version: Actually into CVS there is available a UNICODE Version of 
> synedit,
> snapshots are available here"
>
> I'm not experienced with unicode myself, but is this what you are looking for?
>

The problem is not with fpc. In fact the only thing I had to do what
to get the Delphi code to compile was shorten some method names.

I'm using Emacs and JEdit to code Pascal, so type Unicode (or
iso8859-1) is not a problem.

The problem was that I can't type any composed character (like á é ü)
on Lazarus. As someone already corrected me, this problem isn't
related to unicode, but with a gtk+ bug (or something like that).
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] File locking/protection in Linux

2005-11-01 Thread Tony Pelton
without looking at what the PSP code is doing ...

an article on this subject, specific to file locking on linux ...

http://lists.jammed.com/ISN/2003/06/0104.html

Tony

On 11/1/05, L505 <[EMAIL PROTECTED]> wrote:
> > How can be avoided in Linux the file corruption due to simultaneous write
> > access from two different process?
> > Or how can it be avoided to access the same file by two different process?
> > I experienced a few (but painful) data loss due to this problem, and I'm
> > unable to solve the problem.
>
>
> The Pascal Server Pages project has a unit in it that allows this if you are 
> interested. It
> is not specific to Pascal Server Pages as far as I know.
>
> Basically how it works is a simple time delay is put on the file until it is 
> free again.
> You can check FileShare.pp if you are intersted in a file locking read/write 
> method.
>
> SVN:
> https://opensvn.csie.org/pspcgi/psp-1.5.x-devel/src/fileshare.pp
>
> For documentation on how those units would be used, check:
> http://z505.com/cgi-bin/psp/docs/1.4.1/psp_doc_i.cgi?p=mod.fileshare.html
>
> Again, these units and documentation were written with regards to CGI 
> programming. However,
> file sharing is not specific to cgi programming of course!
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal