What language should I use for an IF coding tutorial?

So, I’m curious what I will get for a few weeks of effort. Something in between? Life isn’t black and white. Life is shades of grey.

Yeah, the discussion about language is so bad, I had to flag it as off topic. I really don’t care what language to use, really. That’s why the survey is there. You can pick any or all languages. Is that so hard to understand?

I personally consider C to be of higher level than BASIC, and I’ve written the reasons why. Regardless, who cares about what language is higher levels?

If the choice of language is up to me, I’d choose Processing/SmileBasic and I’ve told you why. What I want to know is what language other people are using to write their code. What language you’re using to write your code. I cannot choose a language for you. You can choose a language for me. That’s why I have to make the survey. Why is it so hard for you to understand that?

If you have a favorite language that is not listed, then choose Other (specify) and that’s it! Don’t try to convince me, or anybody else for that matter, that your chosen language is superior, or worse, that my chosen languages are inferior. That’s the way to language war.

The fact that I have to explain this, well, it’s just so disappointing, you know?

No, I didn’t. I’m pretty well set regarding it.

Edit:
PS: Javascript isn’t off the table. It’s just that it’s not a consideration at this time . I wrote that, right? Right? Sigh.

I think what everyone is trying to say is that this is your pet project. You’re the best person to decide which language to use. I think it’s safe to say no one believes that using any of the languages you listed is a viable option for a new, modern IF authoring system.

But that doesn’t seem to be what you’re trying to build and you have your reasons for sticking with your initial selection. That’s fine, but the forum can’t help you here. And you’re coming at it a little bit aggressively.

Do your thing and share with us when you have a proof of concept, how about that? :grin:

1 Like

Why do you confuse the matter still? You are not helping! The proof of concept, as you say, will need to be coded in a programming language, and I’m trying to find which ones to use!

Or are you telling me that if I code it in, say Rust, then lots of people will be able to compile it on their machines? You don’t know that!!!

I’m not writing a compiler here. The games will be coded the hard way. It’s a language agnostic design! That’s what coding from scratch means.

Is the concept so foreign that no one here can understand it? Hello?

Who’s doing that? Not me. Don’t drag irrelevant subjects! Sigh.

Edit:
And that’s even assuming I can actually compile Rust on RPi, since there’s no specific build for it, and the best advice is to just do cross compilation to RPi. Hmmmph!

C/C++ compiler? Gcc. C compiler? TinyC. Easy. Perl is built-in. Processing, you need to install, but it’s relatively seamless. You can do it via PiApp.

And in case you missed it:
THAT’S WHAT CODING FROM SCRATCH MEANS!
Sorry to be aggressive, but people just keep pushing their views onto me. Extremely, extremely, extremely frustrating.

What kind of IF are we talking here? Parser? Choice?

Here is a suggestion; do your project in a language agnostic way. Explain the concepts, program flow and potential tricky parts. Do it in psuedo code or on an even higher conceptual level.

Then you implement it in one or two languages of your choice just to showcase how easy it is.

(During my school years we used Pascal. It is strongly typed and presumably it teached you good coding habits. So use that…)

3 Likes

Parser. Of course I’ll use Pseudocode. It’s the implementation stage that I’m having trouble with. I probably will end up using C, even though I like Processing/Perl, just because I think it’s what lots of people can use, albeit not their preferred language.

I know Pascal. I don’t believe that’s a good language to teach to beginners. I’d sooner use BASIC than Pascal. Sorry.

I wasn’t really serious about Pascal…

My point is that if you are explaining the design good at the pseudocode level the actual language you implement it in are irrelevant. Very few would want to compile your implementation as it is but maybe a few would like to do their own work in your vein but they will then probably do it in the language they are most familiar with.

1 Like

I moved this discussion to a new topic as it’s fairly disconnected from the old one, and the question being asked, which language to use for a coding tutorial, is not really very similar to whether people would like a C IF development library.

Yes. You got it! (To @heasm66 , just in case there’s confusion due to split topic.)

