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

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
makeitrein
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project. Baby step #1 is extracting the number ...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New

We're in Beta

About us Mission Statement