←  Programs

ComputerCraft | Programmable Computers for Minecraft

»

[cc 1.5x] Cciri - The Best Siri/encycloped...

Poll: Your opinion about CCiri! (41 member(s) have cast votes)

Do you like CCiri? Do you find it useful?

You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Vote Guests cannot vote

Heracles421's Photo Heracles421 09 Jan 2013

Posted Image


CCiri V 2.1


Yup, that's right, now we have Siri in Minecraft! How does it work? Well, you can input almost anything, then, that input is sent to Wolfram Alpha* which then sends the answer back. Incredible, isn't it? Want to know about Steve Jobs? Ask CCiri! Maybe about pirates? Well, ask CCiri. Now you want to do complex maths? Don't worry, CCiri can handle it!



*Wolfram Alpha limits the requests/month to 2000, why? Because I have a free dev license, which sadly has some limitations

Pictures:
Spoiler


Code:

Installation:
Spoiler

Usage:
Spoiler

Changelog:
Spoiler

Known Bugs:
Spoiler

Credits:
Spoiler
Quote

theoriginalbit's Photo theoriginalbit 09 Jan 2013

Double post... Request one be removed through the "Report" link :)
Quote

Heracles421's Photo Heracles421 09 Jan 2013

Sorry, hehe. I requested the removal of the other one, this will be the one we'll use
Quote

theoriginalbit's Photo theoriginalbit 09 Jan 2013

Haha... Ok :)
Quote

nutcase84's Photo nutcase84 10 Jan 2013

Nice!
Quote

anonimo182's Photo anonimo182 10 Jan 2013

Nice! I supose you and brett are not a team anymore?

Edit: It works, but you should make an spoiler on how to use it, like some example questions
Quote

Heracles421's Photo Heracles421 10 Jan 2013

View Postanonimo182, on 10 January 2013 - 06:33 AM, said:

Nice! I supose you and brett are not a team anymore?

Edit: It works, but you should make an spoiler on how to use it, like some example questions

Well, Brett wanted to take another path, so I released this one that uses http API

About the example questions, I'll post them in a bit, but you can ask almost anything
Quote

Skullblade's Photo Skullblade 10 Jan 2013

This is really cool; so if i understand the code correctly this is just a program that sends all the stuff to wolfram(like siri),

ONE problem though is that if there a bunch of synonyms and stuff you get presented with a wall of similar words and the important stuff like the definition gets pushed off the screen. if there was a scrolling function then you could see all the results:D

really cool, love it
Quote

Heracles421's Photo Heracles421 10 Jan 2013

View PostSkullblade, on 10 January 2013 - 09:57 AM, said:

This is really cool; so if i understand the code correctly this is just a program that sends all the stuff to wolfram(like siri),

ONE problem though is that if there a bunch of synonyms and stuff you get presented with a wall of similar words and the important stuff like the definition gets pushed off the screen. if there was a scrolling function then you could see all the results:D

really cool, love it
I am trying hard to implement scrolling because of that reason, but everything I try seems to fail, even though TheOriginalBIT is helping
Quote

Skullblade's Photo Skullblade 10 Jan 2013

hummm mind if I take a quick look...probably couldn't help though

oh and LOL U SAID DOUGH :P
Quote

Skullblade's Photo Skullblade 10 Jan 2013

From your code the easiest way to implement scrolling would be to make scrolling is to change how you print from a table. First add the text to a table at the end of the table and then when its done adding the text have it print the text from the table(table[i]) and just have "i" starting at how far down you scrolled but have it stop at X number of prints so not to push it off the screen. When you scroll down the starting point of the table (i)is one more then what it originally would be, etc etc.

Tell me if this makes since if it doesn't ill try to explain more
Quote

Heracles421's Photo Heracles421 10 Jan 2013

View PostSkullblade, on 10 January 2013 - 11:06 AM, said:

From your code the easiest way to implement scrolling would be to make scrolling is to change how you print from a table. First add the text to a table at the end of the table and then when its done adding the text have it print the text from the table(table[i]) and just have "i" starting at how far down you scrolled but have it stop at X number of prints so not to push it off the screen. When you scroll down the starting point of the table (i)is one more then what it originally would be, etc etc.

Tell me if this makes since if it doesn't ill try to explain more
Maybe I could do something like
swidth,sheight = term.getSize()
for i = 1,sheight do
  if index ~= sheight then
    print(text[index])
    index = index + 1
  end
end

For the scrolling:
if param = 208 then
  if index <= #text then
    index = index + sheight - 1
    print(text[index])
  end
end

The same could apply to the upward scrolling

And yes, I wrote dough, confused the words :P (Not an English speaker natively)
Quote

Skullblade's Photo Skullblade 10 Jan 2013

What i did for my file browser i created a Draw() function and it printed out the results starting at i (starts at 1) then the scrolling is activated and i+1 or i-1. then it would reDraw
What you did seems seems to work fine though; prints more then screen size and takes the pushing up to advantage


Lol the dough i was just joking around about;OFF TOPIC: what language do you speak? I'm trying to learn a 3rd(German), just curious
Quote

Heracles421's Photo Heracles421 10 Jan 2013

View PostSkullblade, on 10 January 2013 - 12:14 PM, said:

What i did for my file browser i created a Draw() function and it printed out the results starting at i (starts at 1) then the scrolling is activated and i+1 or i-1. then it would reDraw
What you did seems seems to work fine though; prints more then screen size and takes the pushing up to advantage


Lol the dough i was just joking around about;OFF TOPIC: what language do you speak? I'm trying to learn a 3rd(German), just curious

I will try to implement it with both methods

OFF TOPIC; I speak Spanish, O.o
Quote

remiX's Photo remiX 10 Jan 2013

View PostHeracles421, on 10 January 2013 - 12:32 PM, said:

View PostSkullblade, on 10 January 2013 - 12:14 PM, said:

What i did for my file browser i created a Draw() function and it printed out the results starting at i (starts at 1) then the scrolling is activated and i+1 or i-1. then it would reDraw
What you did seems seems to work fine though; prints more then screen size and takes the pushing up to advantage


Lol the dough i was just joking around about;OFF TOPIC: what language do you speak? I'm trying to learn a 3rd(German), just curious

I will try to implement it with both methods

OFF TOPIC; I speak Spanish, O.o

Check your messages :)
Quote

Skullblade's Photo Skullblade 10 Jan 2013

long winded sorry...but what was i checking for?

EDIT:Heracles421 cool you speak Spanish to:D. I know Spanish and English and am trying to learn German since its so fun to speak! Everything in German sounds like a bad word :D
Quote

Heracles421's Photo Heracles421 10 Jan 2013

View PostremiX, on 10 January 2013 - 12:41 PM, said:

Spoiler
Holly.... Thank you sooooo much, adding you to the credits
Quote

Skullblade's Photo Skullblade 10 Jan 2013

awwww now my help feels inadequate :(



Lol jk happy you got it working :P
Quote

theoriginalbit's Photo theoriginalbit 10 Jan 2013

View PostSkullblade, on 10 January 2013 - 11:06 AM, said:

From your code the easiest way to implement scrolling would be to make scrolling is to change how you print from a table. First add the text to a table at the end of the table and then when its done adding the text have it print the text from the table(table[i]) and just have "i" starting at how far down you scrolled but have it stop at X number of prints so not to push it off the screen. When you scroll down the starting point of the table (i)is one more then what it originally would be, etc etc.

Tell me if this makes since if it doesn't ill try to explain more
Haha thats exactly what I suggested to him ;)
Quote

Skullblade's Photo Skullblade 10 Jan 2013

Lol great minds think alike I guess ^_^
Quote