Using Scastie in classroom setting

What about a jupyter based solution?
I don’t know how jupiter works. I’ve used it a bit for python.
I know I can save the files in a DM system and retrieve the files, so that’s great.

Is it possible with jupyter technology that I run some sort of server on my laptop.
And then let each students somehow connect to his own jupyter session in his/her own web browser. My laptop is not subject to the over restrictive IT policy.

I seriously doubt there’d be a compute power issue, as their programming assignments won’t be terribly compute intensive. I think the web interface of github will allow them to upload their files to their own repo branch. If someone uploads to the wrong branch, it is easily fixable.

It does – if you’re logged in with GitHub, click on your username in the upper right and select “Snippets”. I think that gives you a complete list of your saved code, fully versioned.

(I think that full list is only available to the logged-in user themselves, but at least it allows them to not lose their work.)

Yes I thought the same thing, but I’m logged in and when I press Save, I don’t see any new items in the snippits. It doesn’t work for me, or at least I don’t know how to use it.

However, when I look more closely it is almost doing something useful.
It looks like it keeping something called updates. However when I
change the code in the editor and press Save, and then look at the snippits list.
I don’t see the recently saved code anywhere.
Also if I delete all the snippits by pressing the little trashcan icon, then press save,
all the old snippits come back, BUT NOT the one I just saved.

Just run it on your computer or deploy it somewhere on AWS.

just?


Hi Tomasz,
The flow for using gitpod seems much more complicated than in claimed on the gitpod website.
I’ve cloned the repo you recommended, created a new github repo with the same content.
tried to open gitpod by prefixing with the magic word in the browser URL line (which I always forget)
which brings up an editor (I suppose is VScode???)
But when I try to run my code, I get the error shown here which I don’t understand.
What it is trying to tell me?

Looks like maybe the build is not imported yet? We do the import in the prebuild step, so that it’s not needed when you open the workspace. That said, it should suggest to import it.

If you did import the build then the issues might be that Metals doesn’t detect a module for that file, which is needed for getting classpath etc. It might be a build definition mismatch.

I think a nicer beginner experience here would be to use a repo with Scalacli and single file in it. For Scalacli all we need to do to setup the project is to run scala-cli setup ide ., which can be done in the prebuild step (prebuild needs to be enabled manually).

I can take a look at the repository if it’s available and try to help out. We can coordinate scala or scalameta discord. I can also try and make a quick repo with Scalacli with totally minimal setup.

There is so much of this process I don’t understand. To me it sounds super complicated.

When VS code opens, how do I know if it is still building something behind the scenes and I need to wait, or whether it is ready for me to start typing? In IntelliJ, there’s a progress bar at the bottom rhs of the window. I don’t see any such clue in the VScode window.

If you can make the repo, I’m happy to give it a try.
Thanks for our help.

The process is usually:

  • Open the workspace
  • Run build import
  • Compile (does it automatically if you open a file)
  • Type your code

Everything else is done underneath.

It should show what is happening in the status bar at the bottom and compilations in the Metals tab. Let me see if I can whip something up.

2 Likes

you can chat me on discord if you like. Thanks.

@MasseGuillaume hi Guillaume, can you explain a bit more the use model here. I launched the docker command you recommended, and it gave me some output

    To access the notebook, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/nbserver-7-open.html
    Or copy and paste one of these URLs:
        http://44a41577daf1:8888/?token=4816510d72387a286ddd1b77658028be76f149f2de75ab6e
     or http://127.0.0.1:8888/?token=4816510d72387a286ddd1b77658028be76f149f2de75ab6e

However, when I paste either of those URLs into my web browser it DOES NOT start a Jupyter session, rather it shows me the following page: Even If I retype the same token, it returns me to the same page. Is this expected behavior, or did something go wrong?

Sounds like a bug. When I copy the last URL (http://127.0.0.1:8888/?token=dec6a73ee0250f91808c86c24d649c9b6e5c4005cb6338ec in my case) it opens the tree view: