Giter VIP home page Giter VIP logo

loda-rust's People

Contributors

ckrausesap avatar neoneye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

loda-rust's Issues

Errors while running loda-rust pattern

[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(17)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015166.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(17)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015270.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015345.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015346.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015347.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015349.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(26)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015354.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(26)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015359.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015360.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(26)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015363.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(23)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015376.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(23)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015377.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015388.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015390.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015391.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(24)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015407.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015408.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(21)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015409.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015423.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015424.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(24)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015427.asm"
[2023-08-14T23:14:01Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(18)) path: "C:/users/frolo/loda/programs/oeis\\015\\A015658.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(21)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022194.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(21)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022195.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(21)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022201.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022202.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022203.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(23)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022207.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022208.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022209.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022210.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022215.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(23)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022216.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(21)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022217.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022218.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(23)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022225.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(23)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022226.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(21)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022228.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022236.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022237.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(23)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022238.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(24)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022247.asm"
[2023-08-14T23:14:02Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(25)) path: "C:/users/frolo/loda/programs/oeis\\022\\A022259.asm"
[2023-08-14T23:14:04Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(26)) path: "C:/users/frolo/loda/programs/oeis\\037\\A037017.asm"
[2023-08-14T23:14:05Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(6)) path: "C:/users/frolo/loda/programs/oeis\\043\\A043499.asm"
[2023-08-14T23:14:07Z ERROR loda_rust::subcommand_pattern] analyze_program. Skipping a program that is too long. path: "C:/users/frolo/loda/programs/oeis\\058\\A058319.asm"
[2023-08-14T23:14:08Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(20)) path: "C:/users/frolo/loda/programs/oeis\\069\\A069858.asm"
[2023-08-14T23:14:08Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(19)) path: "C:/users/frolo/loda/programs/oeis\\070\\A070022.asm"
[2023-08-14T23:14:08Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(19)) path: "C:/users/frolo/loda/programs/oeis\\070\\A070023.asm"
[2023-08-14T23:14:09Z ERROR loda_rust::subcommand_pattern] analyze_program. Skipping a program that is too long. path: "C:/users/frolo/loda/programs/oeis\\081\\A081841.asm"
[2023-08-14T23:14:10Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(18)) path: "C:/users/frolo/loda/programs/oeis\\086\\A086761.asm"
[2023-08-14T23:14:11Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(14)) path: "C:/users/frolo/loda/programs/oeis\\095\\A095071.asm"
[2023-08-14T23:14:11Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(10)) path: "C:/users/frolo/loda/programs/oeis\\095\\A095199.asm"
[2023-08-14T23:14:11Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(13)) path: "C:/users/frolo/loda/programs/oeis\\095\\A095286.asm"
[2023-08-14T23:14:11Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(12)) path: "C:/users/frolo/loda/programs/oeis\\095\\A095315.asm"
[2023-08-14T23:14:11Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(16)) path: "C:/users/frolo/loda/programs/oeis\\095\\A095318.asm"
[2023-08-14T23:14:11Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(12)) path: "C:/users/frolo/loda/programs/oeis\\095\\A095319.asm"
[2023-08-14T23:14:11Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(16)) path: "C:/users/frolo/loda/programs/oeis\\095\\A095322.asm"
[2023-08-14T23:14:11Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(12)) path: "C:/users/frolo/loda/programs/oeis\\095\\A095323.asm"
[2023-08-14T23:14:12Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(10)) path: "C:/users/frolo/loda/programs/oeis\\111\\A111690.asm"
[2023-08-14T23:14:13Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(20)) path: "C:/users/frolo/loda/programs/oeis\\113\\A113851.asm"
[2023-08-14T23:14:13Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(15)) path: "C:/users/frolo/loda/programs/oeis\\115\\A115517.asm"
[2023-08-14T23:14:13Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(9)) path: "C:/users/frolo/loda/programs/oeis\\121\\A121977.asm"
[2023-08-14T23:14:15Z ERROR loda_rust::subcommand_pattern] analyze_program. Skipping a program that is too long. path: "C:/users/frolo/loda/programs/oeis\\138\\A138298.asm"
[2023-08-14T23:14:15Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(19)) path: "C:/users/frolo/loda/programs/oeis\\140\\A140922.asm"
[2023-08-14T23:14:15Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(19)) path: "C:/users/frolo/loda/programs/oeis\\140\\A140930.asm"
[2023-08-14T23:14:15Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(17)) path: "C:/users/frolo/loda/programs/oeis\\140\\A140936.asm"
[2023-08-14T23:14:15Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(19)) path: "C:/users/frolo/loda/programs/oeis\\140\\A140937.asm"
[2023-08-14T23:14:15Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(19)) path: "C:/users/frolo/loda/programs/oeis\\140\\A140938.asm"
[2023-08-14T23:14:15Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(19)) path: "C:/users/frolo/loda/programs/oeis\\140\\A140939.asm"
[2023-08-14T23:14:17Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(12)) path: "C:/users/frolo/loda/programs/oeis\\157\\A157983.asm"
[2023-08-14T23:14:17Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(12)) path: "C:/users/frolo/loda/programs/oeis\\157\\A157984.asm"
[2023-08-14T23:14:20Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(20)) path: "C:/users/frolo/loda/programs/oeis\\180\\A180972.asm"
[2023-08-14T23:14:24Z ERROR loda_rust::subcommand_pattern] analyze_program. Skipping a program that is too long. path: "C:/users/frolo/loda/programs/oeis\\229\\A229036.asm"
[2023-08-14T23:14:25Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(9)) path: "C:/users/frolo/loda/programs/oeis\\231\\A231562.asm"
[2023-08-14T23:14:25Z ERROR loda_rust::subcommand_pattern] analyze_program. Skipping a program that is too long. path: "C:/users/frolo/loda/programs/oeis\\241\\A241468.asm"
[2023-08-14T23:14:26Z ERROR loda_rust::subcommand_pattern] analyze_program. Skipping a program that is too long. path: "C:/users/frolo/loda/programs/oeis\\245\\A245425.asm"
[2023-08-14T23:14:26Z ERROR loda_rust::subcommand_pattern] analyze_program. Skipping a program that is too long. path: "C:/users/frolo/loda/programs/oeis\\245\\A245430.asm"
[2023-08-14T23:14:31Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(6)) path: "C:/users/frolo/loda/programs/oeis\\281\\A281907.asm"
[2023-08-14T23:14:34Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(20)) path: "C:/users/frolo/loda/programs/oeis\\304\\A304373.asm"
[2023-08-14T23:14:34Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(11)) path: "C:/users/frolo/loda/programs/oeis\\306\\A306999.asm"
[2023-08-14T23:14:35Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(11)) path: "C:/users/frolo/loda/programs/oeis\\316\\A316991.asm"
[2023-08-14T23:14:35Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(22)) path: "C:/users/frolo/loda/programs/oeis\\317\\A317543.asm"
[2023-08-14T23:14:37Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(7)) path: "C:/users/frolo/loda/programs/oeis\\336\\A336776.asm"
[2023-08-14T23:14:37Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(7)) path: "C:/users/frolo/loda/programs/oeis\\336\\A336780.asm"
[2023-08-14T23:14:37Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(7)) path: "C:/users/frolo/loda/programs/oeis\\337\\A337068.asm"
[2023-08-14T23:14:39Z ERROR loda_rust::subcommand_pattern] load program, error: ParseParameters(UnrecognizedParameterValue(10)) path: "C:/users/frolo/loda/programs/oeis\\362\\A362010.asm"

Postmine - error messages printed related to `loda_cpp`

Kotenok2000 reports that:

Sometimes i get these errors

2022-12-04T12:25:19Z ERROR loda_rust::lodacpp::lodacpp_eval_steps_execute] Expected exit_code: 0, but got exit_code: Some(-1073740791), loda_program_path: "/homedir/subdir/oeis/190/A190772.asm"
[2022-12-04T12:25:19Z ERROR loda_rust::lodacpp::lodacpp_eval_steps_execute] stdout: ""
[2022-12-04T12:25:19Z ERROR loda_rust::lodacpp::lodacpp_eval_steps_execute] stderr: ""

Solution

As of 4-dec-2022, the errors are printed to stdout, causing noise in the console.

Don't print it to stdout, but instead append to the postmine-yyyymmdd/32-log.txt, that there was a problem evaluating the program.

Tooltip for each term showing its index

Often I want to know the index of a term. The current way I'm doing it, is to copy paste a list of terms into a text editor. Replace all the commas with newline, and then look at the line numbers. A tooltip would be a great help.

Click on A123456 and jump to OEIS

In the editor area. Hover over an OEIS id, and it becomes a hyperlink, that jumps to OEIS.

In the following code, if you hover over A256967, then it links to its corresponding OEIS page.

And if you hover over A256966, then it links to its corresponding OEIS page.

And if you hover over A000045, then it links to its corresponding OEIS page.

; A256967: a(n) = A256966(n) + 1.
; 1,2,4,7,10,14,18,22,27,32,37,42,47,53,59,65,71,77,83,89,95,102,109,116,123,130,137,144,151,158,165,172,179,186,194,202,210,218,226,234,242,250,258,266,274,282,290,298,306,314,322,330,338,346,354,363,372,381,390,399,408,417,426,435,444,453,462,471,480,489,498,507,516,525,534,543,552,561,570,579,588,597,606,615,624,633,642,651,660,670,680,690,700,710,720,730,740,750,760,770

lpb $0
  sub $0,1
  mov $2,$0
  max $2,0
  seq $2,72649 ; n occurs Fibonacci(n) times (cf. A000045).
  add $1,$2
