Libraryless. Click here for Pure Java version (979L/7K/22K).
!752 p { S logName = "feedback-log"; //S logName = "memory-log"; int plus = 0, minus = 0, lines = 0; for (S s : scanLog("#1001915", logName)) pcall { ++lines; Map map = cast safeUnstructure(s); print(structure(map)); Number score = cast map.get("score"); if (score != null) { int x = score.intValue(); if (x > 0) plus += x; else minus -= x; } } print("Total plus: " + plus + ", total minus: " + minus + ", lines read: " + lines); }
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001947 |
Snippet name: | Read Slack bot's feedback from disk (works) |
Eternal ID of this version: | #1001947/1 |
Text MD5: | 03738f18e9c7c00d84385251e8fc4dc3 |
Transpilation MD5: | 8fb036f2a7de16ee2a5b9e115019eaeb |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-12-10 21:27:51 |
Source code size: | 497 bytes / 18 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 717 / 729 |
Referenced in: | [show references] |