John David

John David

1642834860

Pluto.jl: 🎈 Simple Reactive Notebooks for Julia

Writing a notebook is not just about writing the final document β€” Pluto empowers the experiments and discoveries that are essential to getting there.

Explore models and share results in a notebook that is

  • reactive - when changing a function or variable, Pluto automatically updates all affected cells.
  • lightweight - Pluto is written in pure Julia and is easy to install.
  • simple - no hidden workspace state; friendly UI.

reactivity screencap

🎈 Pluto demo inside your browser 🎈

Input

A Pluto notebook is made up of small blocks of Julia code (cells) and together they form a reactive notebook. When you change a variable, Pluto automatically re-runs the cells that refer to it. Cells can even be placed in arbitrary order - intelligent syntax analysis figures out the dependencies between them and takes care of execution.

Cells can contain arbitrary Julia code, and you can use external libraries. There are no code rewrites or wrappers, Pluto just looks at your code once before evaluation.

Output

Your notebooks are saved as pure Julia files (sample), which you can then import as if you had been programming in a regular editor all along. You can also export your notebook with cell outputs as attractive HTML and PDF documents. By reordering cells and hiding code, you have full control over how you tell your story.


 

Dynamic environment

Pluto offers an environment where changed code takes effect instantly and where deleted code leaves no trace. Unlike Jupyter or Matlab, there is no mutable workspace, but rather, an important guarantee:

At any instant, the program state is completely described by the code you see.

No hidden state, no hidden bugs.

Interactivity

Your programming environment becomes interactive by splitting your code into multiple cells! Changing one cell instantly shows effects on all other cells, giving you a fast and fun way to experiment with your model.

In the example below, changing the parameter A and running the first cell will directly re-evaluate the second cell and display the new plot.

plotting screencap 
 

Built-in package manager

Pluto uses syntax analysis to understand which packages are being used in a notebook, and it automatically manages a package environment for your notebook. You no longer need to install packages, you can directly import any registered package like Plots or DataFrames and use it.

To ensure reproducibility, the information to exactly reproduce the package environment is stored in your notebook file. When someone else opens your notebook with Pluto, the exact same package environment will be used, and packages will work on their computer, automatically! more info

package manager screencap 
 

HTML interaction

Lastly, here's _one more feature_: Pluto notebooks have a @bind macro to create a live bond between an HTML object and a Julia variable. Combined with reactivity, this is a very powerful tool!

@bind macro screencap 
 

You don't need to know HTML to use it! The PlutoUI package contains basic inputs like sliders and buttons. Pluto's interactivity is very easy to use, you will learn more from the sample notebooks inside Pluto!

But for those who want to dive deeper - you can use HTML, JavaScript and CSS to write your own widgets! Custom update events can be fired by dispatching a new CustomEvent("input"), making it compatible with the viewof operator of observablehq. Have a look at the JavaScript sample notebook inside Pluto!


 

Pluto for teaching

Pluto was developed alongside the free online course Introduction to Computational Thinking at MIT, with the goal of creating a programming environment that is powerful, helpful and interactive, without being too intimidating for students and teachers.

Are you interested in using Pluto for your class? Here are some presentations by people who are using it already: the MIT team, Gerhard Dorn, Daniel Molina, Henki W. Ashadi and Max KΓΆhler.

https://user-images.githubusercontent.com/6933510/134824521-7cefa38a-7102-4767-bee4-777caf30ba47.mp4

(video) Grant Sanderson (3Blue1Brown) using Pluto's interactivity to teach Computational Thinking at MIT!


 



 

Let's do it!

Ingredients

For one tasty notebook πŸ₯ž you will need:

  • Julia v1.5 or above
  • Linux, MacOS or Windows, Linux and MacOS will work best
  • Mozilla Firefox or Google Chrome

Installation

🎈 How to install Julia & Pluto (6 min) 🎈

Run Julia, enter ] to bring up Julia's package manager, and add the Pluto package:

julia> ]
(v1.7) pkg> add Pluto

Tip for new Julia users: To return to the julia> prompt from the Pkg REPL, either press backspace when the input line is empty or press Ctrl+C.

Usage

To run Pluto, run the following commands in your Julia REPL:

julia> import Pluto
julia> Pluto.run()

Pluto will open in your browser, and you can get started!

Questions and Help

Questions? Have a look at the FAQ


 

Interested in learning Julia, Pluto and applied mathematics? Join the open MIT course taught by Alan Edelman, David P. Sanders & Grant Sanderson (3blue1brown) (and a bit of me): Introduction to Computational Thinking, Spring 2021. 
 


 

Contribute to Pluto

Follow these instructions to start working on the package.

