Pascal IDE for Mac OS X - macos

i'm a beginner Pascal programmer and I recently migrated to the Mac OS X. Today I spent many hours searching for a good Pascal IDE for this OS and found nothing. I used to write code with Geany on Windows and it worked like a charm, I also enjoyed the compiling and running capacity of Geany.
Do you know any Geany-like IDE or at least one that highlights, compiles and runs pascal code on the Mac OS X?
Thank you very much!

Let's try Lazarus, integrated development environment for Free Pascal.
http://www.lazarus.freepascal.org/

People use XCode with a suitable set of templates, but XCode lost pascal syntax highlighting a way back. There are other options:
Pascal Gladiator
Lightweight IDE
But I also still like Lazarus best.

#Thiago: Try with only { "cmd": ["fpc", "$file"]}

http://freepascal.org/down/i386/macosx.var
I like Free Pascal the most, for beginning I believe it is the best because you don't have too much fancy GUI features to distract you from programming for beginners (algorithms, procedural thinking...).
I didn't try to run this on Mac but it should work... I have used Free Pascal on Linux and Windows with satisfaction.

Related

Replacement for Turbo Pascal (3.0)

I have a family member who is dearly attached to this antiquated pascal implementation by Borland.
He recently purchased a new laptop with windows 7 (64 bit), and I was able to help him get his old Turbo Pascal environment up through DOSBox, but this is less than ideal. It's slow, and a bit esoteric.
He does recognize that this environment is a thing of the past, but he's comfortable with it and doesn't want to change.
Try FreePascal.... Works fine for me ;]
Mike.
You could also look at Free Pascal which is Turbo Pascal compatible, free and even has a selection of IDEs available for it, Lazarus (no relation) being one.
http://en.wikipedia.org/wiki/Embarcadero_Delphi
http://www.embarcadero.com/products/delphi

Developing for Mac OS X, on Windows?

Well, simple situation. I happen to be a software engineer who uses mostly Delphi and C# for software development. Delphi is great for desktop applications while C# is ideal combined with ASP.NET for web applications. However, I am considering to teach myself more about software development for the Mac. Xcode and Cocoa would be the environments to start with. Learning new languages is no problem for me!
However, before starting to write code on a Mac, I first need to buy one and they're reasonable expensive so buying one is a decision that will take me a few months before I know which one I need. So, to help me right now, I would like to know the possibilities that I have to learn more about Mac development without the need for a Mac!
For example, does OS X work in a VMWare environment? Are the development tools also available for Windows? Is there a clear API overview of the OS X libraries?
Or should I first buy a Mac, play with it for a few weeks and then decide on how to develop software for it? In other words, should I start spending now, or in a few months? :-)
Perhaps a macmini would be the best bet but failing that:
MacOSX in VMWare: http://wiki.osx86project.org/wiki/index.php/Vmware_how_to
Development tools for windows? I'd stick to XCode as it can compile multi-binary apps.
Here's the clearest overview I can think of: http://developer.apple.com/referencelibrary/MacOSX/index.html
Hope this helps!
Mac OS X works in a VMWare...
Unfortunately XCode works only on Mac OS...
There are versions of Max OS, which runs on x86 machines. You can avoid buying a Mac PC, but you have to pay for the OS and XCode...
EDIT: Xcode is free
You definitely want a Mac if you want to develop for the Mac. Even Java requires local testing.
That said, Macs are not very expensive and run Windows too.
If you want to learn and start programming before you have a Mac, I recommend either Java or .NET, specifically Delphi Prism.
See here my own first experiment with Delphi prism:
http://leaukiprog.blogspot.com/2009/07/delphi-prism-first-experiment.html
You can write a program for Windows, keep GUI code and other code separate and later replace the Winforms GUI with a native Cocoa GUI on the Mac.
I found that Pascal is a good language for accessing native APIs from .NET. Everything looks cleaner than with C#, I think.
The new version of Delphi Prism is coming out on the 25th, as far as I know.
You might also look into the GNUstep project. This will let you experience objective-c a little bit before you make the plunge, albeit with the GNU libs instead of cocoa.
Good Mac (or iPhone) software is an artisan product; it reflects the culture and tastes of Mac (or iPhone) users. Because the Mac is a premium platform, users tend to be more sensitive to the feel and polish of the apps. Thus to successfully program for the Mac/iPhone or even grok the Cocoa frameworks properly, you have to grok the Mac user experience. Although many coming from the Windows or other-UNIX world try to skip this step, they do so at their own peril.
So, as a Mac developer (who also writes for other UNIX OSes), my recommendation is buy a Mac and start using it, full time if you can. A Mac Mini is completely adequate for development and will set you back only a few hundered dollars, including the OS. Consider that on Windows, this is often less than the price of a full VS license. Everything else (Xcode, libraries, etc.) are free.
Once you have a Mac and begin to grok the feel of things, you'll discover that there are a number of development options. Besides the Cocoa frameworks--which can be used from Python (via the built-in PyObjC bridge), Ruby (via MacRuby or RubyCocoa)—-there are a number of other options. Qt from Nokia and Mono are viable. Often cross-platform apps written in Qt or Mono are disliked on the Mac because they don't feel "native" (see above), but really the problem is not the framework. If you get the Mac user experience you can write a very passable Mac app in a cross platform framework. You just have to intend to write a Mac app, not get a Windows app working on the Mac.
If you code in RealBasic or Lazarus, you can run and compile your apps for both Mac OS and Windows (and Linux in the case of Lazarus). RealBasic isn't that popular outside of the Mac Platform, and isn't free. Lazarus is still a little rough around the edges, but is basically a free version of Delphi.
Lazarus is working hard on a native COCOA port with the next major version of FPC (though that will probably be available only in 2011)
Macs use Objective C. The APIs are very useful and there are many tutorials online. You'll be using Xcode, the Mac equivalent to Windows' Visual Studio and Linux's Glade.
I love making cross-platform applications. In a few hours I can prototype an application in Mac and publish it online. Then it'll take a day or two to port to Windows.
A Mac looks expensive, but it's not if you look what you get for your money.
It is entierly up to you if you buy one or not. I guarantee you'll have a lot fun with it, next to programming. If you want a cheap Mac, just buy a Mac Mini for 500 dollars, which you can connect to the Display you already own.
I recommend doing this on Mac OS X rather than Windows, but again: it's up to you.
P.S. You can use VMWare, but I think it's slow if you have less then 4 GB RAM.
A Mac really isn't that expensive if you go down the second hand route, I was put off by the price of brand new Macbooks so I got a late 2007 model for £350 and added an extra gig of RAM to it.
Reasonably priced, less hassle for development as well!
If you want to have just a general feeling about ObjC and the object libraries, why not giving a try to GNUStep?
Take a look at it here:
http://wiki.gnustep.org/index.php/Main_Page

