Calculator Program For Linux

Hey Jow Forums, I made a calculator program for Linux. It is command-line only. You can download it from my Github repository. Compile the program with gcc with the command "gcc calculator.c -o calculator". If you want your shell to invoke the program from any location, move the executable, with root permissions, to your /bin folder. Please read the description before using the program.

github.com/PHILLIPGATLIN/ArithmeticCalculator

Attached: 1531510068031.jpg (1080x1080, 218K)

Other urls found in this thread:

en.wikipedia.org/wiki/Indentation_style#K&R
twitter.com/NSFWRedditImage

Attached: 1535214247643.jpg (250x250, 14K)

Thought the same. Reviewed the code. It's legit a calculator.

>here user: run this code as root
uh

Exactly. I just reviewed the code and found the botnet at line 137. If you run this as root it will send all your data to the NSA and kill your goldfish.

Attached: 1532687179717.jpg (400x406, 58K)

You made a calculator? This is like the bare basics in programming...

>get people to try it out, and verify its integrity in-thread
>change parts of the code a few hours later
>several people now run malware as root, before someone picks up on it

shit fucking syntax
kys

completing a project and putting yourself out there is an important step, good luck on your journey Phillip

indeed, but it is functional & usefull anyway
whatever dude

Attached: planets.gif (500x510, 720K)

syntax in C is never "whatever" faggot

Nice try Phillip, if that is in fact your true name.

>a fucking calculator
Should I make a github and upload my cool things there?
What am I losing by not doing so?
I have made hacks for a videogame, a cool shooter game, lots of web scrapers and useful scripts for specific purposes

Nice blog post about your class project, faggot.

Attached: provemwrong.jpg (680x508, 123K)

so this is the kind of people that browse Jow Forums

Attached: file.png (364x364, 155K)

>Prefix notation

This, postfix or bust

>try
it fucking works you nigger, coimpile it and see for yourself

try this command: bc

>go to the GitHub
>see that changes were made more recently
>Click to view changesets and see what was changed
>?????

>coimpile
sorry user I can't find my coimpiler

yeah the program processes input by-character, each character that is not acceptable will cause the error message to be printed.

>before someone picks up on it

*dc

Absolutely no one is going to try it out.
Github should be used for things people might want to use, not fucking homework.

I made a chrome wrapper that prerenders pages using node, and a docker+kubernetes service that exposes it.

Am I col yet 4chin???

but this project was not homework, i am learning programming by myself, i made this program so that it will be useful to other people, a calculator is useful

Thanks op, this will be very useful for me.

Linux is just a KERNEL.

why should I sue yours over what already exists, retard.

much appreciated, I've never see a calculator before in the repo's so this was much needed

Then don't pull the changes?

>all the retards itt
where are you getting the info about op asking you to run this as root?

>What am I losing by not doing so?
Nothing really. My projects are not worth a dime, but I use GitHub to always have access to up-to-date versions from all of my devices. It could also be useful if you are looking for feedback or secretly want people to help you find bugs.

botnets don't need root to still be a botnet

I made a calculator when I didn't know how to make parsers. I also wanted it to be easily customizable (custom operations, prefix/infix notation, function calls with/without parentheses). I don't want to look at that code.

Keep telling yourself that, you neckbeard licker.

I've been trying to make a calculator in Python recently that formats mathematical equations properly through keyboard input. It's a mess.

Attached: delidmedaddy.jpg (972x547, 90K)

Attached: b2c.png (646x403, 322K)

echo $((2+2))

>linux has a sick opensource free as in gratis super simple to compile and use calculator
your move wintards

This is what I use:
=() {
local IFS=' '
local calc="${*//p/+}"
calc="${calc//x/*}"
bc -l

Attached: godiwantlinustofuckme.jpg (960x720, 52K)

awesome, thanks user

Cool user, but I'll stick with bc.

excellent, now I never have to use bc i.e. open up the man pages every time I want to use it

Don't come to this place for positive feedback OP, it's a cesspool. These fucking autismos think fizzbuzz is real programming.

Nice work. Keep on learning.

This is a good start to eventually understanding parsers and compilers. I see you've set some good, achievable goals. Good luck!

wtf this bricked my computer

cool, but it's basically just the RPN calculator in K&R

Attached: 1535755783440.gif (370x319, 1.99M)

He seems like a nice guy

What happened to the lower side of the stick?
Did the doggo think so hard that he was able to force the stick to pass right trough the pole?

huh, never noticed that

Attached: COMBINED.gif (729x409, 10K)

i just want to BLACK swedish SLUTS all day

DAYUM SHE NEEDS SOME BLACK SEED

MMMMMMMMMMMMMMMMMMMMM

>before someone picks up on it

Are you new to git too?

Attached: Screenshot_DuckDuckGo_20180902-003217.png (720x1280, 129K)

>change parts of the code a few hours later
So the initial commit doesn't contain the malicious code.

>baby's first shunting yard algorithm

your point being?
it's perfectly fine to create issues like this for documentation and as a todo list

>So the initial commit doesn't contain the malicious code.
jesus fucking christ:
OBVIOUSLY given the source code.
OBVIOUSLY so that people can run the code and confirm its workings.
OBVIOUSLY so that people will think it's okay to run, and possibly skip double-checking eventual last-minute fixes.
OBVIOUSLY this is UNLIKELY but UNAVOIDABLE given long_int Jow Forumstards

/* O B V I O U S L Y */

there's a problem with the multiplication

why haven't any anons used their (((github))) accounts and spam OP with retarded pull requests that will ultimately make it impossible for OP to share with future employers?

>literally baka

Attached: zoomer.gif (874x492, 2.71M)

This is pretty basic shit DESU, in fact I just had a mini project like this where they gave us this exact algorithm to make it. Except they made us use Java, and split things like the stack into its own class. Beginner Comp-Sci is a joke.

Only two major things bother me about this.
> Line 19-37
You can use an switch/case statement here to make it more readable.

And that formatting is fucking horrid. K&R is the only good choice: en.wikipedia.org/wiki/Indentation_style#K&R

welp, not downloading this shit then, i dont care about muh privacy but i love my goldfish

he looks like a funny dude