Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-05

Port of TechnoJocks Turbo Toolkit?

15 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dan Clough

Hello,

Wondering if there is a Linux port of Bob Ainsbury's excellent "TechnoJocks Turbo Toolkit" from the TP4/5 days. I was digging through Google and some mailing list archives and saw where Bob had given his permission for it, but the threads seem to die out without any more information on whether it actually got done.

Does anyone know if this is available, and if not, would anyone be willing to do it? I am a novice with Pascal, but have some old code from TP5 that I'd like to be able to use (it uses many of the TTT units). Some of the units have (a little) ASM/OBJ stuff that I am unable to convert to pure Pascal, as I don't have the skill. Can anyone help with this?

Thanks and best regards,
Dan C

Reply by email

Tony Pelton
to Dan Clough

hi all,

new to the list.

please get out your tissues for the tear jerking story i am about to tell about how i've fallen in love with Free Pascal, then, at the end, there will be a plea for a little help.

first, i want to say thanks to whomever for Free Pascal.

i had never touched Pascal before about a week ago.

I am a Java programmer for my day job and haev messed with 'C' a little on and off over the years to solve small problems, or to patch small bugs, but never to try and use it to do full projects of any type.

For fun, on and off for probably 6-9 months, i had been trying to get competent with 'C'/'C++' to do "plugins" for an SDK that had been released for a flight simulator that consumes entirely too much of my free time.

suffice it to say, using *open source* 'C'/'C++' tools to get anything done as a noob is hardcore.

i was actually to the point where i had mostly given up on trying to implement plugins, because it just seemed that no matter what i tried, i would hit road blocks with compile problems, lack of being able to compile 3rd party support for some piece of middleware (XML for instance) etc, compiling to "libs" issues, export issues ... argh ...

i just couldn't get anywhere.

i saw a posting on slashdot a week ago for Free Pascal.

i was checking out the site, and out of pure whimsy, i downloaded the Win32 package.

at first, i really wasn't thinking about my 'C'/'C++' just decided to check out the software on a lark.

as i was poking around with the newly installed software, it occurred to me, that the SDK for my flight sim had Pascal bindings.

i decided to see if i could get one of the pascal examples they provide in the SDK to build/run.

i actually had a couple problems with the examples because it was written for Delphi.

one if fixed by poking around for a minute in the IDE and finding the "Delphi" switch.

the other was to change a Use from OpenGL12 to GL.

without knowing anything about Pascal, i was able to tweak a couple of minor things, and build it.

I had it running in about 10 minutes.

I was blown away.

i've been programming and working professionally with computers for 12+ years, and within a week, i have fallen completely in love with Pascal.

I found an awesome 3D "geometry" lib, that i downloaded, dropped into a directory, added a Use line for in my source and was off an running.

if it had been a 'C' source project, i'd still be messing around with it.

brilliant.

so ... now that i've wiped the tears from my eyes.

the one thing that looks like it is going to be really painful for me with Pascal is the seeming lack of out of the box data structures.

in Java, there are a _very_ rich set of "collections" to use.

i've done some poking around on the net, and within the "units" that come with free pascal.

i'm not seeing anything right off that looks like a nice,clean,portable little unit that would emulate what i might find in java collections or C++ vector stuff.

anyone know of a quality implementation of this kind of stuff ?

minimally, an automatically resizing array implementation and a Hashtable ?

tia,
Tony

Reply by email

Florian Klaempfl
to Tony Pelton
Tony Pelton wrote
I had it running in about 10 minutes. I was blown away.

I'am also working at work daily with C++ but it can't beat the productivity of pascal.

i'm not seeing anything right off that looks like a nice,clean,portable little unit that would emulate what i might find in java collections or C++ vector stuff.

Well, you usually don't use autoresizing arrays in object pascal because it has usually a big performance penalty. You usually use a dyn. array which length you set yourself when needed:
http://www.freepascal.org/docs-html/ref/refsu14.html#x36-410003.3.1

For other needs you might use TList:
http://www.freepascal.org/docs-html/rtl/classes/tlist.html or TCollection:
http://www.freepascal.org/docs-html/rtl/classes/tcollection.html

The fcl unit contnrs contains more container classes but isn't complete and documented yet.

Reply by email

