Showing posts with label free pascal. Show all posts
Showing posts with label free pascal. Show all posts

Wednesday, February 13, 2013

Adobe Photoshop 1.0 Source Code About 75% is in Pascal




You can read the full article on http://www.computerhistory.org/atchm/adobe-photoshop-source-code/

What i loved was the part about the Efficency and Productivity for Pascal Language , compare that with our days when you need large teams for large and ineficcient java EE projects







That first version of Photoshop was written primarily in Pascal for the Apple Macintosh, with some machine language for the underlying Motorola 68000 microprocessor where execution efficiency was important. It wasn’t the effort of a huge team. Thomas said, “For version 1, I was the only engineer, and for version 2, we had two engineers.”

With the permission of Adobe Systems Inc., the Computer History Museum is pleased to make available, for non-commercial use, the source code to the 1990 version 1.0.1 of Photoshop. All the code is here with the exception of the MacApp applications library that was licensed from Apple. There are 179 files in the zipped folder, comprising about 128,000 lines of mostly uncommented but well-structured code. By line count, about 75% of the code is in Pascal, about 15% is in 68000 assembler language, and the rest is data of various sorts. To download the code you must agree to the terms of the license.

Sunday, November 11, 2012

Using Lazarus IDE with Firebird in Ubuntu and Debian

Install the ide
sudo apt-get install lazarus-ide
Start the ide from the console/terminal

 lazarus-ide &
If everything went well you'll see a new tab called SQLdb. This tab will contain two components a TSQLConnection and a TSQLQuery.








SQLdb tab also contains a component TIBConnection that you can place it on the form


We will connect to /var/lib/firebird/2.5/data/employee.fdb
On the form put an TIBConnection, TSQLTransaction,TSQLQuery,TDatasource and an TDBGrid









TIBConnection is configured to have DatabaseName=/var/lib/firebird/2.5/data/employee.fdb
Password=masterkey
Username=sysdba
and Transaction=SQLTransaction1
You can put it to be Connected = True




Then configure SQLTransaction1
to use

Database=IBConnection1
Active =True;




Configure TSQLQuery this way

Database:IBConnection1
SQL=select * from employee;
Active = True;








Configure TDatasource
DataSet=SQLQuery1



Configure TDBGrid

DataSource = DataSource1




Next you can put an button and make them active from run time


procedure TForm1.Button1Click(Sender: TObject);
begin
SQLQuery1.Active:=true;
end;









Thursday, September 23, 2010

Why free pascal on the server side ? speed and memory and yes you can press the turbo button

If php tries to mimic a modern language with adding strict typing
http://www.otton.org/2008/08/06/stupid-php-tricks-true-false-comparison/
and some disoriented view of objects and namespaces (dos style "\" namespace anyone instead of "::" or "." ?) and then compiling it to pure c++ then asm with llvm
then why not using a proper language that do proper compilation and type checking from the start and is way faster

How fast ? 100 times , yes that is not a typo
and bonus 100 times less memory or more ~ 1000 times

Pascal can beat any of the dynamic languages for speed and memory and can beat anytime c++ at compilation speed :)
And by default it beats java at memory allocation :P i think anyone can beat that

here are some examples :
Let's first beat php
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=fpascal&lang2=php
Then ruby
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=fpascal&lang2=ruby
then javascript v8
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=fpascal&lang2=v8
then python
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=fpascal&lang2=python
and so on ...lua , mono c# , ...

It's just like having another 100x memory needed for one server or the cpu power
nobody gives you that for free : ask Amazon how much they charge per server or cpu power
and you get something 100x memory on your servers for free
let's say is 4G in typical configuration and with pascal in some area is like 100*4 = 4000G
compared with typical php/ruby one.
I mean no one will give you a sgi type machine with 1000 cpus and 4T of ram for free just to run some webpage or host a facebook type application
from 10.000 concurent users you can host more 100.000 or more 1M on the same machine
and that without working it to make it scalable
There are things to be improved the in benchmark war but pascal looks good on the server side
check extjspascal
and howto use json/javascript with object pascal on the server side

Saturday, November 01, 2008

This post is about an interview with Ales Katona (also known as Almindor) - A contributor to FPC, Lazarus and have few of his own open source projects as well such as Lentilwars and lnet. I have asked Ales to have an interview with me regarding the open source projects and some information about himself, and I hope you all find it interesting as I have.

Tuesday, October 21, 2008

I saw Delphi Developers Guide by Steve Teixeira and , Xavier Pacheco in an Book shop

and it is translated to Romanian language
I had tears in my eyes because I remember the days when I learned the Delphi/OOPascal/Interbase(Firebird) and all the examples are still fresh in my memory

This book I took it everywhere at school/at work /at home

Of course there are many other good books but today for me the free pascal docs are enough and the source

ps: also from the firebird conference I got the Marcu Cantu's book : Essential Pascal with his signature on it :)

Delphi/Free Pascal could be 2008 Language of the Year

It seems that Delphi Programming is an popular thing
and we must push it more (Delphi + Firebird)

http://www.delphi.org/2008/10/delphi-language-of-the-year-2008/
check the tiobe

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

I wonder when i will start an kernel module in pascal :)
imagine some kernel components on the components panel

Saturday, October 18, 2008

building process for free pascal compiler

http://www.stack.nl/~marcov/buildfaq.pdf

it's amazing how much work is done behind compiling your applications
Also this is an amazing team that progressed from an simple compiler
to an truly cross platform one (arm/x86,windows,x64,macosx,linux) and is really fast.

Tuesday, January 29, 2008

thinking loudly - FreePascal and Fastcgi

Morfik is precompiling the application into an cgi using pascal (fpc)
I was thinking what if the fastcgi can be used to run an pascal program precompiled with lazarus(fpc)


The main issue is that main scripting languages migrate to fastcgi: php , python, perl
and light httpd servers (nginix,lighttpd,apache+fastcgi module)

Why they migrate ? because apache threading doesn't work for scripts and we are back to cgi and share nothing architecture (kiss philosophy )

Friday, October 26, 2007

Mark Guzdial's Amazon Blog: What is the role of language in learning programming? (Part 2 of "What makes programming so hard?") Permalink

Most computing teachers who have worked over these 20 years will tell you that C++ and Java are clearly harder for students to use than Pascal. Measuring that additional complexity is a significant challenge (see earlier blog posting on the challenge of assessing learning about programming). Part of the problem is syntactic. C++ and Java require more typing and have more syntactic rules than earlier intro languages (Pascal, and also Logo or even Basic). There's another level of complexity, though -- the model of computation that a language requires the programmer to use.
Mark Guzdial's Amazon Blog: What is the role of language in learning programming? (Part 2 of "What makes programming so hard?") Permalink

Blogged with Flock