Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

47
LINES

< > BotCompany Repo | #757 // Standing Challenge for relp.slack.com

Document

STEFAN'S STANDING CHALLENGE TO RELP.SLACK.COM (open ended)

Hi guys!!

Here's my own challenge for you, complementing the Weekly Challenges. The advantage here is that the results will be useful, new programs!

The challenge is:

=====================================================
Write a BOT-LIKE FUNCTION in a C-SYNTAX-ISH LANGUAGE.
=====================================================

That means: Use C, C++, Objective C, C#, JavaScript (yikes!)... (Or, of course, Java or JavaX.) I'll also accept Python just to show I can.

A BOT-LIKE FUNCTION is a function that receives a string (a user question) and returns another string (the bot's answer). Return null or "" if you don't have anything to say. You can write multiple functions and do other stuff; just please refrain from the super-complex (no C++ templates).

I WILL DO THE REST.

Specifically, I promise I will translate your bot function from your chosen language into Java using an automatic translator.

I can also put the bot online on relp.slack.com afterwards if you like that.

The winner bot of the day is the one that people use most when it's online... ^^

Mode of entry: Write a post in #talkingbots or PM or mail me (@stefanreich, stefan.reich.maker.of.eye@gmail.com).

Final note: All submitted source code will be published and considered public domain (crediting you of course!).

Hack away! :-)


Example code (Python):


  # deh function!

  def answer(s):
    return "OMG USER! I can't believe you just said: " + s

  # deh test program! oh, python is so nice and short.
  
  s = "hello computer!"
  print(s)
  print("> " + answer(s))


(JavaX Translation: #1002002, Translator: #1002001)

download  show line numbers   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #757
Snippet name: Standing Challenge for relp.slack.com
Eternal ID of this version: #757/1
Text MD5: 8580e4cfa2addcd18a40a148cb2bec35
Author: stefan
Category:
Type: Document
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-12-11 20:59:31
Source code size: 1719 bytes / 47 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 2042 / 189
Referenced in: [show references]