License

Pluto.jl is open source! Specifically, it is MIT Licensed. The included sample notebooks have a more permissive license: the Unlicense. This means that you can use sample notebook code however you like - you do not need to credit us!

Pluto.jl is built by gluing together open source software:

Your notebook files are yours, you do not need to credit us. Have fun!

From the authors

The Pluto project is an ambition to rethink what a programming environment should be. We believe that scientific computing can be a lot simpler and more accessible. If you feel the same, give Pluto a try! We would love to hear what you think. 😊

You can chat with us

feedback screencap

Questions? Have a look at the FAQ.

Original article source at https://github.com

#julia #potgramming #developer

What is GEEK

Buddha Community

Pluto.jl: 🎈 Simple Reactive Notebooks for Julia
John David

John David

1642834860

Pluto.jl: 🎈 Simple Reactive Notebooks for Julia

Writing a notebook is not just about writing the final document β€” Pluto empowers the experiments and discoveries that are essential to getting there.

Explore models and share results in a notebook that is

  • reactive - when changing a function or variable, Pluto automatically updates all affected cells.
  • lightweight - Pluto is written in pure Julia and is easy to install.
  • simple - no hidden workspace state; friendly UI.

reactivity screencap

🎈 Pluto demo inside your browser 🎈

Input

A Pluto notebook is made up of small blocks of Julia code (cells) and together they form a reactive notebook. When you change a variable, Pluto automatically re-runs the cells that refer to it. Cells can even be placed in arbitrary order - intelligent syntax analysis figures out the dependencies between them and takes care of execution.

Cells can contain arbitrary Julia code, and you can use external libraries. There are no code rewrites or wrappers, Pluto just looks at your code once before evaluation.

Output

Your notebooks are saved as pure Julia files (sample), which you can then import as if you had been programming in a regular editor all along. You can also export your notebook with cell outputs as attractive HTML and PDF documents. By reordering cells and hiding code, you have full control over how you tell your story.


 

Dynamic environment

Pluto offers an environment where changed code takes effect instantly and where deleted code leaves no trace. Unlike Jupyter or Matlab, there is no mutable workspace, but rather, an important guarantee:

At any instant, the program state is completely described by the code you see.

No hidden state, no hidden bugs.

Interactivity

Your programming environment becomes interactive by splitting your code into multiple cells! Changing one cell instantly shows effects on all other cells, giving you a fast and fun way to experiment with your model.

In the example below, changing the parameter A and running the first cell will directly re-evaluate the second cell and display the new plot.

plotting screencap 
 

Built-in package manager

Pluto uses syntax analysis to understand which packages are being used in a notebook, and it automatically manages a package environment for your notebook. You no longer need to install packages, you can directly import any registered package like Plots or DataFrames and use it.

To ensure reproducibility, the information to exactly reproduce the package environment is stored in your notebook file. When someone else opens your notebook with Pluto, the exact same package environment will be used, and packages will work on their computer, automatically! more info

package manager screencap 
 

HTML interaction

Lastly, here's _one more feature_: Pluto notebooks have a @bind macro to create a live bond between an HTML object and a Julia variable. Combined with reactivity, this is a very powerful tool!

@bind macro screencap 
 

You don't need to know HTML to use it! The PlutoUI package contains basic inputs like sliders and buttons. Pluto's interactivity is very easy to use, you will learn more from the sample notebooks inside Pluto!

But for those who want to dive deeper - you can use HTML, JavaScript and CSS to write your own widgets! Custom update events can be fired by dispatching a new CustomEvent("input"), making it compatible with the viewof operator of observablehq. Have a look at the JavaScript sample notebook inside Pluto!


 

Pluto for teaching

Pluto was developed alongside the free online course Introduction to Computational Thinking at MIT, with the goal of creating a programming environment that is powerful, helpful and interactive, without being too intimidating for students and teachers.

Are you interested in using Pluto for your class? Here are some presentations by people who are using it already: the MIT team, Gerhard Dorn, Daniel Molina, Henki W. Ashadi and Max KΓΆhler.

https://user-images.githubusercontent.com/6933510/134824521-7cefa38a-7102-4767-bee4-777caf30ba47.mp4

(video) Grant Sanderson (3Blue1Brown) using Pluto's interactivity to teach Computational Thinking at MIT!


 



 

Let's do it!

Ingredients

For one tasty notebook πŸ₯ž you will need:

  • Julia v1.5 or above
  • Linux, MacOS or Windows, Linux and MacOS will work best
  • Mozilla Firefox or Google Chrome

Installation

🎈 How to install Julia & Pluto (6 min) 🎈

