Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - miotatsu

Pages: 1 ... 7 8 [9] 10 11 ... 22
121
TI-BASIC / Re: multi-bit full adder, need help debugging! :O
« on: May 08, 2010, 12:16:28 am »
Cooliojazz:eh it still is not working for me (it runs but does not give correct output), also i didn't think about the order at the time of programming, i suppose that would make the resulting output backwards wouldn't it? (If you mean what i think you mean) that shouldn't affect the result other than reading order though right?

122
TI-BASIC / Re: multi-bit full adder, need help debugging! :O
« on: May 07, 2010, 10:53:34 pm »
oh i will check that :O

okay im pretty sure its supposed to go after line 28, the idea is take two sets of input, each set taking 3 bits, so that should be right i think, however its throwing a syntax error now

Edit: cleaned up my own double post

123
TI-BASIC / multi-bit full adder, need help debugging! :O
« on: May 07, 2010, 10:20:47 pm »
http://pastie.org/951047
^Its a 3-bit full adder but it doesn't work D:
So i need help debugging it and stuffs
if you dont know what a full adder is (and i do have a working 1-bit full adder)
it is:
http://en.wikipedia.org/wiki/Full_adder
if someone knows about full adders i would appreciate it if they could help me debug it
I Can't figure out what is exactly wrong with it, but i know it properly overflows when you give it 111+111 and it gives the correct answer when you give it 000+000
nothing else seems to be working quite right

124
could you make text/document versions as well as the pdfs by any chance? :{O

125
Computer Programming / Re: Lolcode Tutorial
« on: April 28, 2010, 05:36:03 pm »
here is the interpreter i use on linux: http://www.icanhaslolcode.org/

126
Computer Programming / Re: Lolcode Tutorial
« on: April 27, 2010, 10:14:41 pm »
yes, i will post a link to the interpreter i use on linux soon

127
Computer Programming / Lolcode Tutorial
« on: April 27, 2010, 09:24:35 pm »
I started writing a tutorial for lolcode, the tutorial will be geared towards people with little to no programming experience
it is being cross posted from http://s1.zetaboards.com/mionet/topic/3249388/1/?x=0#post246898
the tutorial is still a work-in-progress

What is it?
Lolcode is an esoteric programming language.
It is a simple language that at one time had a decent sized community.
That community is now pretty much dead and the language is no longer improved.
This is sad because the language has so much potential, but it makes for a great language to learn to program with.

So how do I do it?
You will need either an interpreter or compiler that is compliant with the 1.2 spec

Hold-up, What?
An interpreter is a program that reads code that you wrote and translates it into an action that the computer can perform during run-time.
A Compiler is a program that does all that converting and then packages it into a standalone file so that you can run your program without needing to have an interpreter, it is also a lot faster because your program does not have to be "translated" as it is running.

Okay so where do I get one, and what was that about 1.2 something or other?
I have had good luck with Interpreters, you can find a good one here:
http://www.microngamestudios.com/lolexec.html

And the 1.2 thing?
A specification (spec) is just a standardized definition of what the language should include and information about it. lolcode has gone through 1 major spec and is on the second minor revision, there is also an incomplete 1.3 spec but I recommend you stick with 1.2, incomplete = naughty naughty you dirty boy, stay away from there. ;O

What is the point of having a spec?
You need rules to play The Game. ;O
Different interpreters and compilers will "translate" your code in different ways. If you make sure your interpreter of compiler is 1.2 compliant that means that if you type in code that is compliant with the 1.2 spec your program will run just fine. You don't want icky bugs in your program because of a non-standard compiler or interpreter!

Oh Oh I see :O but where do I find the 1.2 spec?
It can be found here:
http://lolcode.com/specs/1.2

Okay now I have all the stuff i need, i opened the spec in a tab of a good browser like Firefox, bookmarked it, and downloaded that interpreter, so how do i start programming?
Lets start by making an Example program:
Code: [Select]
HAI 1.2
I HAS A NAME
VISIBLE "NAME::"!
GIMMEH NAME
VISIBLE "HERRO " NAME "!"
KTHXBYE


What?
lets start by setting up that interpreter, go to the zip file and find the executable file inside, copy it wherever, I put mine on the Desktop
next we will want to associate lolcode files with the interpreter, this just means that we can double click the source code file and it will automatically run it, heres how:
copy that example program i made up there into a blank text file with a text editor like Notepad.
Save the file as <name>.lol (.lol is the standard file extension for lolcode programs)
and set the file type to "All files"
Right click the newly created file and choose properties
Under the General tab you will see the option
Opens with: blahblahblah [change...]
click the change button and then the browse button in the next window, now just find the interpreter wherever you saved it.
Click Apply and then OK.

Okay I did that but whats that program you made do?
Lets start by double clicking it and we can see for ourselves :{D
A Console window should open with the text "NAME:" on the screen
enter your name and press enter
it should return:
"HERRO (the name you entered here)!"
"Press ENTER to continue..." (this line may vary between compilers and interpreters)
If it worked good, if not make sure you set everything up correctly, if you did and it still does not work try contacting me under the CHAT page, I am usually on. (and if i am not you can always leave a message on the forums!)

Thats cool! but how did you do it?
Lets take a look at that spec.
Formating>file creation
It explains that all code is put between HAI and KTHXBYE commands, these define the start and end of a program.
also note that the 1.2 is ignored, you put it in there to signify that your code is 1.2 compliant.
Next up is
I HAS A NAME
Whenever you want to store a value you must first declare the Variable you want to store it to, I created a variable called NAME, we will store the users name in it.
you could now store something to it by saying
NAME R (number or string here)
you can also give a value to a variable as soon as you declare it, this is done with ITZ
I HAS A NAME ITZ (value here)
We want the user to input their name so we will just leave it null for now (nothing assigned to it yet)
Next up is
VISIBLE "NAME::"!
VISIBLE is the command to output something to the console, you can include multiple things to output and there are some ways to format it, we will want it to say "NAME:(input)"
first thing you will probably notice is the ::, : is used to define some formats, here is a list:
:) represents a newline (\n)
:> represents a tab (\t)
:o represents a bell (beep) (\g)
:” represents a literal double quote (“)
:: represents a single literal colon (:)
note that there are 3 more as well but at least 2 of them are not supported in lolexec, they aren't of major importance so i won't cover them, you can look them up if you want
in the spec.
you will see that :: just means :, this is because : is used for stuff but if you want to literally display :) it would think you meant new line, the extra : tells it that thats not what you want and so it is used to make sure that everything works nice and dandy.
the only other major shocker here is the ! at the end, this just tells it to stay on the same line, normally it will automatically stick a :) on the end of the VISIBLE command
alright so we covered that, next up is the input:
GIMMEH NAME
GIMMEH is a simple command, it only will accept one input per command and only a variable
we have a variable don't we? yeah thats right, we called it NAME!
this will cause the program for you to wait until there is input and the enter key is pressed
then it stores the entered stuff into the variable as a YARN (a YARN is a string of characters)
so now we have a YARN called NAME and it has a name stored in it, lets output it!
VISIBLE "HERRO " NAME "!"
back to VISIBLE, its the same as before just note that it can do multiple expressions. (we did 3 here) also note that "" defines text, if you don't have "" it will assume its a variable. If you output a variable it will dump the contents of the variable on the screen.
Finally we end the program with KTHXBYE.

128
TI-Nspire / Re: TI-Nspire GB Emulator
« on: April 22, 2010, 09:46:08 pm »
yeah i suppose that would be fairly complex to implement, but I don't know much about asm so i can't really say. It would be a very nice feature though

129
TI-Nspire / Re: TI-Nspire GB Emulator
« on: April 22, 2010, 09:41:37 pm »
The gameshark for gbc had a gametrainer thing (where you could tell it to search for a value and then do something and repeat the search in order to find codes easily), this would be a very nice feature for the emulator if gameshark code support was added IMO

130
TI Z80 / Re: Screenshots
« on: April 22, 2010, 08:34:42 pm »
woah, thats a sexy title screen :{O

131
Computer Projects and Ideas / Re: Piworld PC
« on: April 18, 2010, 09:01:29 pm »
well i have no plans of shifting fully into web stuffs, once i have finished all the school related web stuffs and have my site good enough for whatever i probably wont do much web development again

132
Computer Projects and Ideas / Re: Piworld PC
« on: April 18, 2010, 05:48:02 pm »
It depends, i want to get back to them once i am done with web development stuff for school but i don't know if that will just be a part of the class or if we will do it until school ends, worst case scenario would be June

133
Computer Projects and Ideas / Re: Piworld PC
« on: April 18, 2010, 05:26:31 pm »
still havent gotten around to seeing if i can mess with the scanner, but heres my most latest programming related thing:
Volund Xp Calculator
it is a small program that lets you input any given level and it will return how much xp you would need to level up in the game Volund, not really on-topic but i don't think this little thing deserves its own topic so i just stuck it in here ;o

134
TI-BASIC / Re: Trig is confusing me
« on: April 10, 2010, 02:45:59 am »
OH, that makes a lot more sense, but i don't fully get it yet
nvm, i fully understand it now :O

135
TI-BASIC / Trig is confusing me
« on: April 10, 2010, 02:41:42 am »
okay so
a graphing calculator can take an angle and return an answer based on a trig function amirite?
like you can do sin(45 on a ti-84+ homescreen and it returns the sin of a 45 degree angle correct?
If that is correct i am really confused, because i just learned about sin/cos/tan in school and apparently they are just side/angle relationships of a triangle
for instance sin is supposed to be
Code: [Select]
opposite side/hypotenusebut if you only are inputting an angle then how on earth does it know what the opposite side AND the hypotenuse are?!?!

i really want to figure this out because until i do i will never be able to understand trig. ;.;


Pages: 1 ... 7 8 [9] 10 11 ... 22