CodeWalrus

Featured Member Projects => Completed and Inactive Projects => [Inactive] Hero Core (TI-83+/84+) => Topic started by: Alvajoy123 on June 16, 2017, 05:22:16 AM

Title: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: Alvajoy123 on June 16, 2017, 05:22:16 AM
 :) Um. This is my first program in C and I will be needing a lot of help and I don't want to mess up my laptop or my computer. :D And I will be using tool chain. :D
So before start is this how you start a C program
#inculde

! please find a YouTube video that can help

By: Alvajoy123
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 05:24:04 AM
you can't learn C programming in half an hour, and if you are concerned about messing up your laptop (or your calc), you really shouldn't be programming in C
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: Alvajoy123 on June 16, 2017, 05:29:11 AM
Quote from: kotu on June 16, 2017, 05:24:04 AM
you can't learn C programming in half an hour, and if you are concerned about messing up your laptop (or your calc), you really shouldn't be programming in C
Ok but please help learn how to program in C
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 05:29:39 AM
I would suggest buying a book on C programming
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: Alvajoy123 on June 16, 2017, 05:32:08 AM
Quote from: kotu on June 16, 2017, 05:29:39 AM
I would suggest buying a book on C programming
What's​ a name of a book for programing in C ???
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 05:33:54 AM
i'm not actually sure as i don't have any C books myself, only C++

someone else will probably be able to help
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: Alvajoy123 on June 16, 2017, 05:48:43 AM
Quote from: kotu on June 16, 2017, 05:33:54 AM
i'm not actually sure as i don't have any C books myself, only C++

someone else will probably be able to help

Ok but can to give the tittles of the c++ books
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 05:52:01 AM
Try "The C++ Programming Language" by Bjarne Stroustrup
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: Alvajoy123 on June 16, 2017, 06:04:57 AM
Quote from: kotu on June 16, 2017, 05:52:01 AM
Try "The C++ Programming Language" by Bjarne Stroustrup
Ok I will thx
How much does it cost

Why I'm doing this
I have nothing to over summer so boring
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 06:06:48 AM
Quote from: Alvajoy123 on June 16, 2017, 06:04:57 AM
How much does it cost

£38
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: Dream of Omnimaga on June 16, 2017, 03:49:45 PM
How good (or bad) is C++ support on the CE? Can a C++ book even be used at all to learn C?
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: SopaXorzTaker on June 16, 2017, 03:57:38 PM
Quote from: Alvajoy123 on June 16, 2017, 05:22:16 AM
:) Um. This is my first program in C and I will be needing a lot of help and I don't want to mess up my laptop or my computer. :D And I will be using tool chain. :D
So before start is this how you start a C program
#inculde

! please find a YouTube video that can help

By: Alvajoy123


The CE C SDK is not the best thing to start with. First of all, I recommend learning proper C. A basic introduction can be found here: http://www.learn-c.org.
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 07:59:03 PM
Quote from: xlibman on June 16, 2017, 03:49:45 PM
How good (or bad) is C++ support on the CE? Can a C++ book even be used at all to learn C?
C++ is not supported on the CE. And, depending on the book, yes, as C is a subset of C++.
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: mazhat on June 16, 2017, 08:40:45 PM
I'm going to counter what kotu said and say don't buy "The C++ Programming Language".
There's too much that you'd already need to know before reading that book.
You'll most likely get confused and will have wasted your money.

Before you learn any language, you need to understand key programming concepts, not the language itself.
You should already know variables, loops, subroutines, ect, but you have to conceptually understand:
-OOP (Object-oriented programming)
-Classes and structs.
-Memory allocation.
-What a pointer is, and why it's SUPER important.
and most importantly, something I have seen you mess up many times:
-What makes C++ different from TI-Basic, Java and every other programming language.

Tip: If you can't tell me why C++ is different/better than Basic/C/Java in more than a paragraph you are not ready to learn C++.

@kotu Didn't C++ used to be a subset of C? If I remember correctly "C with classes" was the subset name. I hear lots of arguments for C++ not being C's subset because of the different directions they're going.
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: TheMachine02 on June 16, 2017, 09:11:40 PM
C++ IS experimentaly available for the CE,  just to say  :P
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 09:14:02 PM
No, technically C is a subset of C++.

Also several points:
C++ is not categorically/absolutely better than BASIC/Java etc. The different languages serve different purposes. In fact, C++ is more dangerous than those languages.

Also
OOP, classes, pointers, are not required learning, in general. BASIC has none of these, for example.

But please feel free to discuss
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: mazhat on June 16, 2017, 09:36:49 PM
Concerning C++ being a subset of C, I agree with you.
I just see a lot of arguments on the interwebzz.
Programmers love to argue with each other on trivial things for some reason.

On my points I try to make generalisation's to be efficient in typing.
I was actually planning to leave out the word "better" in my post because it's simply wrong.
->Assembly was made with the limitations of days gone by.
->Java was made with security in mind (e.g. to prevent things like buffer overflow exploitation with pointers)
->Basic is meant to be quick to program in, and easy to learn.
And I respect those design choices.

Oh yes, I understand your last point, but
I will say that learning those concepts are very convenient in the long term, for C++ specifically.
In general just stick with the basics like variables, conditionals and loops and you'll be fine.
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 09:38:55 PM
BASIC is not necessarily meant to be quick to program in

:p
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: mazhat on June 16, 2017, 09:42:49 PM
You want me to be honest with you?

I've only used BASIC and TI-BASIC a few times.
I'm a fraud who tries to sound knowledgeable.