However, that’s not what I’m doing here. Here, I’m doing a survey so that my initial implementation is done on the language most people are familiar with, other than Python and Javascript. Well, Dan has successfully hijacked the subject. I don’t see anyone is voting the survey anymore. :rage:

Edit:
I’m just going to close the survey. I just don’t see why the question “What programming language do you use to code IF?” somehow got translated into “What programming language should I use to code IF?”

That’s got to be quite a development. Total opposite of what is intended. Very frustrating, indeed.

Maybe I should have been more forceful in the beginning when Dan misinterpreted the question. Maybe I should have said right then that when I said “which language should I use”, I meant “which language does everyone uses.” But I think subsequent exchanges should make it clear. For the misunderstanding to stand for so long, sigh.

Can I suggest everyone be a bit more patient?

You didn’t make it at all clear in your first post what you were planning. Indeed, that’s the very first thing anyone said in reply to you. And then you asked “What language should I use?”, in the context of a Raspberry Pi Zero. Dan points out, rightfully, that on such a computer there basically isn’t any programming language that won’t work. Which means the platform is really quite a red herring.

But you never asked “What language do you use to code IF?”, or what language would you like to, or what language would you think is the best for beginners to learn… even so, most people have been providing relevant points about lots of languages. And we don’t know why Python and Javascript are more abstracted than Perl in your mind, which makes it hard to suggest other languages too.

I suggest you start again, and either ask

  • I want to make a tutorial for learning to program, using either language X, Y, and Z. Which do you think is best?
  • I want to make a tutorial for learning to program. Which language do you think would be best?

For the first, just limit the options to your short list.
For the second, don’t put any limits, just ask for people’s opinions. If you want to rule out whatever ends up on top for whatever personal criteria you have, you can!

9 Likes