Run Julia, enter ] to bring up Julia's package manager, and add the Pluto package:

julia> ]
(v1.7) pkg> add Pluto

Tip for new Julia users: To return to the julia> prompt from the Pkg REPL, either press backspace when the input line is empty or press Ctrl+C.

Usage

To run Pluto, run the following commands in your Julia REPL:

julia> import Pluto
julia> Pluto.run()

Pluto will open in your browser, and you can get started!

Questions and Help

Questions? Have a look at the FAQ


 

Interested in learning Julia, Pluto and applied mathematics? Join the open MIT course taught by Alan Edelman, David P. Sanders & Grant Sanderson (3blue1brown) (and a bit of me): Introduction to Computational Thinking, Spring 2021. 
 


 

Contribute to Pluto

Follow these instructions to start working on the package.

License

Pluto.jl is open source! Specifically, it is MIT Licensed. The included sample notebooks have a more permissive license: the Unlicense. This means that you can use sample notebook code however you like - you do not need to credit us!

Pluto.jl is built by gluing together open source software:

Your notebook files are yours, you do not need to credit us. Have fun!

From the authors

The Pluto project is an ambition to rethink what a programming environment should be. We believe that scientific computing can be a lot simpler and more accessible. If you feel the same, give Pluto a try! We would love to hear what you think. 😊

You can chat with us

feedback screencap

Questions? Have a look at the FAQ.

Original article source at https://github.com

#julia #potgramming #developer

Simple Reactive Notebooks for Julia Programming: fonsp / Pluto

PlutoCon 2021 β€” April 8th-9th

To celebrate Pluto's 1 year anniversary, we are hosting a two day mini conference about.... Pluto! It will be a place to share your fun notebooks and to learn techniques from other Pluto users and from Pluto's designers

 

Writing a notebook is not just about writing the final document β€” Pluto empowers the experiments and discoveries that are essential to getting there.

Explore models and share results in a notebook that is

  • reactive - when changing a function or variable, Pluto automatically updates all affected cells.
  • lightweight - Pluto is written in pure Julia and is easy to install.
  • simple - no hidden workspace state; friendly UI.

reactivity screencap

Input

A Pluto notebook is made up of small blocks of Julia code (cells) and together they form a reactive notebook. When you change a variable, Pluto automatically re-runs the cells that refer to it. Cells can even be placed in arbitrary order - intelligent syntax analysis figures out the dependencies between them and takes care of execution.

Cells can contain arbitrary Julia code, and you can use external libraries. There are no code rewrites or wrappers, Pluto just looks at your code once before evaluation.

Output

Your notebooks are saved as pure Julia files (sample), which you can then import as if you had been programming in a regular editor all along. You can also export your notebook with cell outputs as attractive HTML and PDF documents. By reordering cells and hiding code, you have full control over how you tell your story.


 

Dynamic environment

Pluto offers an environment where changed code takes effect instantly and where deleted code leaves no trace. Unlike Jupyter or Matlab, there is no mutable workspace, but rather, an important guarantee:

At any instant, the program state is completely described by the code you see.

No hidden state, no hidden bugs.

Interactivity

Your programming environment becomes interactive by splitting your code into multiple cells! Changing one cell instantly shows effects on all other cells, giving you a fast and fun way to experiment with your model.

In the example below, changing the parameter A and running the first cell will directly re-evaluate the second cell and display the new plot.

plotting screencap
 

HTML interaction

Lastly, here's _one more feature_: Pluto notebooks have a @bind macro to create a live bond between an HTML object and a Julia variable. Combined with reactivity, this is a very powerful tool!

@bind macro screencap

notebook from vdplasthijs/julia_sir


 

You don't need to know HTML to use it! The PlutoUI package contains basic inputs like sliders and buttons.

But for those who want to dive deeper - you can use HTML, JavaScript and CSS to write your own widgets! Custom update events can be fired by dispatching a new CustomEvent("input"), making it compatible with the viewof operator of observablehq
 

Let's do it!

Ingredients

For one tasty notebook πŸ₯ž you will need:

  • Julia v1.5 or above
  • Linux, MacOS or Windows, Linux and MacOS will work best
  • Mozilla Firefox or Google Chrome, be sure to get the latest version

Installation

🎈 How to install Julia & Pluto (6 min) 🎈

Run Julia and add the package:

julia> ]
(v1.6) pkg> add Pluto

Using the package manager for the first time after installing Julia can take up to 15 minutes - hang in there!

To run the notebook server:

julia> import Pluto
julia> Pluto.run()

Pluto will open in your browser, and you can get started!

Download Details:

Author: fonsp
The Demo/Documentation: View The Demo/Documentation
Download Link: Download The Source Code
Official Website: https://github.com/fonsp/Pluto.jl
License: MIT

