calebjosue

calebjosue

Is there a way to target the output of a given cell only for the user that triggered the cell evaluation?

Hello there all,

Today I was taking a look at LiveBook and it is an incredible tool for collaborative scenarios. My question is related to the possibility to only show the output for a given cell to the user that triggered the evaluation.

Say you have the following LiveBook containing a non-exhaustive test for one of the proposed Extudes (Études for Elixir)

If a given user X1 enters a solution for the exercise and hit the evaluation button in the cell 2 to run the test case, then all the other users will see the output. Is there a way to show results only for user X1?

I tried deploying the above LiveBook as an app, obtaining the same results.

Do you think disabling LiveBook editing (I am yet to find how to achieve it) for the users will prevent them to enter code in the cells?

Thanks.


Caleb

Marked As Solved

jonatanklosko

jonatanklosko

Creator of Livebook

Hey @calebjosue : )

For tutorial-like usage, where the user is supposed to edit the actual code, it is best if each user works on the notebook in a separate session. The session is collaborative, which is exactly why editing code by one user is visible to the other user, as are outputs.

Livebook is easy to install via the Desktop app, so you could provide learning material as a repository of notebooks. Then each user would have their own Livebook (however they prefer to install it) and follow the notebooks on their own.

Sidenote: there are ways to show different results to different users using Kino forms and frames, but this is primarily useful for building Livebook apps. When the code itself changes, then it is always shared.

Where Next?

Popular in Questions Top

chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lists...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127089 1222
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement