10 ms·
Turbo Pascal Compiler (2013)
- bootload 10y agosource: https://github.com/lkesteloot/turbopascal https://github.com/lkesteloot/turbopascal
- mp3geek 10y agoLast update from 11 months ago, doesn't bode well
- homarp 10y ago"I think I enjoyed it all because there was always a short-term achievement to unlock: I sorted the five original Pascal programs by complexity and was driven to implement the minimal set of features to see each run in turn. " so the 5 were running 11 month ago !
- exDM69 10y agoThis obviously isn't an ongoing project that will be continously updated - this is some guy's hobby project which is more or less finished now. I don't know what you were hoping for? Someone maintaining a Turbo Pascal compiler on their free time for no obvious purpose?
- JustSomeNobody 10y agoMaybe the project is done. Software can be done at some point.
- boznz 10y agoA concept lost on a lot of people IMHO
- deleted 10y ago[deleted]
- pawadu 10y agoThe original compiler can be downloaded from Borland: http://edn.embarcadero.com/museum/ http://edn.embarcadero.com/museum/ IIRC someone has posted the complete source code online but I cant find it right now... edit: http://turbopascal.org/turbo-pascal-download http://turbopascal.org/turbo-pascal-download
- homarp 10y agomaybe you're thinking of https://news.ycombinator.com/item?id=10202299 https://news.ycombinator.com/item?id=10202299 As https://news.ycombinator.com/item?id=10202563 https://news.ycombinator.com/item?id=10202563 said, it is not THE turbo pascal compiler. Also there is http://www.freepascal.org/ http://www.freepascal.org/
- barrkel 10y agoThe source is not particularly illuminating unless you really want to dig in, since it's all 16-bit x86 assembler.
- clouddrover 10y agoFree Pascal also implements a Turbo Pascal compatibility mode. They have a porting guide: http://freepascal.org/port.var http://freepascal.org/port.var
- Koshkin 10y agoAlso, there is a high-quality IDE for Free Pascal, http://www.lazarus-ide.org/ http://www.lazarus-ide.org/.
- Animats 10y agoI've been converting a large system from the 1980s from Berkeley Pascal to Free Pascal, and it's going quite well. Free Pascal implements a superset of Turbo Pascal, ISO Pascal, and Delphi. So you can revive most old Pascal code with it.
- vram22 10y ago
- clouddrover 10y agoI think the nicest way to achieve "Pascal on the web" will be for Free Pascal to implement WebAssembly support. Free Pascal can compile to the JVM (http://wiki.freepascal.org/FPC_JVM http://wiki.freepascal.org/FPC_JVM), not sure what their WebAssembly plans are.
- dualogy 10y ago> for Free Pascal to implement WebAssembly support I'd be content if the major browsers could move wasm out of Preview (or worse) Status for starters.. ;)
- cyberferret 10y agoThe first ever computer program I wrote for $$$ was a retail point of sale system for a local pharmacy. I used Turbo Pascal for it, complete with my own proprietary database files etc.! Later on, I wrote a front end menu system (which simply gave a customisable easy to select option of applications to run in DOS) that ended up being used on thousands of PC's throughout businesses and almost every government department in my town. Good Days. I downloaded the original Turbo Pascal v 1.x a couple of years back, and intended to try re-writing that point of sale system again to see how much I still remembered > 30 years later. Never got around to it, but I will make a concerted effort this year to try it out. I may just try it on this web emulator, seeing as I am now on a Mac! Thank you Anders Heljsberg! And to these guys for building a web emulator of the original compiler.
- rasjani 10y agoFirst ever paid lines of code: in pascal, for pharmacy. Albeit, i did stock ordering portion. Stock only had 300baud demodulator so all verifications had to done by eavesdropping the line with phone and if one didn't hear the correct signal, you had to press keyboard to retrigger the batch again. I had to code all this blind too because there was no test environment :)
- cyberferret 10y agoNice! You are one better than me though, because I didn't have any connectivity with another system - it was all running standalone on their LAN. The stock room had to key in goods receipts manually after downloading info from their Vax PDP-8 stock management system. If I had more time (and they had more money) I might have worked out a way to automate that. :)
- lumberjack 10y agoThere are still people in that line of business doing exactly that same thing in 2017.
- ganley 10y agoTurbo Pascal was also where I wrote my first professional software (not for $$$ - it was an internship - but I'm counting it). It was a program to gather, process, and display thermal data from an experiment rig. I also wrote a ton of stuff for fun in Turbo Pascal, but I doubt I still have any of that code.
- k-mcgrady 10y agoTurbo Pascal was the first language I properly learnt after dabbling in VB a little. This was about 12 years ago. I was in school at the time and did a short work placement at Borland (developers of TP) where people found it hilarious that I was learning TP. It's still one of the most enjoyable languages I've written in but maybe that was just because of the challenge of everything being new to me.
- 32wattle_park 10y agoomg, remind me of uni days... I liked turbo pascal.
- linker3000 10y agoI too found some old floppies a few months back and one contained the Turbo Pascal source code for a map editor I wrote for the original Rockford game on the PC. I fired up Turbo Pascal in a DOS box on Windows 10 and got the code to compile. Sadly, I don't have the game any more and the 'Rockford' available online is actually a remake / emulation using a different game engine and the maps are in a different format. Code here for anyone who wants to laugh at my skills as a non-programmer: https://github.com/linker3000/Historic-code-PC-Pascal-and-ASM- https://github.com/linker3000/Historic-code-PC-Pascal-and-AS... PS: Does anyone here have a copy of the original Rockford game!!??
- Narishma 10y agohttps://archive.org/details/msdos_Rockford_-_The_Arcade_Game_1987 https://archive.org/details/msdos_Rockford_-_The_Arcade_Game...
- linker3000 10y agoThanks - sadly that's the version that uses the other game engine and is not the original version.
- linker3000 10y agoPS: My other 'proper' TP programs were a staff time management and reporting app, a materials control system and a file upload program for a Stag device programmer - it took a PROM/EPROM/PAL/GAL binary or hex file in whatever format you had, identified the format, parsed it for checksum and file errors, set the Stag programmer device and file parameters (which saved a LOT of time and avoided setup errors), uploaded the file, verified the upload and programmed & verified the device. At one point, Stag came down and checked over the code with a view to making it their stock program but I think things became too complex when legal got in the loop.
- bdamm 10y agoThanks for the snapshot, I'd forgotten about those compiler directives. Also, Shareware! Lol!
- open-source-ux 10y agoI really miss fast, compiled programming languages like Turbo Pascal in the web space. How many languages can you identify for web development that match the following features: - Fast - Compiled - Small, single file executables - Low-memory consumption - Readable syntax that isn't afraid of being a bit verbose - A small language vocabulary you can actually learn rather than the labyrinthine language definitions of today I always liked Niklaus Wirth's philosophy on programming language design. I wish more programming language designers would follow it.
- marianov 10y agoWhat I miss are 4GL. 90% of bussiness systems are some form of CRUD, or record keeping software. With Clipper/DBase III, etc you had systems up in no time, fast and with little non-functional bugs. And on the UI side you had keyboard shortcuts and forms that worked 100% of the time. Maybe some kind of browser based shell for running Harbour[1] apps. [1] https://harbour.github.io/ https://harbour.github.io/
- pjc50 10y agoThis was kind of destroyed by Microsoft Access, wasn't it?
- teh_klev 10y agoI wouldn't say Microsoft/Access was the sole cause. Nantucket (who were eventually bought out by CA) and Ashton-Tate really missed the boat when it came to developing Windows versions of their flagship apps/tools. You should have a read of "In Search of Stupidity"[0] and revel in the eye-watering commercial mistakes and foot shooting these companies indulged in during the late 80's to mid 90's. From the mid 80's until around 1995-96 I used many of the tools written about in that book - WordStar, dBase, Clipper, then one day they were gone, largely because of incompetence and entrenched complacency. [0]: http://amzn.eu/3Bqm2xR http://amzn.eu/3Bqm2xR
- kmeade 10y agoI think Access was the start of it. But Microsoft's purchase of FoxPro is what really put the nails in the coffin. FoxPro had some shortcomings (e.g. Foundation Read) but it was incredibly productive and fast. And there was a Mac version early on. It makes me sad to think of what FoxPro could have become. Microsoft didn't just kill the product, they pretty much killed the category.
- BugsJustFindMe 10y agoMy favorite Pascal compiler story is about the development of G-Pascal for the Apple II and then C64 at http://www.supercoders.com.au/blog/nickgammongpascal.shtml http://www.supercoders.com.au/blog/nickgammongpascal.shtml
- rbanffy 10y agoHow is it possible to not find multiple free (beer or speech) Pascal compilers that can deal with Turbo Pascal code after 30 seconds of googling?
- rpeden 10y agoI could see myself not Googling very thoroughly if I were trying to find an excuse to write a Turbo Pascal compiler. :) Maybe the author was in a similar situation, whether conscious or not.
- teh_klev 10y agoThen that would be no fun at all and because sometimes there's this itch you need to scratch. This is Hacker News after all :)
- lumberjack 10y agoTurbo Pascal was my introduction to programming. Using just the CRT library (Graph if you wanted to be fancy was also easy to use) and learning about loops and procedures was enough to be able to write simple Nintendo 64 style games. I still don't think any programming languages today match that kind of mild learning curve.
- muterad_murilax 10y ago> Nintendo 64 style games. Are you sure you don't mean NES/SNES style games?
- rerx 10y agoI agree, it was a super friendly fully integrated environment. The comprehensive online help, the super fast compiler and the easily accessed debugger made going forward a breeze.
- Shivetya 10y agoTurbo Pascal sparked my true interest in programming. Prior to that I experimented with BASIC but never found it appealing though I did get to play with it around with some people who could truly work magic with the language. Dabbled in Modula-2 (stonybrook) and Turbo C. However I never really got into Delphi as I wasn't that interested in OOP or Windows. Worse Borland did their best to break my interest with the near constant upgrades that required buying the product all over again and worse in bundles that exaggerated the price. Turbo Pascal or similar would be a cool way to write web pages if it could be extended that way without getting silly complex
- brynlewis 10y agoYou sort of can - http://www.elevatesoft.com/products?category=ewb http://www.elevatesoft.com/products?category=ewb
- davb 10y ago> This compiler is the only project I've ever worked on, in my life, which I enjoyed every bit of. I wish I could find a project that made me feel like that.
- Philipp__ 10y agoWhat strikes me about (Turbo) Pascal is how good it is for introductory programming! Just think about it, I find it to be like mixture of BASIC-like structure with Pyhton-esque syntax. Language in itself is very clean, and the way how static it is and how precise you need to be with declaring of variables is great for preparing you for C down the road. Then again you can do many things with it. I remember writing my first serious apps in Pascal, (few hundreds LOC), it was basically CRUD app, but it talked to .txt and .bin files. I learned a lot about memory management, and it made me implement and really understand deeply many concepts like linked lists, sorting algorithms and work with strings (writing small parsers). I am very grateful for Pascal, and I think it changed me forever, in a way where I got in love with it and I got hang of lower level programming pretty early. After that when I went to C, I had to learn a lot but it felt so natural. It's funny that I find myself struggling with Python and JS (with JS I got better, Lisp and functional programming came in handy there), cause I just can't get used to the language giving you pretty much everything just by calling one simple method/function. Numbers of times I found myself writing function for something trivial that already exists in language by itself. Anyway, it felt great to think about old times and Pascal. I think it is very underrated as a learning language.
- pvg 10y agoIn what way is the structure 'BASIC-like'? The later more structured BASICs got that way influenced by languages like Pascal.
- Philipp__ 10y agoWhat I meant by that is that you had to do everything by yourself. Also it is very clean. For example removing element from the array is not as trivial as in Python.
- pvg 10y agoYeah that's not really BASIC-like at all, to me. It seems such an odd thing to say since Pascal was pretty much designed to be the anti-BASIC - a language for education but done 'right' through 'structured programming'.
- phkahler 10y agoThis made me smile. Not because I care at all about TP3 or even TP6 which I did a lot with. No, it's because the effect it had on the author. For him it was a project that made programming fun again for personal reasons. In practical terms it's worthless, in personal terms it was priceless ;-) Love that.
- johnhattan 10y agoHaving done TRS-80 BASIC for a couple of years in high school, Turbo Pascal was a game-changer. I had a TinyPascal compiler for TRS-80, but Turbo Pascal converted me the moment I saw someone switch from editing to compiling without actually leaving the program. I spent the summer saving up for my own 286 machine just so I could use it.
- JackFr 10y agoThat looks nothing like a rose.
- pilif 10y agoI didn't start with Turbo Pascal as when that was in wide use my parents still didn't allow me to go near a computer. That didn't however stop Pascal from starting my career though as I started programming for real a few years later with Delphi 2 which was running a slightly improved version of Pascal with object oriented additions. How I loved that programming environment: As quick and easy to use as VB, but able to produce real native binaries that run without any (external) runtime environment. Plus you got all the windows SDK C headers pre-translated to Pascal so the whole windows API was ready at your fingertips (what could possibly go wrong when a self-thought teenager gets to write native code with complete unprotected access to memory and threading?). Delphi is what I've used for my first commercial project too and Delphi is what I still use these days when I have to do some very, very rare Windows work). The language is phantastic. Even after years of not looking at my code, it is very readable to me and I get back into productive mode very quickly. Of course this might all just be nostalgia talking.
- PeCaN 10y agoDefinitely check out http://www.lazarus-ide.org/ http://www.lazarus-ide.org/ for a modern open-source Delphi reimplementation. It's great. I agree that Delphi is quite nice. I use both Delphi and (much more) C++Builder for work, but I wish more of it was Delphi.
- equalarrow 10y agoOne day, when I was still in high school, my dad brought home a DEC mini (dunno which one). It had 2 8" floppy drives and an actualy terminal that would sit on top. When you would turn it on, it had these 2 huge fans in the back that sounded like an airliner taking off. It was still in its 8u rack chassis. When I turned it on for the first time, it booted off of what must have been some kind of rom and dropped straight into UCSD Pascal. I was programming at home at the time via Basic & 6502 assembly, and when I saw the Pascal prompt, I was like, awesome! (I had a class at school using Turob Pascal) I spent a lot of weekends in our cold garage (over the winter) hacking on that machine. I wish I would have saved some pictures. I made a star trek type game and (my fav at the time) a database ala dBase. Good times.. (Mobile typo edits)
- mzs 10y agoD to list files W to load file R to run
- cyberferret 10y agoI was kind of intrigued to note that 'C' for Compile didn't work. It was one of those things I used to love doing when writing code, just to check for syntax errors etc. after writing a procedure when I didn't want to commit to running the app yet. It was also a vanity thing - from memory it showed you how long it took to compile, and I used to love seeing a several thousand line project compiling in < 1 second.
- ilaksh 10y agoIf you like Pascal check out http://nim-lang.org http://nim-lang.org
- lobster_johnson 10y agoBack in 1997 I was a developer on a commercial Windows game, written in Turbo Pascal (or technically, Borland Pascal). Not sure how many games have been developed with Turbo; can't be that many. We had to write our own bindings for DirectDraw and DirectSound, since there were no C header files we could use directly. (This was before 3D acceleration, so no Direct3D, which wouldn't really have been feasible.) We were all Pascal programmers at the time, and didn't even consider using C or C++. Turbo Pascal was really ideal for writing games in. Short develop-compile-debug cycle, great native performance, support for inline assembly (our image code had lots of this), and easy calling into C libs. I was using Borland's Pascal tools as late as 1999-2000, the last iteration being Delphi 4.0. While I did plenty of GUI stuff, my biggest project was a non-GUI teleconferencing solution that consisted of a web application that orchestrated calls using several distributed backends (or microservices as we would call them today), with RPC using Microsoft DCOM; Delphi had very good COM support. As part of this app, I had to talk to several low-level telecomms boards by Dialogic, which of course only had C headers. I wrote an AST-based C-to-Pascal translator so I didn't have to do all the headers manually, and I was able to use it to translate things like Microsoft's MAPI headers, which were COM. Still... It's amazing to think today that I was so fond of/productive in Pascal that I shoehorned everything into it, even those headless server apps, when obviously C or C++ would have provided much less friction. The answer is of course that TP/BP/Delphi all provided an amazingly productive experience. These days I use Go a lot, which of course is heavily influenced by the Wirth family of languages. Go today feels a lot like Borland Pascal with garbage collection. </nostalgia>
- vram22 10y agoGreat anecdote, thanks for sharing. Got to agree on the productivity part. I did just part of one product in Turbo Pascal (just at the start of my career), which was a freelance project, interestingly, without any previous job experience, like some others here have said they did, but also a lot of personal / fun stuff with it, and also taught it for a while in a training institute. Most of my other product and project work was / is done in C, Java, Ruby, Python etc. But as I too have said here a few times before, never come across a more productive environment than TP and Delphi - though Python is close, for the language part alone (leaving aside libs, GUI, building, etc.).
- oso2k 10y agoI'm surprised that no one here seems to have noticed that this is a Tubro Pascal compatible compiler written in JS that writes binaries compatible with 1978 UCSD p-System p-code, and, a p-code VM also written in JS that will run in a web page displaying x86 PC/DOS graphics. No less than 4 architectures to juggle (PC/CGA/EGA/VGA, JS, Web/DOM, p-code). Early 8 & 16-bit architecture BASICs and Pascals worked on by several people all strived for p-code compatibility [0][1] and this guy wrote this by himself. I thought that was most remarkable when I found this a couple years ago. [0] https://en.wikipedia.org/wiki/P-code_machine https://en.wikipedia.org/wiki/P-code_machine [1] https://en.wikipedia.org/wiki/UCSD_Pascal https://en.wikipedia.org/wiki/UCSD_Pascal
- mark-r 10y agoYes, I noticed. Consider my mind boggled. Turbo Pascal (the original) was amazing, I used it for many years - both Z80 and PC.
- cyberferret 10y agoI admit it did take me a couple of minutes to get to the web site and realise that this was all done in Javascript, but when I found out - I was supremely impressed at the effort and skill it took.
- GregBuchholz 10y agoAnyone know what the source language for Turbo Pascal was? Assembly? Bootstrapped Pascal? Turbo C?
- cyberferret 10y agoI remember reading an interview with Anders Hejlsberg (the main guy who wrote Turbo Pascal) many years ago where he said it was mostly Assembly, with some C (not sure which flavour of C though). Apparently Anders was one of the few people at the time who could write large blocks of 8088 assembler off the top of his head.
- deleted 10y ago
- alyandon 10y agoTurbo Pascal was my first experience in structured programming languages (and a slick IDE to boot!). The affordability of all the Turbo branded language products (and the excellent printed documentation that came with them) that were made available to me as child by my parents are on the primary reasons I have such a love for technology and why I am in software development today. It's really a shame that modern programming platforms don't capture some of that same ease of use for experimentation. :(
- antirez 10y agoMake sure to check the other projects from the same guy. Lovely things.
- NuSkooler 10y agoThere are a lot of stories here about starting out and/or really starting to flourish as developer with Turbo Pascal. I'm in the same boat. I started out with BASIC, then to Borland C of all things. One day as a kid I downloaded the source to some DOS viruses from a "l33t" HPAVC BBS -- they were in Pascal. I fell in love. This started a long line of developing programs in TP, then to Delphi in the Windows world. While I don't really use TP much anymore albeit the occasional pet project using FPC's cross build ability to produce DOS binaries, Pascal has a special place in my heart :)
- GregBuchholz 10y agoCan't pass up the opportunity to post a link to: "Things That Turbo Pascal is Smaller Than" http://prog21.dadgum.com/116.html http://prog21.dadgum.com/116.html
- pjmlp 10y agoTurbo Pascal was great, I was already doing systems programming with 5.5, learning about OOP, modular programming, using powerful frameworks like Turbo Vision. It was also my first compiler when I started doing Windows 3.1 development. TPW with OWL was quite ahead of how MFC ended up.