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

Pasting code freezes emulator for several minutes #329

Open
perryn opened this issue Sep 18, 2021 · 4 comments
Open

Pasting code freezes emulator for several minutes #329

perryn opened this issue Sep 18, 2021 · 4 comments

Comments

@perryn
Copy link

perryn commented Sep 18, 2021

Thanks so much for this emulator. My 8yo son and I have been having SO much fun this morning re-living the coding experience of my youth at https://bbc.godbolt.org/!

We have been typing in code from a magazine, but at one point we refreshed the tab and lost our work. So I decided to keep the code in a text file and cut and paste it into the emulator via the text box on the top right.

However we found that every time we did so it seems to freeze the emulator for several minutes, before it becomes responsive again.

(My son wonders if this is on purpose to encourage us to type in code like in the good old days!)

We are running chrome 91.0.4472.114 on OSX 10.15.7 if that is of any relevance

Cheers!

@mattgodbolt
Copy link
Owner

Hi!

I'm so excited that you're sharing your experiences with your son! Mine have only shown a passing interest :)

The paste box is a bit of a hack and I'm not too surprised it hangs for a while (minutes...though...is not ideal). I'll definitely look in to this at some point.

However! There may be a better solution. There's a sibling project to jsbeeb called Owlet and you can try it out at : https://bbcmic.ro/

It's essentially a text editor with a built-in jsbeeb emulator. You can type your code directly there (or paste) then hit "Run" to see it running.

The emulator doesn't have keyboard input BUT once your program has been typed in you can click the "jsbeeb" button at the bottom of the emulator screen to open your program in a fully-fledged jsbeeb session.

This should work for up to moderately-sized programs - if you look at the URL after you've clicked "jsbeeb" you'll see we encode the whole program as part of the URL. This means you can save the URL to come back to it (though you can't easily put it back into Owlet).

Another choice is to try and get the "cloud save" to work where a disc image stored in the cloud is used: https://github.com/mattgodbolt/jsbeeb/wiki/Cloud-saves-HOWTO - this isn't that ideal but at least gives a more authentic feeling (you'd actually save your code on a virtual floppy disc on Google Drive).

I hope that gives you other options too!

Cheers, Matt

@ojwb
Copy link
Contributor

ojwb commented Oct 8, 2021

The emulator doesn't have keyboard input

It didn't originally, but has since January - just click on owlet's emulator pane to give it focus.

@mattgodbolt
Copy link
Owner

hi @perryn - does Owlet scratch the itch for you and your son?

@perryn
Copy link
Author

perryn commented Oct 1, 2024

Hi @mattgodbolt my Son's interest was short lived :)

I'll endeavour to get him to take a look at some point

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

No branches or pull requests

3 participants