Code Monkey home page Code Monkey logo

fsrs-browser's People

Contributors

alexerrant avatar ishiko732 avatar l-m-sherlock avatar

Stargazers

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

Watchers

 avatar  avatar

fsrs-browser's Issues

[BUG] The hard-coded timezone in anki_to_fsrs

https://github.com/open-spaced-repetition/fsrs-rs/blob/16bdf86c5053038dd6fc9bf939f395b889be9fe2/src/convertor_tests.rs#L178-L190

@AlexErrant, this function is used by fsrs-browser. It causes some problems for people in other timezone.

let parameters = fsrs.computeParametersAnki(cids, eases, ids, types, progress)

fsrs-browser/src/lib.rs

Lines 32 to 44 in 58f27ba

#[wasm_bindgen(js_name = computeParametersAnki)]
pub fn compute_parameters_anki(
&mut self,
cids: &[i64],
eases: &[u8],
ids: &[i64],
types: &[u8],
progress: Option<Progress>,
) -> Vec<f32> {
let revlog_entries = to_revlog_entry(cids, eases, ids, types);
let items = anki_to_fsrs(revlog_entries);
self.train_and_set_parameters(items, progress)
}

[BUG?]Uncaught Error: null pointer passed to rust

After completing the training, I used progress.free(), but I encountered the error Uncaught Error: null pointer passed to rust. Even when I used setTimeout(() => progress.free(), 1000), the error still occurred.

image image

Does this mean that I don't need to free the progress ?

Is it possible to support progress bar for the training process?

The FSRS-rs provided progress in compute_parameters:

https://github.com/open-spaced-repetition/fsrs-rs/blob/5cd2d8d965a4f20cb9bd5dc6395aa82c7445ffe8/src/training.rs#L202

Anki uses it to display progress of training:

https://github.com/ankitects/anki/blob/15506328e95ed853364759099123c94c7567d214/rslib/src/scheduler/fsrs/weights.rs#L78-L99

But I don't know whether it is possible to export the progress to js.

@asukaminato0721, @AlexErrant, @ishiko732, what do you think of it?

hanging `Installing wasm-bindgen...`

git clone https://github.com/open-spaced-repetition/fsrs-browser
cd fsrs-browser
git submodule update --init --recursive
./prod.sh
hanging Installing wasm-bindgen...
image

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.