Michael Van Canneyt
to Tony Pelton: new to the list. please get out your tissues for the tear jerking story i am about to…
Tony Pelton wrote 16 lines
the one thing that looks like it is going to be really painful for me with Pascal is the seeming lack of out of the box data structures. in Java, there are a _very_ rich set of "collections" to use. i've done some poking around on the net, and within the "units" that come with free pascal. i'm not seeing anything right off that looks like a nice,clean,portable little unit that would emulate what i might find in java collections or C++ vector stuff. anyone know of a quality implementation of this kind of stuff ? minimally, an automatically resizing array implementation and a Hashtable ?

You might want to try Decal; It's a rich set of container classes. Although written for Delphi, it should compile for FPC without too much hassle; if not, feel free to contact me, I'll see what I can do.

Michael.

Reply by email

Tony Pelton
to Michael Van Canneyt
Michael Van Canneyt wrote
You might want to try Decal; It's a rich set of container classes. Although written for Delphi, it should compile for FPC without too much hassle; if not, feel free to contact me, I'll see what I can do.

this looks nice.

thanks for the heads up.

i was also enlightened by the other poster that pointed me at the 'Classes' unit in the RTL.

somehow, i missed those.

still finding my way around ... its only been a week.

It looks like the Classes unit is going to put enough tools in my toolbag for the time being.

again, thanks for the heads up.

Michael.

Tony

Reply by email

Nico Aragón
to Tony Pelton: new to the list. please get out your tissues for the tear jerking story i am about to…
Tony Pelton wrote
minimally, an automatically resizing array implementation and a Hashtable ?

Some time ago I used Barry Kelly's hash table implementation. It worked very well for me.

You can download it from Torry's:

http://delphi.icm.edu.pl/ftp/d20free/bkhash11.zip

I've just compiled it succesfully with FPC in Linux.

Maybe the version at Borland's Code Central is newer, but you'd need a login to download the file:

http://codecentral.borland.com/ccweb.exe/author?authorid=38913

Hope it helps.

saludos, Nico Aragón

Reply by email

Marco van de Voort
to Michael Van Canneyt: You might want to try Decal; It's a rich set of container classes. Although written for…
Show quoted text 8 lines
On Sat, 21 May 2005, Tony Pelton wrote: > anyone know of a quality implementation of this kind of stuff ? > > minimally, an automatically resizing array implementation and a Hashtable ? You might want to try Decal; It's a rich set of container classes. Although written for Delphi, it should compile for FPC without too much hassle; if not, feel free to contact me, I'll see what I can do.

Decal is in projects/contrib in cvs and one of the candidates to be added to FPC packages/contrib

Own version of the docs: http://www.stack.nl/~marcov.decal.pdf

Reply by email

L505
to Marco van de Voort

Hi,

Problem:
On the FPC community boards a while ago, I posted some problems with recompiling issues. When I was using the Synapse library, for some reason 10,000 lines of code were being recompiled!

Solution:
The synapse files were in CAPS LOCK.. i.e. SYNASSL.PAS, SYNABLOCK.PAS When I renamed the files to lower case, everything does not recompile now. No more 10,000 lines compilation!