lpe
add $1,1
mov $0,$1

Show error messages about compiling

Expected

Be able to see what is wrong.

If I type in the wrong name of an instruction. Example xmov, where I wanted to type in mov
Print some kind of error message referring to this line.

Actual

As of 30 Dec 2021, the error messages gets printed to the console. There is no error message shown in the UI.

The kinds of errors are:

  • Syntax error
  • Missing dependency

Sporadic crash in LRU - unwrap on None - pointer being freed was not allocated

The crash happens sometimes twice a day, sometimes the miner can run for 7 days without a crash.

Console output

thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', /Users/neoneye/.cargo/registry/src/github.com-1ecc6299db9ec823/lru-0.8.1/src/lib.rs:377:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
loda-rust(96264,0x16e0cb000) malloc: *** error for object 0x60003e5fbfe0: pointer being freed was not allocated
loda-rust(96264,0x16e0cb000) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      loda-rust mine --metrics

The crash happens in the lru package, in the function replace_or_create_node() in the line:

let mut old_node = self.map.remove(&old_key).unwrap();

The lru has a comment: "if the cache is full, remove the last entry so we can use it for the new key".

Hypothesis A, when the cache is full, and the LRU begin recycling the old elements, that may be where the crash happens.

Hypothesis B, too big a memory footprint, so alloc fails.

Hypothesis C, multi threading.

Solution A, experiment with other LRU packages.

Solution B, fix the code in LRU package.

Improve performance of simple loops

Loda-cpp has improved performance of simple loops using incremental evaluation (IE). It uses static code analysis to decide whether IE can be applied for a given program.

Loda-rust should do the same.

Several programs crashed loda.exe when evaluated by loda-cpp.

It generates lots of crash dumps 0.5 mb each.

They all have uncommented commentaries like

; template 283770
; mutate: CallMostPopularProgram
; keep: maybe a new program. cannot compute program 175088 with the same initial terms. error: run_result error in program.run

Caused by:
Step count exceeded limit, using way too many cpu cycles

; reject-reason: Couldn't eval program with loda-cpp, Expected exit_code: 0, but got exit_code: Some(-1073740791), loda_program_path: "C:\Users\frolo\.loda-rust\mine-event\20230712-130406-38216.asm"
; stdout:
; stderr:
;
; Caused by:
; Non-zero exit code
mine-event.zip

Indirect memory access

I have not yet implemented the dollar dollar syntax. Example mov $0, $$0.

As of 7 sep 2021, there are around 50 loda programs that use indirect memory access.

Submit button

Not sure if there would be users for it, but it would be nice to have a "Submit" button in the editor to submit the program to the API server. The user could optionally enter his/her name. You can send the program via POST request to http://api.loda-lang.org/miner/v1/programs/. If the user enters a name, just add a comment to the program:
; Submitted by XXX.

Mobile friendly editor

The other day at the bus stop, there was a person studying machine learning, and I wanted to show a demo of LODA. I only had my mobile device and I think I did a terrible demo of LODA.

What issues are there on a small screen.

  • The chart is barely visible.
  • The editor is barely visible.
  • The header is to high.
  • The footer is to high.
  • The buttons take up too much screen estate: Auto, Linear, Log, 10, 100, 1000.

log plot with negative values

Expected

Show both positive and negative values using logarithmic scale on the y-axis.

Actual

ChartJS supports logarithmic scale for values that are 1 or greater. And it works fine.

However as of 30 Dec 2021, ChartJS doesn't support logarithmic scale for negative values.
ChartJS doesn't show a point if there is a problem with it.

I made a crappy workaround where I clamp the problematic y-value to 1 and color the point red.

Solution A

Find another javascript chart library that can do this.

Solution B

Modify ChartJS with support for different scaling options.

Launch miner - runs `miner_sync_simple.rb` - deal with no internet connection

The script cannot deal with missing internet. It fails like this:

PROMPT> loda-rust mine

██╗      ██████╗ ██████╗  █████╗       ██████╗ ██╗   ██╗███████╗████████╗
██║     ██╔═══██╗██╔══██╗██╔══██╗      ██╔══██╗██║   ██║██╔════╝╚══██╔══╝
██║     ██║   ██║██║  ██║███████║█████╗██████╔╝██║   ██║███████╗   ██║   
██║     ██║   ██║██║  ██║██╔══██║╚════╝██╔══██╗██║   ██║╚════██║   ██║   
███████╗╚██████╔╝██████╔╝██║  ██║      ██║  ██║╚██████╔╝███████║   ██║   
╚══════╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝      ╚═╝  ╚═╝ ╚═════╝ ╚══════╝   ╚═╝
LODA-RUST version: 2022.12.4, build: RELEASE

metrics mode: NoMetricsServer
number of workers: 4
Press CTRL-C to stop the miner.


analytics_worker: child 19b0ec47-fa24-4e30-8062-301cd125fc32, received broadcast message: PerformSyncAndAnalytics
thread 'tokio-runtime-worker' panicked at 'Problem executing MinerSyncExecute: MinerSyncExecute with failing error code. executable_path: "/home/euclid/git/loda-rust/script/miner_sync_simple.rb" output: "error: no commit_id found in command output\noutput from command: git ls-remote origin HEAD"', loda-rust-cli/src/mine/analytics_worker.rs:67:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PROMPT> curl: (6) Could not resolve host: api.loda-lang.org

Solution

In miner_sync_simple.rb - Check for internet connectivity, before doing git commands.

In the Rust code - stop the executable when the miner_sync_simple.rb returns with an error.

Retry upload - in case there is a connection issue

Problem

This problem arises when there is a temporary network outage or the server is down for maintenance.
Then mined programs doesn't get uploaded, and is unfortunately lost.

Kotenok2000 reported these errors during upload

[2022-11-29T11:19:25Z ERROR loda_rust::mine::upload_worker] upload_worker: failed program upload of A117673, error: reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.loda-lang.org")), port: None, path: "/miner/v1/programs", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Os { code: 11001, kind: Uncategorized, message: "This host is unknown" })) }
miner discovered a "faster" program. A029371
[2022-11-29T11:19:25Z ERROR loda_rust::mine::upload_worker] upload_worker: failed program upload of A029371, error: reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.loda-lang.org")), port: None, path: "/miner/v1/programs", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Os { code: 11001, kind: Uncategorized, message: "This host is unknown" })) }

Solution

Kotenok2000 suggests that the uploader "retries" a few times.

Full screen graph mode

  • Zoom in using mouse wheel, pinch to zoom.
  • Adjust range.
  • Easier to tap on points and see the corresponding thumbnail.

Check correctness inside the editor

Excepted

Stefano Spezia: Check correctness from inside the editor.

Jamie Morken: When an A number has no Loda program, maybe the oeis bfile could be downloaded by the web editor to plot terms from there (since the tooltips are useful in general too).

Simon Strandgaard: Compare with b-file data. When developing a program, it would be nice to be able to compare the terms
with the actual b-file. Being able to see the computed terms vs. the expected terms.

Actual

It's possible to use loda check from command line.

However as of 30 dec 2021, there is no way to check correctness from inside the editor.

Solution

Port the loda check command to the editor.

Do some experimental cross over between the loda check and a plotting the bfile terms.

Perform analytics with configurable interval - eg. 1 hour

As of 2-nov-2022, there is a hardcoded CRONJOB_SYNC_INTERVAL_SECONDS that triggers miner_sync_simple.rb followed by analytics.
There is no separate interval that triggers just analytics.

Kotenok2000 wants a configurable interval for only analytics.

Analytics generates histograms, populates bloomfilters.
Here newly discovered programs affects the stats.
This is time consuming, so it's not something we want to happen for every discovered program.

Doing a miner_sync_simple.rs causes network traffic, and invalidates the analytics. This is time consuming.

Extend the config.toml with 2 parameters: miner_sync_interval=24h and analytics_interval=1h.

This can help finding a sweet spot.

Syntax coloring

Currently only the comments have a different coloring.

Screen Shot 2021-08-10 at 17 15 39

It would be nice to color the instructions, the parameter types, the parameter values.

Open url with source code that is urlencoded

Currently the url can only contain the sequence id, https://neoneye.github.io/lodalab/?id=1113

It would be nice to have an url parameter ala code=mul%20$0,2 that opens the editor with that program loaded into the editor.

With urlencoding, it's possible to make a QR code containing an entire loda programs.

Miner running in the browser

DONE: The miner can fetch existing programs on demand.

Run wasm code in a separate worker, without blocking the ui.

The server has a bloom filter with all the pending oeis sequences that is yet to be mined. This is how the miner already works.

When there is a candidate program, then it would have to be uploaded to a server.

The server will have to validate incoming candidate programs. How precise are they.
If they are good, then add the program to the repository.

Logarithmic y-axis in plot

Currently (25 dec 2021), the y-axis is linear. However many sequences grows exponential, so their beauty cannot be seen.

With a logarithmic y-axis, the exponential sequences can be visualized.

Question: What does the UI look like in other charts, that deal with similar data?

Question: Should this be a toggle button between linear and logarithmic?

Question: Should there be an auto mode, so the best visualization is automatically picked?

Question: Should the toggle button, be placed inside the Advanced mode UI?

Variable number of terms

Currently only 10 terms can be computed.

Being able to see the terms show up live as they are computed, that would be nice. However I haven't yet found a way to do this using wasm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.