Libraryless. Click here for Pure Java version (1716L/12K/39K).
!747 m { p { makeAndroid("Translator Runner Bot."); } static synchronized S answer(S s) ctex { new Matches m; if (match3("please run translator * on this text: *", s, m)) { S translatorID = unquote(m.m[0]); S text = unquote(m.m[1]); S result = runTranslator(text, translatorID); return "Result: " + stringOut(result); } if (match3("please run translator * on snippet *", s, m)) { S translatorID = unquote(m.m[0]); S textID = unquote(m.m[1]); S text = loadSnippet(textID); S result = runTranslator(text, translatorID); return "Input: " + stringOut(text) + ", result: " + stringOut(result); } return null; } static synchronized S stringOut(S s) { return quote(s); } }
Removed the "long strings" mechanism.
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001206 |
Snippet name: | Translator Runner Bot |
Eternal ID of this version: | #1001206/1 |
Text MD5: | 36af683684afd77faa0e2b44c1d25965 |
Transpilation MD5: | 7d130df7f5c67c67da046c636f818f70 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-11-16 21:30:40 |
Source code size: | 816 bytes / 32 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 666 / 952 |
Referenced in: | [show references] |