#julia #programming

 

How to Install Pluto Notebooks and How to use PlutoUI in Julia Programming Language.

In this tutorial we will be seeing how to install Pluto Notebooks and how to use PlutoUI widget in Julia Programming Language.

Source Code: https://blog.jcharistech.com/2020/11/17/pluto-jl-plutoui-tutorial/

Subscribe : https://www.youtube.com/channel/UC2wMHF4HBkTMGLsvZAIWzRg

#julia #plutoui #pluto #programming

Fannie  Zemlak

Fannie Zemlak

1595901766

Building Reactive Scalable Systems

scalability word map

Building a Reactive System is all about the balance between consistency and availability and the consequences of picking one over the other. This article mainly focuses on consistency and availability and how they impact the scalability of a system.

What are Scalability, Consistency, and Availability?

A system is considered scalable if it can meet the increase in demand while remaining responsive.

A system is considered consistent if all the nodes show the same data at the same time.

A system is considered available if it remains responsive despite any failures.

How Does the Scalability of a System Differ From the Performance of the System?

Scalability and performance are related but different concepts and we need to understand what the difference is.

Scalability is the number of requests a system can handle at a time, i.e. load. It’s about optimizing the ability to handle the load, which means improving how many requests a system can handle at a time. Performance on the other hand is the time system takes to complete a single request, i.e. latency. It’s about optimizing the response time, which means improving how quickly a system can handle a single request.

Performance has a limit on reducing the response time, and we will eventually reach that limit. Whereas, scalability has no theoretical limit. We may be restricted by the implementation, but in a perfectly scalable system, we could scale forever.

So when we build Reactive Micro-services we tend to focus on improving scalability than improving performance.

How Can We Measure Scalability and Performance of a System?

Measurement like requests-per-second measures both. This makes it a valuable metric because we can use it to see whether we have improved our scalability or our performance. But it also means that it is somewhat restrictive in the sense that if it improves we can’t tell which one changed. So if we want to know where that improvement came from then we have to track scalability and performance individually.

How Can We Explain Consistency in Distributed Systems?

Distributed systems are systems that are separated by space. This means the system could be deployed across multiple data centers or within the same data center, or just deployed to different hardware or the same hardware.

Even if it’s deployed to the same hardware, a distributed system is one where information has to be transferred between different parts of that system, and when that information is transferred it’s crossing some sort of space. It could be going over a local network, or it could be writing to a disk, or it could be writing to a database.

Information cannot be transferred instantaneously, it takes some time. Granted that time could be very small but there is an amount of time that elapses during the transfer of information. Within that time duration when the transfer of the information takes place, the state of the original sender may change.

The key here is to recognize that when we are dealing with a distributed system, we are always dealing with stale data. The reality_ is eventually consistent._

What Is Eventual Consistency?

When a system stops receiving updates at least for some time, we can guarantee that all parts of the system will eventually converge on the same state. Thus in this way, we can reach that level of consistency.

Common source control tools (Git, Subversion, etc) operate on an eventually consistent model. They rely on a later merge operation to bring things back into alignment. That’s how modern source control tools achieve consistency and it’s all an eventually consistent system.

Traditional monolithic architectures are usually based around strong consistency they use a strongly consistent database like a SQL database.

What Is Strong Consistency?

When all members of a system agree on the state, before it becomes available, then we reach the level of strong consistency.

We can achieve strong consistency by introducing mechanisms like locks. Distributed system problem occurs when we have multiple things which are responsible for the same piece of data. As long as only one thing is responsible for that data, as long as we only have one instance of the lock, it’s not a distributed system problem anymore. Thus in this way, we can resolve the distributed system problem by using a non distributed resource(lock).

But when we introduce a lock, it introduces overhead in the form of contention. That overhead has consequences to our ability to be elastic, to be resilient, and it has other consequences as well.

#scalability #reactive architecture #cap theorem #reactive systems #reactive microservices #reactive

Brain  Crist

Brain Crist

1600095600

Diving Into Reactive Microservices

What are Monoliths?

To start explaining the microservices it’s useful to compare it to the monolithic application. An application is said to be a monolith when it is deployed as a single unit. Monoliths have a single shared database. They communicate with synchronous method calls where you send a message and expect a response immediately.

What are the cons of Monoliths?

  • Monoliths are limited by the maximum size of a single physical machine. As the monolith grows, it acquires more and more system resources.
  • They scale as far as the database allows because they often rely on a relational database which probably runs only a single instance in order to maintain consistency.

#reactive-systems #reactive-microservice #reactive-programming #reactive-architecture