00 PRINT "This is pretty much the extent of my knowledge"
10 GOTO 00
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 09:52:24 PM
At least you know why goto is bad
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: mazhat on June 16, 2017, 11:08:57 PM
In my book the only place goto is welcome is in Assembly (jumps) and nested loops.
Otherwise don't you dare spill that spaghetti on my computer.

Irrelevant: I personally prefer to use C++ and Assembly for programming.
I would learn C, but I feel it'd be redundant.

Also I realised how strange Alvajoy's first post is:
*Include is spelled wrong
*Nothing comes after
WHO IS THIS MAN?
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 16, 2017, 11:10:03 PM
I enjoyed it
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: c4ooo on June 17, 2017, 04:25:58 AM
Quote from: kotu on June 16, 2017, 09:52:24 PM
At least you know why goto is bad
All loops (for, while, etc) in c/c++/whatever are implemented using goto (aka jump aka branch) instructions. How do you feel about that? :V
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 17, 2017, 06:20:28 AM
Well, I already knew that






:p
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: Dream of Omnimaga on June 17, 2017, 02:10:04 PM
Quote from: mazhat on June 16, 2017, 11:08:57 PM
In my book the only place goto is welcome is in Assembly (jumps) and nested loops.
Otherwise don't you dare spill that spaghetti on my computer.

Irrelevant: I personally prefer to use C++ and Assembly for programming.
I would learn C, but I feel it'd be redundant.

Also I realised how strange Alvajoy's first post is:
*Include is spelled wrong
*Nothing comes after
WHO IS THIS MAN?

Or the TI-81, where the only loop instruction is goto
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: _iPhoenix_ on June 17, 2017, 07:44:22 PM
My list of problems with this thread:
[spoiler]
1: It's off topic.
2: it's in a freaking inactive subforum, which is for a completely different calculator, and purpose. ([Inactive] Hero Core (TI-83+/84+), which is one of Keoni29's projects)
3: Not technically a problem, but a better thread name would be "Alvajoy123's C learning thread"
[/spoiler]

Ok, with that done, I completely agree with mazhat, that learning the programming language is not as important as learning the concepts.

Pro tip: Learn normal C before you attempt Calculator C.

Here's how a programmer (me) approaches a new language (in this case, C, as I am learning it myself)

0: Read up on the language, major concepts in that language, and especially a refresher on the basics of OOP (Which I find I forget quickly)
1: Find a good tutorial. I sincerely recommend learn-c.com, as it is still a huge resource to me.
1b: DON'T SKIP THE BASICS IN FAVOR OF MORE ADVANCED PROJECTS, ONLY DO 1-4 LESSONS A DAY, AND AFTER THAT, WRITE A SMALL PROGRAM DEMONSTRATING THOSE LESSONS AND WHAT YOU LEARNED. I find I cannot stress this enough.
2: Attempt a *simple, small* project. It should be challenging enough that you need to think about it for more than 30 seconds, but not as complicated such that it takes you a few days.
3: Repeat steps 1-2 with a few different simple tutorials, to make sure that you have the basics down.
5: Now, you should be fluent in this new language enough so that you can learn C for the CE, following the tutorial given on the github.

Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 17, 2017, 07:48:29 PM
I would say fair enough, but these points...

1) what environment/compiler would you recommend to develop C programs on PC??

2) C doesn't really have OOP, it has structs.

EDIT
to clarify, C is a structured programming language, not an OOP one.
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: _iPhoenix_ on June 17, 2017, 08:18:13 PM
1) I have a mac, and use Terminal and Sublime Text.
2) Yes, but having an understanding of OOP helps one understand structs.
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 17, 2017, 08:26:17 PM
I wouldn't really agree, structs are just data structures

OOP really entails a lot more ie. having both private and public data members, and function methods - code is contained within the class (as opposed to just having functions which act upon data structures, as in C)

ie. you have a class Car
Car->DriveFast()

etc
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: c4ooo on June 17, 2017, 08:45:41 PM
Questions aside, what is this doing in the HeroCore subforum ???
Same for the https://codewalr.us/index.php?topic=2111.0 thread.
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 17, 2017, 08:46:17 PM
Alvajoy was confused
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: c4ooo on June 17, 2017, 08:47:05 PM
Quote from: kotu on June 17, 2017, 08:46:17 PM
Alvajoy was confused
It should be moved :V
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 17, 2017, 08:51:04 PM
I think that would be unfair on Alvajoy don't take the **** out of him, he's only human
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: _iPhoenix_ on June 18, 2017, 12:17:09 AM
Quote from: kotu on June 17, 2017, 08:51:04 PM
I think that would be unfair on Alvajoy don't take the **** out of him, he's only human

I wouldn't know, I'm run on a supercomputer.
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 18, 2017, 12:24:34 AM
everyone knows he is an orc, and the best programmer in here - lets kill him in a fight

Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: _iPhoenix_ on June 18, 2017, 09:26:31 PM
Who me?

I'm no Orc lel
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: kotu on June 19, 2017, 06:21:23 PM
Alvajoy
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: _iPhoenix_ on June 19, 2017, 11:35:57 PM
Alvajoy is a good programmer, and I have nothing against him.
His projects are unique, refreshing, and tbh pretty damn cool.
But I think there are MUCH better programmers on here (i.e. Mateo)
Title: Re: C programing on the TI-84 plus CE. by: Alvajoy123
Post by: Unicorn on June 20, 2017, 02:52:48 AM
@Juju @xlibman @someonewhoisamod please move this to the correct subforum.


Also, gimme mateoc orc battle.