Live data from Hacker News

Free Pascal Compiler Version 3.0.0

getlazarus.org

71–80 of 112 posts

Re: Free Pascal Compiler Version 3.0.0

#71
Seriously old school:

> Powerful user friendly Wordstar compatible multi file editor

Plus OS/2 Warp and DOS compatibility.

I was a huge fan of Turbo Pascal back in the day. Before that it was BASICA and I spent days tracking down bugs by spreading printouts on the floor and tracing my GOTOs. Then Dad brought home Turbo, I tried it out by writing Conway's Life, and it ran without bugs on the first successful compile. Never looked back.

Based on some of the other comments here, it might be worth trying out again!

Re: Free Pascal Compiler Version 3.0.0

#72
post #25

It's strange, the more new languages I learn, and the more complexity things like C++ acquire, the more I'm starting to feel like we lost something with simple straightforward languages like pascal and even C

Go looks pretty simple. I just picked up Kernighan's new book; he says radical simplicity was their main goal, and lists Pascal/Oberon in their influences.

Re: Free Pascal Compiler Version 3.0.0

#73
post #18

In China, Pascal is a very popular language for high school beginners of Olympiad in Informatics (see http://www.ioinformatics.org/ for the international competition). And it's probably the most used language in the provincial level competition, National Olympiad in Informatics in Province. Yet those who reach the national level will likely switch to C++ for many reasons (STL, performance, etc.). I myself started pro…

It used to be popular here in Bulgaria, too, but it got replaced by the worst possible educational language - C++.

Re: Free Pascal Compiler Version 3.0.0

#74

Pascal falls into an unfortunate niche: - It's nowhere near new and trendy enough to have a bandwagon (e.g. Node, Go, Rust) - It's not obscure enough to have a retro-cool following (e.g. Tcl, Forth) - It doesn't blaze any theoretical trails in computer science today (e.g. Haskell) - It's not associated with any evil corporate entity, allowing you to praise it "ironically" (e.g. C#) However, I find it to be a really p…

This is spot on my experience and impression as well!

Re: Free Pascal Compiler Version 3.0.0

#75
post #14

Glad to hear FPC is still well alive and kicking. BTW, AFAIK Wirth's work is not limited to Pascal (there are Oberon and Modula, for example). Wonder why those languages don't gain as much exposure as Pascal does?

Wirth has never been good at marketing.

He wrote an article about the state of software engineering.

Basically his expectation was that people cared about quality and safety and thus they would appreciate those languages.

However since the majority just hack something together without regard for quality, only a few cared to jump into his vision.

Re: Free Pascal Compiler Version 3.0.0

#76

I am currently working on a project that I will be using at home between my laptop and (not so powerful) Raspberry PI. I am well versed in C and this project is written in it, with very minimal dependencies (currently talloc, libbsd and makeheaders). I am trying to keep resource usage at a bare minimum on the server side (Raspberry PI) for obvious reasons. I've never worked with Pascal, and I've been looking for an a…

Pascal will cover a few of your points and move you sideways on others. For example you do have a required forward declaration but it's all in a single module file. FPC is a good compiler and should cover most concerns around tooling. And it's all been documented in depth at some point, although you might be studying from pretty old sources.

But because it remains a pretty simple language, it's not going to have so many nifty time saver features. If you're going for that you might be better served with a "new and hyped" language like D or Nim - those languages aren't as convoluted as C++ but they are still complex.

Re: Free Pascal Compiler Version 3.0.0

#77

Do people code in Pascal still?! I remember it from years ago in high school and it seemed like it was already ancient then. Nothing against the language itself, it was straightforward and easy to learn on. Just surprised to see a new compiler for it coming out.

We've been in the Delphi/FP/Lazarus 3rd party tools market for 17 years, and are still going strong. Yes, it's become less-used over the years, but it doesn't have anything to do with the language not being up-to-date. It more has been due to issues with Delphi's parent company and pricing.

We wrote 2 database engines and a web development IDE using Delphi (compiles Object Pascal to JS). You can use it for just about anything: low-level, high-level, servers, games, LOB applications, mobile, and you can't beat it for code structure. It's highly readable and maintainable, and the compilers/libraries/runtimes are very backwards-compatible, so you can be assured that your coding investment will continue to produce returns for many years. You'd be surprised how many LOB applications are out there that are written in Object Pascal.

Re: Free Pascal Compiler Version 3.0.0

#78
post #43
post #23

Earlier quoted context omitted.

Same in Lithuania. Everyone who intends to do a degree in computer science is taught Pascal, olympiads are in Pascal/C++. Whether it's a good language to teach highschoolers (students in general, not preparing for olympiads) or not, I am not so sure. On one hand, yeah, it's pretty simple. On other hand, I'd lean towards Python simply because it's more widespread in industry, as a result you have tons of well document…

To be honest they should teach JavaScript instead of Python in highschools. Websites ('web apps'..) are a big deal in, atleast, teenager's life, so they could atleast install Tampermonkey plugin and script some functionality for their favorite websites. Meanwhile after learning python if you won't work in IT is useless. Plus requirement to install Python, include python in PATH and use CMD to launch .py scripts is a…

This is what I tell people: Start with Python.

"I heard of Python; I was thinking of learning that or JavaScript..."

No. I'm from the future. You should start with Python.

The only problem I have with Python is its weird scoping rules and the fact that it's dynamically typed. But it's overall LESS weird than JavaScript. Beginning programmers need a clean, minimally weird language, ideally with a REPL, in which to grasp the basics: namely that computers follow composable sequences of instructions and these instructions need to be written in an unambiguous way. In the 80s we used cut-down BASIC dialects for this; today, Python is as close to optimal a choice as we can get.

Starting people with JavaScript and Web pages to make programming "more relevant to today's users" is like giving Hamlet a backwards ball cap, skateboard, and sunglasses to make him "more relevant to today's teens".

Re: Free Pascal Compiler Version 3.0.0

#79
post #6

Do people code in Pascal still?! I remember it from years ago in high school and it seemed like it was already ancient then. Nothing against the language itself, it was straightforward and easy to learn on. Just surprised to see a new compiler for it coming out.

I used it a few months ago to develop some HPC code for analyzing the timelines of a cosmological instrument (ESA Planck/LFI), and I was quite happy with the result. I even wrote a blog post about my experience ( http://ziotom78.blogspot.fr/2015/01/lfi-data-analysis-with-f... ).

Great blog post. One point, though: the reason that you got a segfault with your FillChar on the array isn't because you used a dynamic array instead of static array. Dynamic arrays are just like pointers in terms of how the compiler handles them (the element count is a negative offset from the actual start of the elements, and there are other things like reference counts there also). The reason you got the segfault is because FillChar operates directly on the passed variable. In other words, your FillChar zeroed out the first 4 bytes of the pointer (not good) and then kept right on zeroing out memory that didn't belong to it (definitely not good). The reason the:

array[0]

notation worked is because subscript references are equivalent to referencing the first element in the array like a variable. Therefore the FillChar started from there and properly filled the rest of the array.

Re: Free Pascal Compiler Version 3.0.0

#80
My first foray into "real" PC programming was done in via Kahn/Borland's fairly awesome Turbo Pascal compiler back in the the early 80's for IBM's DOS OS.

Pascal introduced me to pointers, free-form editing (I came from interpreted BASIC where line numbers and such forced format) and good CS techniques. I built a true circular linked-list as one of my first projects.

I can remember at the time being awed at how fast the compiled executables ran on the PC, and quickly started writing Blackjack and Poker simulations using the language.

It's good to see efforts in releasing this...Pascal has been of course outshined by Python, Go etc etc but it's always fun to trip down memory lane.

Post reply on HN