How can a Windows programmer be sufficiently productive on Mac OS X?

I've been using MacBook Pro for a few months at home, and I was wondering if there's a good book or guide that can help me be a better programmer on Mac. Maybe Mac-equivalent of Beginning Linux Programming. Note I am not looking for resource on how to program Mac application, instead I am looking for more general guide of using Mac for general development environment.
As a background, I am a Windows programmer by day. I've also done some Linux and BSD over the years, esp in school, like socket programming, graphics, make install type stuff. At home, I'll be doing Java, Scala, PHP, etc. on Mac.
So far, I've been using Eclipse, QuickSilver, and TextMate. VMWare Fusion, XCode and NetBeans are set up, but I don't use them. A DVI KVM switch is hooked up to real keyboard, trackball, and monitor. Recently stayed up till late fighting with MacPorts, and figured out I needed x86_64. The most struggle I had was configuring PHP. I don't know why they don't ship with MySQL and GD library. I eventually figured it out Googling around, and built the extensions from source. I have a feeling that I didn't get the memo and didn't read some basic guide on how to become a programmer on Mac, like how the whole architecture works. How can a Windows programmer be sufficiently productive on Mac OS X?
Related: Setting up a Mac for programmers
Edit: The specific type of application I want to develop doesn't really matter in my opinion. It could be Java, Scala, PHP as I mentioned or Cocoa, C++, or whatever.
What I am looking for is specific book, resource, advice on how to be more effective programmer on Mac, preferably something beyond "install XYZ".
Having converted from Windows to Mac OS X about five years ago, I often find myself thinking the same thing. I just cannot be productive on Windows (as much, I can be productive) as I can on Mac OS X.
To be honest, there are lots of small differences between Mac OS X and Windows. I find the biggest reason for people thinking like this (at it normally only applies to gamers and developers) is that they are trying to use the Mac like a Windows machine. You need to learn to accept that you have to use the command key, not the control key, etc.
It sounds like you are using a Mac because you have to as opposed to because you want to. It really is a much better platform than Windows once you get used to it.
I think a lot of Windows programmers come to Mac and don't try to learn it properly because they are complacent thinking they know it all because they have "used Windows all their life". I guess once you discover Spotlight, Expose, Mac OS X Keyboard shortcuts, etc. You will find your self being MUCH more productive that you ever were on Windows.... and its actually a fun OS to use.
Checkout some of the best Mac applications you can get here and here. You can also do a search for "top 100 mac apps".
Also, I noticed you were trying to setup some kind of web server directly into Mac OS X. It does ship with one, but if you are going to add MySQL and some other extensions I wouldn't go the MacPorts route. Get VMWare Fusion or VirtualBox (open source) and run the server in a VM. Much cleaner. I have a subversion/trac FreeBSD VM that handles my local version control.
I would like to add that if you don't presently use Xcode, you should definitely learn it and use it asap. It's a much nicer IDE to use than Visual Studio and it will make your life much easier.
Don't forget you have probably spent years on Windows help sites, you're going to a small degree need to do that with the Mac. Whenever you have a problem about using the Mac, ask a question on ServerFault. We are all more than eager to help you out.
Good luck.
You seem to want an overview of how Mac OS X works at a system level, more than recomenations about tools and so forth. If that's the case, I'd start with the (very basic) Mac OS X System Architecture Guide from Apple, then move on to Getting Started with Mac OS X, which should give you enough of an overview to get started.
It's not clear from your question what you intend to actually make with your programming time, but if you decide to persue Cocoa/OS X development, I recommend Cocoa Programming for Mac OS X by Aaron Hillegass.
I have a similar situation like yours. I use Windows for development and about a year back purchased a MBP for home (as I shifted to an office). I find it really difficult to get any real work done on my MBP. Somehow am used to the Windows environment with dual screens. But let that not stop you. A couple of software which I suggest you should get are:
Transmit - Good ftp client
MAMP - Runs a webserver nearly out-of-the-box. Good for basic development
Quicksilver - Helps in quick finding of applications
Spaces along with gestures (Configure your gestures to move from one screen to another, I use three fingers glide. its amazing)
Entourage - for email
Terminal - for ssh (putty alternative) (included)
Dreamweaver/BBedit/Textmate (all pretty decent. but i love editplus on windows. not a fan of IDE)
I assume your question is not about learning COCOA and more about being more effective using a MAC. Well, the above tools might help you.
Unfortunately, your question isn't very clear as to what you really want.
If you're looking to write anything cross-platform, it can be very helpful to have a virtual machine for testing. When in Linux, I've always used VirtualBox, and it works on OS X as well.
Also, as for choice of IDE, a lot of it comes down to your preference. Eclipse is nice because there's a plugin for almost everything for it. My experience with TextMate is limited, but my local Ruby Users Group swears by it.
Finally, a suggestion for not just Mac, but any platform really. Learn your hotkeys, set up new ones for things you commonly do, and use them frequently. Not having to take your hands off the keyboard to click a mouse through a few menus can really improve productivity. It may take a little time for them to grow on you, but once they become second nature, you'll wonder how you lived without them.
Basically, you can apply all your Linux/UNIX knowledge that you already have to the Mac. If you use the Terminal (/Applications/Utilities/Terminal.app) you can run all your favorite UNIX commands. Mac has a special command called "open" which is equivalent to the Windows "start" command (used to launch programs and files). You can also use "open -a" to open an application by name (e.g. "open -a Finder").
You might want to reconsider Xcode. Xcode opens more quickly than Eclipse and provides very good syntax highlighting, brace matching, block indenting, and more. Xcode doesn't have to be used as an IDE, you can also use it as a code editor, just like you are currently using TextMate.
For code editing (and everything else), try Aquamacs (http://www.aquamacs.org). It's a Cocoa-native build of Emacs, and it's brilliant for any programming task.

Getting started with Mac development

How long does it take for an experienced Windows programmer to learn writing simple software for Mac OS X?
Where does one start and what tools will be necessary?
THIS. I came from a Win32 API background programming lately a lot in C# and I was able to pick up on Objective-C and Cocoa very quickly by working through the book. You will be pleasantly surprised, the APIs are very rich and just wonderful. Reflection is a first class citizen which makes things very easy.
Xcode is of course free and available on your Mac OS X installation disk.
Edit: it took me about 2 weeks to come up to speed and write simple applications. I think this is because the language and API are easy to learn and use and Aaron Hillegass's book was a big help.
You might want to check this post for info - pretty much a duplicate question to this one. Definitely just go with Xcode and I think you'll find the Mac community pretty helpful - I have, at least.
Start by checking out the Apple Developer Connection. There's a lot of documentation there. OS X comes with all the development tools you need to get started, just install XCode from the OSX CD.
I would start here:
http://www.cocoadevcentral.com/
It's a great site with good resources on learning obj-c and cocoa.
This is also a great book:
http://oreilly.com/catalog/9780596003012/?CMP=AFC-ak_book&ATT=Learning+Cocoa+with+Objective-C
Well, first you get a hoodie and a smug sense of entitlement....
All kidding aside, the Aaron Hillegass book, a great idea, and the Apple doco are all you need to get started (oh yeah, and a Mac). I think the biggest barrier for me was figuring out Xcode since I come from a Visual Studio background.
How long it takes is a function of the level of your interest and your passion about your project.
The tools have come a long, long way since the days of Interface Builder in Mac OS X 10.0, that's for sure.
I guess the "how long" question would depend on what languages you are used to using.
In terms of reference material, I have heard good things about "Cocoa Programming for Mac OS X", and I'd love to have time to play with it for myself. Unfortunately, the day job takes up enough of my time. :)
CS193E (from stanford) is a nice course. Lots of material. Really understanding the use of class clusters, delegation, etc. takes some time, getting started does not.
"Step into XCode" is a great intro to the development environment; since the book works through taking a simple command-line linear regression program all the way to a fairly sophisticated application (Core Data, Spotlight importers, etc.), you'll learn quite a lot by osmosis.
It's the little things... On
Windows, I liked the PowerToy called
"Open Command Here" that allowed me
to open a DOS CMD window from
Explorer and automatically set the
current directory. On the MAC, I got
"On My Command" which allows you to
create simple macros easily, and
comes with a library of useful ones,
like "Open Terminal Here", "New text
File...", etc.
Install Eclipse. I loved using
Eclipse on Windows, and it works
great on the MAC, making me feel
right at home. I even found that
Eclipse has plugins for Perl and
ActionScript.
Learn Unix (if you don't know it
already). I had years of Unix
experience prior to programming
Windows, and it comes in handy.
Knowing Perl helps a lot as well.
I started my new position last
October, which was when I made the
switch from Windows to MAC. By March
I was fairly comfortable in my
understanding of things. Then again,
my development platform is AS2 and
AS2 in Flash, which is
cross-platform.
An alternative is to try out the Qt SDK, and write cross-platform applications that run on Windows, Mac and other platforms.
I started learning Qt when I joined Qt software, and it didn't take long for me to start writing simple software, even though I don't work as a developer.

Good resources for writing console style applications for Windows?

For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond "Hello World". I'm interested in making console apps like Vim or Emacs. Well not exactly like Vim or Emacs but one that takes over the entire command prompt while it is in use and then after you exit it leaves no trace behind. I know that on Unix there is the curses library but for Windows? ...
PDCurses works on Win32.
I found List of Console Functions on msdn, PDCurses, and The Console Module.
You can certainly write that kind of application with Delphi, which has reasonable commandline support. People often overlook that Delphi can build any kind of Windows executable, not just GUI apps.
I don't know off-hand if the free 'Turbo' edition of Delphi has anything cobbled into it to PREVENT you from using it to build console apps - I would have thought it would be fine for this kind of thing.
There is a small but good tutorial on using C++ for the Windows console at www.benryves.com/tutorials/?t=winconsole&c=all going as far as coding a simple painting program.
You could also try Free Pascal. It is a free ((L)GPL) Object Pascal compiler which is compatible with the Delphi-compiler. It has an console-based IDE, which proves that you can make very good console-applications with it, and which you can use as an example.
If you want to use a graphical IDE to build your console-application, you can download the Lazarus IDE.
As a bonus your application will run on Windows (32/64 bit), Linux, Mac OS X, FreeBSD, Solaris etc...
In Windows or DOS, I used the conio library from Borland. It's very old but fine enough for a beginner like me.
As Robsoft says Delphi would be a good start. There is Turbo Delphi (Pascal based) or Turbo C++ both free editions.
web site here.
http://www.turboexplorer.com/
Check out some of the mono libs. They have a great one to parse command line arguments but can't remember the namespace.
Miguel just posted some terminal code as well.
For ncurses-like library/framework on Windows, I'll highly suggest to get your hand dirty with PDCurses.
If you trying/using C#, there's Curses-Sharp.
This is the best tool for it I've ever seen!!
1) Create any application using VB6 IDE
2) Convert it to Console Application, using THIS!

Resources