Uses 911K of libraries. Click here for Pure Java version (3615L/19K).
1 | !7 |
2 | |
3 | sclass Entry { |
4 | S time, text; |
5 | SS mapping; |
6 | S wordsChanged; |
7 | } |
8 | |
9 | cmodule ELEMatchWithPastInput > DynObjectTable<Entry> { |
10 | start { doEvery(1.0, r grab); } |
11 | |
12 | void grab enter { |
13 | if (!ele_on()) ret; |
14 | S input = ele_currentInput(); |
15 | if (empty(input)) ret with clear(); |
16 | |
17 | int wordCount = countCodeTokens(javaTokWithBrackets_cached(input)); |
18 | Cl<virtual Entry> l = ele_pastInputs(); |
19 | setData(sortedByField_alphaNum wordsChanged(mapNonNulls(l, e -> { |
20 | SS mapping = gazelle_zip(getString text(e), input); |
21 | if (mapping == null) null; |
22 | ret setAll(quickImportToClass Entry(e), +mapping, |
23 | wordsChanged := l(mapping) + "/" + wordCount); |
24 | }))); |
25 | } |
26 | } |
Began life as a copy of #1026353
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026505 |
Snippet name: | ELE: Match current to past Input word-by-word [dev.] |
Eternal ID of this version: | #1026505/5 |
Text MD5: | 06564d4cc97b7fbac2cdb021c464b150 |
Transpilation MD5: | 872060e693335a919d156475cf09b115 |
Author: | stefan |
Category: | javax / electric logic engine |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-07 17:00:03 |
Source code size: | 714 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 225 / 410 |
Version history: | 4 change(s) |
Referenced in: | [show references] |