Libraryless. Click here for Pure Java version (14681L/112K/323K).
1 | !7 |
2 | |
3 | !include once #1002615 // master() |
4 | |
5 | // Options for smaller heap with limit to allow other VMs to start on 1GB machine. Also, headless to allow image rendering on server. |
6 | static S vmArgs = "-Xmx384m -XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC -Djava.awt.headless=true"; |
7 | |
8 | // Options for smaller heap |
9 | //static S vmArgs = "-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10 -XX:+UseG1GC"; |
10 | |
11 | // Options for max speed & reactivity - some claim this might cause problems (https://developer.jboss.org/thread/228920?start=75&tstart=0) |
12 | //static S vmArgs = "-server -XX:+TieredCompilation"; |
13 | |
14 | // Options for max longterm throughput |
15 | //static S vmArgs = "-server"; |
16 | |
17 | // Homepage, Talk to Eleu, Web Auth, Cookies |
18 | static L<S> seedBots = litlist("#1003253", "#1002213", "#1002590", "#1002157"); |
19 | |
20 | sbool doSlack = false; |
21 | |
22 | !include #1002268 // Slack Bot |
23 | !include #1002576 // Web Serving |
24 | !include #1002578 // Eleu Core |
25 | !include #1013904 // Eleu web socket |
26 | |
27 | static boolean actuallyPost = true; |
28 | static S botUserName = "eleu_learns_to_think"; |
29 | static L<S> actualBotUserNames = litlist("eleu", "connector"); |
30 | |
31 | static int[] webServerPorts = {80}; |
32 | static int httpsPort = 443; // set to 0 for no https serving |
33 | |
34 | p { |
35 | becomeBotVMIfFirst(); |
36 | webInit(); |
37 | |
38 | eleu_webSocket_init(); |
39 | |
40 | if (httpsPort != 0) pcall { |
41 | File keystore = secretProgramFile(programID(), "keystore.jks"); |
42 | S pass = loadSecretTextFileMandatory("keystore-pass").trim(); |
43 | serveHttps(httpsPort, keystore, pass); |
44 | } |
45 | |
46 | if (doSlack) |
47 | initSlackBot(); |
48 | dediSay("Booting..."); |
49 | coreInit(); |
50 | |
51 | for (S id : seedBots) |
52 | call(getDispatcher(), "addSeedBot", id); |
53 | |
54 | dediSay("Yo, back online!"); |
55 | if (doSlack) |
56 | slackBotLoop(); |
57 | } |
Began life as a copy of #1001915
download show line numbers debug dex old transpilations
Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, etryasgzbotu, gwrvuhgaqvyk, iqyiutiwpefi, irmadwmeruwu, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002017 |
Snippet name: | Eleutheria Main, including Slack Bot (LIVE) |
Eternal ID of this version: | #1002017/20 |
Text MD5: | db4d81021f6fc02fa6761e021fd9e1f5 |
Transpilation MD5: | 69e08cf0ac68b721a6140fb126064d57 |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-02 13:11:08 |
Source code size: | 1756 bytes / 57 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 1860 / 10409 |
Version history: | 19 change(s) |
Referenced in: | [show references] |