I thought that the uppercase was only an issue with eariler compilers? (I haven't researched this.. just that lazarus told me "would you like to rename the file to lowercase for 1.0 compatability?".

The compiler I was using was 1.9.6

Are caps lock files supposed to be bad on purpose, for compilers above 1.9.6 or would this have bin a minor bug?
I'll also try with 2.0.0 soon.

This is on a Linux machine. But I think the issue also exists on a Windows machine too, from what I tried briefly.

Regards,
Lars

p.s. So it appears that FPC does not like it when you can understand, myself.

Reply by email

Peter Vreman
to L505
you wrote 17 lines
Hi, Problem: On the FPC community boards a while ago, I posted some problems with recompiling issues. When I was using the Synapse library, for some reason 10,000 lines of code were being recompiled! Solution: The synapse files were in CAPS LOCK.. i.e. SYNASSL.PAS, SYNABLOCK.PAS When I renamed the files to lower case, everything does not recompile now. No more 10,000 lines compilation! I thought that the uppercase was only an issue with eariler compilers? (I haven't researched this.. just that lazarus told me "would you like to rename the file to lowercase for 1.0 compatability?".

If the compiler needs to search for a file it will use the following order:

1. OriginalCase
2. lowercase
3. UPPERCASE

Peter

Reply by email

Lukas Gebauer
to L505: Problem: On the FPC community boards a while ago, I posted some problems with recompiling…
Solution: The synapse files were in CAPS LOCK.. i.e. SYNASSL.PAS, SYNABLOCK.PAS When I renamed the files to lower case, everything does not recompile now. No more 10,000 lines compilation!

??? All Synapse source files are distributed in lowecase. How you got filenames in uppercase?

Lukas Gebauer. E-mail: WEB: http://www.ararat.cz/synapse - Synapse Delphi and Kylix TCP/IP Library

Reply by email

L505
to Lukas Gebauer

Oops I didn't mean it was Synapse's fault, Lukas. No it was another problem - the files got converted to upper case on my computers, some how.. during a transfer from one PC to the other.

What I think caused the problem was when I was using CoLinux. When you use a "Cofs device" on CoLinux, some of the files get transfered to uppercase when you copy over from windows to Linux.

So in fact, any upper case PAS file would casue problems, nothing to do with Synapse directly, gladly.

Lars

Earlier message 28 lines
----- Original Message ----- From: "Lukas Gebauer" To: "FPC-Pascal users discussions" Sent: Sunday, May 22, 2005 3:37 AM Subject: Re: [fpc-pascal] Excessive Recompiling: UPPER case files. | > Solution: | > The synapse files were in CAPS LOCK.. i.e. SYNASSL.PAS, SYNABLOCK.PAS When | > I renamed the files to lower case, everything does not recompile now. No | > more 10,000 lines compilation! | | ??? All Synapse source files are distributed in lowecase. How you got | filenames in uppercase? | | | -- | Lukas Gebauer. | | E-mail: | WEB: http://www.ararat.cz/synapse - Synapse Delphi and Kylix TCP/IP | Library | | | | _______________________________________________ | fpc-pascal maillist - | http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

L505
to Peter Vreman: If the compiler needs to search for a file it will use the following order: 1.…

| If the compiler needs to search for a file it will use the following order: |
| 1. OriginalCase
| 2. lowercase
| 3. UPPERCASE
|
|
| Peter

Hi Peter..

The PPU files didn't seem to be generated with an upper case file.. so every time I compiled an application with upper case units, no PPU files were generated for those files only. However, in the uses clause, I had some lower case units. These files were generated into PPU.

So with a mixture of lower and upper case files, only the lower generated PPU. Any ideas?

Lars

Reply by email

Tony Pelton
to Dan Clough: Wondering if there is a Linux port of Bob Ainsbury's excellent "TechnoJocks Turbo…

hi all,

i'm new to Free Pascal.

wanted to throw this out to the group, see what they thought.

i was trying to port an algo written in 'C' to pascal.

i had written this much of the included function, and for some reason, out of some reflex, i mistakenly tried to compile it, Alt+F9.

The 'fp.exe' IDE on Windows crapped out, with the IDE "flashing" and information about how i needed to save my files as the IDE was going to shutdown.

RADIUS_EARTH_KILOMETERS is a 'const : Double'.

is this something i should report to someone, and if so, who/where ?

-- SNIP --
{ lat lon need to be in radians }
function XSACalcFlatEarthCoord(lat,lon : Double) : TPoint2D;
Var lat0,lon0 : Double;
Var R1, R2 : Double;
Var e : Double = .001;
begin
lat0 := 0.0;
lon0 := 0.0;
R1=RADIUS_EARTH_KILOMETERS(e)/(e*(sin(lat0))^2)^(3/2);
end;

Reply by email

Tony Pelton
to Tony Pelton
Tony Pelton wrote
Var e : Double = .001;

fwiw, after _alot_ of trial/error/ide segv's, i was able to isolate the problem to the above 'Var' declaration.

Var e : Double = 0.001;

... works much better.

*shrug*

Tony

Reply by email

Jonas Maebe
to Tony Pelton
Tony Pelton wrote 8 lines
> Var e : Double = .001; fwiw, after _alot_ of trial/error/ide segv's, i was able to isolate the problem to the above 'Var' declaration. Var e : Double = 0.001; ... works much better.

Does simply having that statement in a random program crash the IDE for you? At least it doesn't seem to crash the command line compiler, it just gives an error.

Jonas

Reply by email