Live data from Hacker News

Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

castle-engine.io

51–60 of 103 posts

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#51

https://castle-engine.io/why_pascal I'm gonna have to put a damper on things, here. Most of the reasons listed are things available in any other modern language (safety, cross-platformness, libraries...) but one of the things cited is readability. I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. The fact that you need to use entire words to denote…

> Instead of immediately seeing "this is code structure" and "this is actual code", you need to actually read the words to make that distinction.

First of all, there is syntax highlighting.

Furthermore, after the first few times you see a word you don't actually "read" it in the sense you mean here, you are just matching it, as an image, with other words in your vocabulary. So it's not any harder to "read" a word than to read a curly brace, assuming no other very similar words are used in the vocabulary of the language.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#52
post #5

Ok I’ve got a hacker challenge for the more creatively-inclined: if I wanted to stretch “cross platform” to web (and thus webVR?), how might I wrap/integrate/emulate/polyfill/whatever this? EDIT: after a quick search the answer is a resounding “you can do it, but yikes.” Multiple people reference custom compilers , which I’m guessing are beyond my reach… https://news.ycombinator.com/item?id=12029566 EDIT 2: wow nvm i…

As for our mention of XBox on https://castle-engine.io/features : the point I wanted to say there was that we have "development" version of Xbox, as provided by Microsoft. Though it doesn't matter much nowadays, since retail Xbox versions can also be used for development, from what I read. I edited that statement to say this

""" XBox (we have the hardware — even devkit, though "developer mode" can also be activated on a retail version of Xbox). """

As for web:

- This is mentioned on https://castle-engine.io/why_pascal as supported nicely by FPC compiler. FPC can compile regular Pascal code to WebAssembly, there's also Pas2Js that can compile regular Pascal code to JS. See samples e.g. here: https://github.com/genericptr/Pas2JS-WebGL?tab=readme-ov-fil...

- In the context of Castle Game Engine, web is part of "Coming Soon" of https://castle-engine.io/features . We want to utilize above to enable to recompile any Castle Game Engine application (as long as it uses cross-platform API) to the web. Details are on https://castle-engine.io/wp/2023/04/08/web-target-progress-a... .

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#53

Earlier quoted context omitted.

In my experience, Python, C and JavaScript* all have this property; whereas I have to relearn Pascal, Haskell, sh and (to an extent) Rust every time I go away from them for a bit. I think this is more a property of you or I than of particular languages. *: excluding `for (… of …)` and `for (… in …)` – I can never remember which is which. `for (… of …)` is the one you can use with Arrays and other iterables.

> *: excluding `for (… of …)` and `for (… in …)` There's more that will trip you up in JS if you leave it for too long. Off the top of my head: 1. Which function definition (`function` or `=>`) do I need to use in order to make the `this` keyword point at the correct object in an event handler/anonymous function/foreach parameter? 2. I see code with both `!==` and `!=` - what is the significance of using both? 3. Lon…

Just always use !==. != will automatically cast and !== won't, therefore "1" != 1 is false and "1" !== 1 is true.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#54

https://castle-engine.io/why_pascal I'm gonna have to put a damper on things, here. Most of the reasons listed are things available in any other modern language (safety, cross-platformness, libraries...) but one of the things cited is readability. I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. The fact that you need to use entire words to denote…

> The fact that you need to use entire words to denote syntax makes it much harder for your brain to parse things : Instead of immediately seeing "this is code structure" and "this is actual code", you need to actually read the words to make that distinction. It is very counter-productive and a bad design solution, imo. While I agree that it gets slightly tedious to read daily, I have to say that there is no language…

Agree! I also find Pascal very soothing to write. Yes it's a little more verbose than C but it makes you think ahead and stay organized.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#55
post #49

Earlier quoted context omitted.

Most probably you already learnt the alphabet in the past, and there is 0 cognitive load for your brain to parse it. Unless you come from a language using another alphabet, but then unfortunately you need to bow to Latin alphabet rule over programming languages in any case.

Oh, really? if ((input = 'y') or (input = 'Y')) then begin writeln ('blah blah'); end else if ((input = 'n') or (input = 'N')) then begin writeln ('blah'); end else begin writeln ('Input invalid!'); end; if input == 'y' || input = 'Y' { writeln ('blah blah'); } else if input = 'n' || input = 'N' { writeln ('blah'); } else { writeln ('Input invalid!'); } If you find Pascal easier to read, I would guess you have very s…

Your example isn't idiomatic. You would not write begin/end for single-line cases.

