Uses 911K of libraries. Click here for Pure Java version (6169L/30K).
1 | !7 |
2 | |
3 | cmodule PhilosophyBot2 extends DynPrintLog { |
4 | transient int i; |
5 | |
6 | transient S program = [[ |
7 | count |
8 | |
9 | count => proc { |
10 | while (i < 100): |
11 | inc i |
12 | } |
13 | ]]; |
14 | |
15 | transient new PhilosophyBot1 bot; |
16 | |
17 | start-thread { |
18 | bot.program = program; |
19 | bot.addNativePredicate("i < 100", |
20 | () -> i < 100); |
21 | bot.addNativePredicate("inc i", |
22 | () -> { |
23 | ++i; |
24 | print("Incremented i to " + i); |
25 | true; |
26 | }); |
27 | bot.run(); |
28 | } |
29 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025600 |
Snippet name: | Counter in Philosophy Engine [OK] |
Eternal ID of this version: | #1025600/6 |
Text MD5: | 2a14e4989c07a337e226b29f5f301cdf |
Transpilation MD5: | cc816d7cdf8aa16eda5d74a1024ad5bc |
Author: | stefan |
Category: | |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-07 13:47:43 |
Source code size: | 469 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 213 / 850 |
Version history: | 5 change(s) |
Referenced in: | [show references] |