well, I don’t know whose dialect of basic has it, but for IF is best one whose has calculated harmful implements :wink: (for the non-initiated to long-standing “philosophical” debates, calculated GOTO) whose IMVHO is preferable to long ON… GOTO lines (whose surprisingly can be readable if using a late basic dialect, with labels in place of line numbers, but AFAICT late basic dialects has also CASE… SELECT, whose is a better alternative.

OTOH, in my humble opinion, as learning language Pascal and even FORTRAN can be better (early FORTRAN has even calculated goto…); not few mess-dos IF was written in Turbo pascal with custom parsers, and well, FORTRAN was without unreasonable doubt the seminal language of IF…

note that FORTRAN, believe it or not, was intended as a language for non-computer people with a solid mathematical background (mathematicians, incl. the actual human computers (open an pre-1950s english dictionary and see…) engineers, statisticians)

if someone wonders, yes, a Naval historian must be also a historian of technology, even more than an historian of aeronautics.

Best regards from Italy,
dott. Piergiorgio.

3 Likes

Indeed, the more designs I went through, the more I think calculated GOTO is the right feature to have. Just goes to show that the more protective the language is, the less capable.

First, I don’t know whether this is going to contribute to the discussion or to the confusion. In case of the latter, sorry about that…

What I don’t get exactly from the thread is whether you want to teach people:

  1. a programming language by programming a piece of IF in this language (you picked IF from a list of many possible subjects)
    or
  2. to write IF by using a programming language and seek advice about which language.

Here’s my story about learning how to program in C that ended up in writing an IF development system.

Many years ago (early ‘90s) I decided to learn C by programming a text adventure in C. Pretty quick I realized that hey, if I make this function a little more general, I can reuse it in other adventures. Long story short, I ended up with an IF language and a compiler and interpreter for it. And I learned C.

I wrote it all from scratch. Only C, no APIs, libraries. The only code I did not write myself were the C header files.

At some point I wanted to share the stuff I made so I wrote a documentation set. The docs also contain a tutorial, maybe it can be of use to you.

I could elaborate more about my learning (endianness, base64, json) but as I said I don’t know if it addresses this thread’s issues.

Anyway, all of my work is here, in case you’re interested.

Thanks for reading.

4 Likes

Why would I want to go through a second round of misery? Have I not suffered enough?

Anyway, I think it should be clear now that you will need to write your own code, and I wonder what programming languages (more than one) that you want to use, the more primitive, the better.

But, no, I ended up being lectured that all my chosen languages are the bane of computer students everywhere! What was it Djisktra said? Something about brain damage beyond any hope of recovery?

Like I said, the very opposite of what I need. I guess once the ball got rolling, there’s just no stopping. Therefore, I won’t be doing that again, or anything else close to that.

However, you are free to do so, if you feel so inclined. Thank you.

PS: Yes, I didn’t say “you” in the original comment. I can look over the comments and misunderstandings, and realize that it’s a cultural thing. My original statement is actually a polite form of request, where I come from. So, once Dan misunderstood my intentions, I should have forcefully corrected him right then and there. Or should I have? I get nicked for being “aggressive” after all. This, despite having repeatedly expressed frustration, a clear sign of being misunderstood. Sigh. (<- frustrated! )

That’s actually fantastic work!

But it’s not for me. Mine is even simpler and more primitive than that. Remember, I’m not building a compiler, so I can’t do anything fancy.

But I really appreciate you showing it to me.

Thank you.

Please keep the discussion civil.

Everyone here comes from different levels of coding and programming experience, so some answers received might not seem helpful on the face of it, but may stem from genuine misunderstanding of the subject or what is being asked. None of us can read each other’s minds, so please exercise patience in responses.

This is a public discussion forum, so please understand conversations may veer as people chime in and report their own experiences and ask related questions. We can split and rearrange topics and messages as necessary.

Everyone here wants to help, and everyone appreciates kindness and patience.

Thanks!

7 Likes

This effectively killed the survey. Sigh.

Regarding only the languages you mentioned:

If your aim is to stay close to the format and length of the classic type-in adventures from magazines, then simply going with BASIC might be a good strategy.
That way, it would probably also be easiest for you to check that you are on track, do not succumb to “feature creep”, and keep it simple and focused.

Although, just to provide a data point for the survey, I have a C compiler installed, but currently not a BASIC compiler/interpreter. Of course, installing one would not be an insurmountable obstacle.

Another idea:
Since, if I understand correctly, you are keen on separating the design from the implementation language, you could maybe also try a double approach (if you have the time and inclination):

Write up the features and design specification, then do one implementation (+ tutorial/explanation) in BASIC, and one in C. Of course, that would mean more work for you, but it could be interesting for yourself and for the readers to see the languages in comparison, and you could be relatively sure that most readers will get at least one version to run on their computers.

1 Like

Those are good advice. I appreciate them. BASIC has been fragmented greatly. I don’t have it on my machine either. That’s why the survey point says (specify) so I can see what’s out there.

I’m glad you pointed out the dual approach as that is something I feel missing from the existing tutorials. As in, all the info are there, but jumbled together. By splitting the approaches, I can streamline the process and hopefully makes it clearer.

It will be twice the work for me, true. But I’m hoping that it will be easier on people to understand and use.

Thank you.

1 Like

As far as I know, QB64 is relatively popular and cross-platform, but I’m not a BASIC expert by any means: https://qb64.org/

1 Like

I’m still struggling a little with exactly what you’re looking to discuss, however it might be useful to flag up this particular article here.

This is a transcript of Ken Reed’s article from Practical Computing in August 1980, itself heavily influenced by an earlier piece by Scott Adams.

http://graemeyeandle.atwebpages.com/advent/kenreed.html

It was an incredibly influential article at the time and went on to inspire lots of different simple parser systems, in BASIC and other languages. It inspired the creation of systems like Trevor Toms’ parser, the Quill, the GAC etc.

Although it’s not the easiest article to read these days (especially for a non-programmer) the way it approaches breaking down the problem of creating an “adventure” game may be useful to mirror, particularly its approach of trying to produce a platform agnostic guide.

3 Likes