Instead it would be:

  if ((input = 'y') or (input = 'Y')) then
    writeln ('blah blah')

  else if ((input = 'n') or (input = 'N')) then
    writeln ('blah')

  else
    writeln ('Input invalid!');

OR even better

  case uppercase(input) of 
    'Y': writeln('blah blah');
    'N': writeln('blah');
  else
    writeln('Input invalid!');

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#56

https://castle-engine.io/why_pascal I'm gonna have to put a damper on things, here. Most of the reasons listed are things available in any other modern language (safety, cross-platformness, libraries...) but one of the things cited is readability. I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. The fact that you need to use entire words to denote…

> I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. I'd disagree with that. I've worked on several Free Pascal projects, C projects, C++ projects and some other stuff and i find it easier to follow Free Pascal code in big projects written by other people than C/C++/Java/etc. At least, i'd say that outside extreme cases (like esoteric languages - or…

Can you expand on Pascal vs Go? What is Go missing?

I do not know much about either language, but the first thing I thought when people compared Pascal to Go (another comment, not yours) was what about concurrency? Go does have strong concurrency story.

AFAIK there is a lack of mobile support, so the use case for Free Pascal is strongest for cross platform desktop apps?

Is it something you think is still worth learning? Using for a new project rather than legacy code?

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#57
post #56

Earlier quoted context omitted.

> I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. I'd disagree with that. I've worked on several Free Pascal projects, C projects, C++ projects and some other stuff and i find it easier to follow Free Pascal code in big projects written by other people than C/C++/Java/etc. At least, i'd say that outside extreme cases (like esoteric languages - or…

Can you expand on Pascal vs Go? What is Go missing? I do not know much about either language, but the first thing I thought when people compared Pascal to Go (another comment, not yours) was what about concurrency? Go does have strong concurrency story. AFAIK there is a lack of mobile support, so the use case for Free Pascal is strongest for cross platform desktop apps? Is it something you think is still worth learni…

> AFAIK there is a lack of mobile support, so the use case for Free Pascal is strongest for cross platform desktop apps?

Both iOS and Android are supported by FreePascal as well as Delphi.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#58
post #56

Earlier quoted context omitted.

> I work on Pascal code 8 hours a day, and it is not more readable then conventional C syntax ; I'd argue it's much less. I'd disagree with that. I've worked on several Free Pascal projects, C projects, C++ projects and some other stuff and i find it easier to follow Free Pascal code in big projects written by other people than C/C++/Java/etc. At least, i'd say that outside extreme cases (like esoteric languages - or…

Can you expand on Pascal vs Go? What is Go missing? I do not know much about either language, but the first thing I thought when people compared Pascal to Go (another comment, not yours) was what about concurrency? Go does have strong concurrency story. AFAIK there is a lack of mobile support, so the use case for Free Pascal is strongest for cross platform desktop apps? Is it something you think is still worth learni…

> Can you expand on Pascal vs Go? What is Go missing?

On the context of classical 1970's Pascal, enumerations instead of the const/iota dance.

On the context of Pascal dialects derived from UCSD Pascal and Object Pascal, by non specific order, exceptions, package naming that isn't tied to source control repos, binary distribution of packages, powerfull generics, metaclasses, GUI RAD tooling, more investments into optimizing compilers (gccgo seems stuck in pre-generics Go).

Personally, I came to peace with Go, still hoping to const/iota dance to come to an end, some day.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#60

Cannot remember the last time I used a programming language in the Pascal family. Our programming course we had to use Delphi. This was college back in 2001. I purchased a copy of Delphi 5 (my college has version 4) so likely tried things for a year or two afterwards. I doubt I touched Delphi after 2005. In College we had to create a Stock Control program. It was an IT course so most people struggled as programming w…

We're probably in the same age group. I used to write simple games and graphics apps in Turbo Pascal in high school. Later on I used Delphi to write "business apps". To me, there isn't that much difference between Pascal and C in terms of language design.

I used to translate my Pascal code to C by replacing begin/end with curly braces, moving interface declarations to header files, replacing well named functions to cryptic-sounding strtok calls, etc. It was all so unnecessarily ugly in comparison.

C is my favorite language now, but the cleanliness of Pascal and the user friendliness of Delphi have stuck with me as reminders of how great a developer experience can be.

I've been using Android Studio for 10 years now and the experience doesn't hold a candle to Borland Delphi Architect from 20 years ago. We might have more advanced features these days, but it's a disconnected mess in comparison.

Post reply on HN