Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bible app #470

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Bible app #470

wants to merge 2 commits into from

Conversation

kj7rrv
Copy link

@kj7rrv kj7rrv commented Oct 8, 2023

This PR adds a Bible app.

Signed-off-by: Samuel Sloniker <sam@kj7rrv.com>
Signed-off-by: Samuel Sloniker <sam@kj7rrv.com>
@kj7rrv
Copy link
Author

kj7rrv commented Oct 8, 2023 via email

@drtonyr
Copy link
Contributor

drtonyr commented Oct 8, 2023

My first thought is to ask how much space this takes up. Have you run it on a watch and if so what else fits into the memory at the same time?
It's too early in development to really determine that. The text is stored in flash, and the app won't be able to store much in memory at one time. All this really is right now is a text retrieval library; there's no interface yet.

Sorry for deleting my reply, I didn't read your code fully and thought I'd cover up my ignorance!

More thoughts:

  • you might like to contribute to /flash - how should we lay out the directory structure? #458. It's an open issue as to how /flash is organised, but I don't see that we'll end up with a top level dir for each app
  • I see that you are looking to include an index with each file, great. You'll only have a few kbyte memory to play with, so you'll probably want to index down to lines as you can't display more than a few lines anyway.
  • you might want to remove _ALL_BOOKS and replace by a call to os.listdir (perhaps with memory freeing), that way you use less flash and you can add other books
  • commits need to be signed - https://wasp-os.readthedocs.io/en/latest/contributing.html?highlight=sign

@kj7rrv
Copy link
Author

kj7rrv commented Oct 9, 2023

@drtonyr Thank you! I'll take a look at the flash layout discussion.

I'd thought about indexing per line, but my current plan is to have the pager read out only as much as it can show per page.

I had tried os.listdir(), but was consistently getting MemoryErrors when using it, so I switched to a predefined list. The only reason I can think of to add more books would be to include the Deuterocanon/Apocrypha, and if anyone is interested in that, then those books could be added to the predefined list.

Regarding signing, all I'm seeing a requirement for is signing off, which I believe I did?

@drtonyr
Copy link
Contributor

drtonyr commented Oct 9, 2023

@drtonyr Thank you! I'll take a look at the flash layout discussion.

Thanks, I'll follow up there.

I'd thought about indexing per line, but my current plan is to have the pager read out only as much as it can show per page.

That sounds right. I couldn't tell how big the chunks were from the index values at the start, I guessed wrong.

I had tried os.listdir(), but was consistently getting MemoryErrors when using it, so I switched to a predefined list. The only reason I can think of to add more books would be to include the Deuterocanon/Apocrypha, and if anyone is interested in that, then those books could be added to the predefined list.

Fair enough. We have to balance code storage and RAM, it's not easy! Your directory structure had KJV in it so I guessed that you might be interested in adding other versions.

Regarding signing, all I'm seeing a requirement for is signing off, which I believe I did?

Indeed you did - I see Signed-off-by: Samuel Sloniker <sam@kj7rrv.com> which looks just right. However, at the top of this page I also see 'unverified' and when I click on it then it says 'This commit is not signed, but one or more authors requires that any commit attributed to them is signed.' . Looks like I got confused by the message, there's definitely another step to find here as I don't get that.

P.S. I've just remembered something else that wasn't obvious when I started - make check does what you think it should do, it's really useful if you haven't already found it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants