Uses 1059K of libraries. Click here for Pure Java version (2886L/15K).
1 | !7 |
2 | |
3 | cmodule2 QuestionTripleTest > DynPrintLog { |
4 | switchable S multiBotModule; |
5 | switchable long mainPostID; |
6 | transient GazellePost mainPost, variation, q1, q2, a1, a2; |
7 | |
8 | start-thread { |
9 | mainPost = importPost(dm_call(multiBotModule, "getPost", mainPostID)); |
10 | print(+mainPost); |
11 | if (mainPost == null) ret; |
12 | variation = importPost(first((L) dm_call(multiBotModule, "repliesWithTag", mainPost.importedFrom, "variation of"))); |
13 | print(+variation); |
14 | if (variation == null) ret; |
15 | |
16 | q1 = replyWithType(mainPost, "Question"); |
17 | print(+q1); |
18 | q2 = replyWithType(variation, "Question"); |
19 | print(+q2); |
20 | a1 = replyWithType(q1, "Answer"); |
21 | print(+a1); |
22 | a2 = replyWithType(q2, "Answer"); |
23 | print(+a2); |
24 | } |
25 | |
26 | GazellePost importPost(O post) { |
27 | if (post == null) null; |
28 | GazellePost p = cast quickImport(post); |
29 | p.importedFrom = post; |
30 | ret p; |
31 | } |
32 | |
33 | GazellePost replyWithTag(GazellePost post, S tag) { |
34 | ret post == null ? null : importPost(first((L) dm_call(multiBotModule, "repliesWithTag", post.importedFrom, tag))); |
35 | } |
36 | |
37 | GazellePost replyWithType(GazellePost post, S type) { |
38 | if (post == null) null; |
39 | ret objectWhereIC(lmap importPost((L) dm_call(multiBotModule, "repliesTo", post.importedFrom)), +type); |
40 | } |
41 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030019 |
Snippet name: | Gazelle Question Triple Test [dev.] |
Eternal ID of this version: | #1030019/13 |
Text MD5: | 9936b1252a4ebe5821a0c54e75e8b8dc |
Transpilation MD5: | 9fd069b26bb09a0800d9f6c977232a5a |
Author: | stefan |
Category: | javax / gazelle.rocks |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-10-30 10:05:32 |
Source code size: | 1309 bytes / 41 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 257 / 449 |
Version history: | 12 change(s) |
Referenced in: | [show references] |