News for hackers. Stuff that matters.
Re:Pascal at Apple by rcarmo on Saturday July 22, 2017 @03:37AM (#14825889)
I wrote a fair amount of Pascal in my 680x0 Mac days, both in MPW (the Macintosh Programmer's Workshop) and THINK Pascal. Back then Modula-2 was available on VAXen and "big" machines, but Pascal was almost "portable" across Mac/PC/VAXen and was amazingly fast, so it was pretty fun.

I eventually moved to C (also using THINK C - see retrospective link below for a sample of those heady times) and never looked back until a couple of weeks ago I set up Lazarus for my kid to play with (there are too many Python GUI development options, and none halfway as good).

Lazarus is _amazing_ (if somewhat odd in today's world), and I really wish we had more IDEs like it instead of all the crappy Electron/web approaches for building desktop apps. It builds fast, tiny, entirely native apps in less than a second, and is an excellent example of how far Pascal went despite falling off the mainstream wagon.

(If anyone knows of anything like it for cross-platform desktop apps, let me know, I'd love to try it out)

- Link about early C dev on the Mac, that also mentions MPW and Pascal in passing - https://retrocomputing.stackexchange.com/questions/3213/what...

Re:Pascal at Apple by vram22 on Saturday July 22, 2017 @01:00PM (#14828097)
>(If anyone knows of anything like it for cross-platform desktop apps, let me know, I'd love to try it out)

Check out Xojo. HN user SyneRyder sometimes comments about it here, and likens it somewhat to Delphi. Cross-platform too. I'm in early stages of trying it out, so won't comment myself on it.

Xojo is a BASIC variant, and IIRC, was called RealBASIC earlier. While I've done some work with BASIC and Visual BASIC in my time, and don't puke out on it (as some people allege they do :), I confess that I prefer the syntax style of the Algol family of languages, such as C, C++, Pascal, D, and Go.

However, the convenience of VB, Delphi, Lazarus and similar drag-and-drop GUI app builder tools is real. Great for quickly prototyping something, and many a time for the final product too.

Re:Pascal at Apple by rcarmo on Saturday July 22, 2017 @05:03PM (#14829361)
I tracked RealBasic for a few years before the rebranding. It's nice, and if I were developing desktop apps professionally I'd probably buy it - but for my kids to try out, it's a little expensive :)

But yeah, it delivers.

Re:Pascal at Apple by vram22 on Saturday July 22, 2017 @06:45PM (#14829851)
I get you, but the lowest version of Xojo, without database support (or maybe even that includes just SQLite support), is free, IIRC, for local use on a PC. And anyway one can do plenty of apps without any DB.
Re:Pascal at Apple by rcarmo on Sunday July 23, 2017 @04:03AM (#14831341)
I'll check into that. The mandatory registration thing is a turnoff...
Re:Pascal at Apple by vram22 on Saturday July 22, 2017 @01:35PM (#14828288)
>It builds fast, tiny, entirely native apps in less than a second, and is an excellent example of how far Pascal went despite falling off the mainstream wagon.

D meets some of your criteria too, at least somewhat small fast, native apps. Build speed is decent (or more) too, and it is designed for that - doesn't have C's repeated overhead of pulling in include files. [1] Haven't tried the GUI toolkits for D though (yet). There are some, like DLangUI, GtkD, etc. Not sure if there are any GUI builders like Delphi, Lazarus, VB, Xojo, etc. have. Also, I think I read that D's language design allows D compilers to be the single-pass kind.

[1] I think this is the video I had blogged about a while ago, in which Bjarne Stroustrup talks about the details of that include files issue:

Video: C++, Rust, D and Go: Panel at LangNext '14

https://jugad2.blogspot.com/2016/08/video-c-rust-d-and-go-pa...

Edited for wording about D compilers.

Re:Pascal at Apple by vram22 on Sunday July 23, 2017 @05:35PM (#14834526)
>doesn't have C's repeated overhead of pulling in include files.

Sorry, typo - I meant to say "C++'s repeated ..."

C may have it too, don't remember if so or not right now.

The video mentioned in my above comment has some details on why this is such an issue in C++ - from the source, i.e. Stroustrup, the creator of C++. There's a bit of humor around that fragment of the talk - it is somewhere near the end, IIRC.

Re:Pascal at Apple by rcarmo on Saturday July 22, 2017 @05:05PM (#14829371)
Thanks, but I was more interested in drag and drop GUI programming.
Re:Pascal at Apple by dom96 on Saturday July 22, 2017 @06:11AM (#14826349)
I don't know anything like Lazarus, but I do know a language that shares many of the characteristics of Pascal (small, fast, native binaries). That language is Nim and I think there is a good chance we could get something like Lazarus out of it.
Re:Pascal at Apple by rcarmo on Saturday July 22, 2017 @08:25AM (#14826843)
If you can do Visual Basic-like forms with it... that's the main appeal of Lazarus for me right now - instant native GUI development.
Re:Pascal at Apple by pjmlp on Saturday July 22, 2017 @09:02AM (#14826980)
I really think Sun and MS did a big mistake with their VM approaches instead of following what was common on the 90s.

So we had to wait 20 years, failure of Moore's law, cache optimization issues, competition from new languages, for them to come up with .NET Native, CoreRT and the initial AOT on Java 9

Re:Pascal at Apple by hota_mazi on Saturday July 22, 2017 @12:11PM (#14827865)
Calling VM's a mistake is surprising considering that today, a crushing majority of code (JVM, .net and arguably, LLVM) runs on a VM.

In comparison, .net native and Core RT are tiny dots on the radar.

Besides,

- Pascal UCSD Pascal was a VM (p-code)

- A few anti-piracy schemes on the Apple ][ used their own VM to obfuscate their code

- ScummVM was extremely popular to create games

VM's were a thing in the 90s and they are even more of a thing today.

Re:Pascal at Apple by pjmlp on Saturday July 22, 2017 @01:05PM (#14828118)
> Calling VM's a mistake is surprising considering that today, a crushing majority of code (JVM, .net and arguably, LLVM) runs on a VM.

LLVM isn't a VM.

.NET achieved its position, because on Windows many of the APIs became .NET only or C++ COM. Not many people bothered to use alternatives to Microsoft tooling.

JVM achieved its position due to being free, and the huge amount of money and engineering resources that Sun poured into it, which in a way ended up killing the company.

Yet due to the pressure from Fintech customers, Oracle started to look into AOT compilation, with initial support for Linux x64 available on Java 9, other platforms will be supported later. Most commercial JDKs had support for AOT since the early days.

> In comparison, .net native and Core RT are tiny dots on the radar.

Yes, but that is where Microsoft wants to go. There is no pure .NET on UWP, other than via the desktop bridge, the transition technology to port Win32 into UWP.

> - Pascal UCSD Pascal was a VM (p-code)

Quite correct and it ran quite slowly, purely interpreted.

> A few anti-piracy schemes on the Apple ][ used their own VM to obfuscate their code

- ScummVM was extremely popular to create games

The games from Lucasart were hardly something where performance mattered.

> VM's were a thing in the 90s and they are even more of a thing today.

Given Apple's decisions on their programming languages, Go, D, Rust, Pony, Haskell, OCaml, the change of direction on Dart's design, I am not quite sure.

Re:Pascal at Apple by hota_mazi on Saturday July 22, 2017 @01:35PM (#14828289)
You're setting up a lot of straw men.

Your point, which I was replying to, was that VM's are a mistake, not that they were/are slow, or how some VM's became dominant, or making guesses toward where Microsoft or Oracle want to head.

My response is that 1) VM's are dominant today and 2) for very good reasons.

And because of that, they are not a mistake.

I also speculate they are going to remain dominant for a while because of all their advantages over native approaches, advantages which become even more prominent as hardware keeps pacing up, like it has always done.

Re:Pascal at Apple by rbehrends on Saturday July 22, 2017 @02:32PM (#14828590)
> Calling VM's a mistake is surprising considering that today, a crushing majority of code (JVM, .net and arguably, LLVM) runs on a VM.

That was more of a self-fulfilling prophecy than a need. There simply was a shortage of reusable compiler backends in the 90s, so when major companies (Sun, IBM, and Microsoft in particular) decided to devote all their resources to the JVM and the CLR, then those became easy targets for language implementors (and low-hanging fruit, too).

Regardless of what you think of them, their success is probably mostly the result of going where the most resources were being spent.

Re:Pascal at Apple by raphinou on Saturday July 22, 2017 @06:14AM (#14826358)
Lazarus looks interesting, but what holds me back is that the language doesn't seem to have evolved. I enjoy functional languages much more these days, and I prefer not to go back to an old language. I would be happy to be proven wrong on this
Re:Pascal at Apple by rpeden on Saturday July 22, 2017 @08:05AM (#14826761)
The language has evolved, but it still falls squarely in the imperative, OO camp.

And besides, you mentioned than you'd prefer to stick with more functional languages. It's hard to prove someone's preference wrong. :)

I mostly share your preference, but I make an exception for Pascal. There's just something about it that draws me in, even though I've only used it for fun, and not professionally.

Re:Pascal at Apple by TimJYoung on Sunday July 23, 2017 @12:24PM (#14833014)
Just curious: do you use an IDE, and if so, which one ?

The thing that drew me in to Object Pascal was getting Delphi back in 1996 (I think it cost $200), and being just amazed at how much I could do out-of-the-box without knowing a thing about Object Pascal. The productivity with IDEs like Delphi/Lazarus is just astounding.

I look at setup instructions for many languages today and just cannot believe what I'm reading. Pages and pages of instructions on putting together a dev environment just to compile a Hello World program. It's just insane to me...

Re:Pascal at Apple by rpeden on Thursday July 27, 2017 @12:36PM (#14866917)
Apologies for the slow reply.

I've used Lazarus when I've had small GUI apps I wanted to make. Other times, I'll just use Turbo Pascal in DOSBox when I'm just trying to have some fun and make simple little games.

Re:Pascal at Apple by vram22 on Saturday July 22, 2017 @01:59PM (#14828407)
Yes, Pascal is a fun language to work in. I've always enjoyed working in it, whether in the form of Turbo Pascal, Delphi or Lazarus (did some commercial work in TP and a bit in Delphi, and Lazarus so far, for fun.) Probably many features (or non-features [1]) of the language contribute to it. This is just one point: the use of sets as built into the languages, is nice and reads naturally for expressing some kinds of relationships and tests (foo in bar, where bar is a set) - e.g. char in vowels, etc.

[1] "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint-Exupery

https://www.brainyquote.com/quotes/quotes/a/antoinedes103610...

Re:Pascal at Apple by raphinou on Saturday July 22, 2017 @01:06PM (#14828124)
Downvotes is the last thing I expected on this comment. I expressed my opinion about what held me back. In what sense does that warrant a downvote?
Re:Pascal at Apple by bluedino on Saturday July 22, 2017 @09:30PM (#14830440)
That's a great link. I used Think C in the late 90's and school on an LC III - I can't imagine using it on 80's Mac hardware.
Re:Pascal at Apple by lispm on Saturday July 22, 2017 @05:48AM (#14826275)
I have used Modula 2 on my Apple II. It ran under the UCSD-p machine system.
Re:Pascal at Apple by philippeback on Saturday July 22, 2017 @06:10AM (#14826346)
Lazarus: definitely cool