Loading…
Attending this event?
Back To Schedule
Friday, June 26 • 11:00am - 11:50am
Threaded Text Console UI in Raku

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

By the time this description is being written the new project named Vikna is still in deep development status. Though most of the critical components are already in place and more to come in the next months. The project is an experiment in creating a UI toolkit written in Raku from ground up. If succeed it will be the first complete terminal UI toolkit for Raku providing easy way for developers to equip their applications with interactive communication to a user.

Internally, Vikna designed to utilize the most advanced Raku language features with focus on being as much parallelized as possible. Yet, life teaches us the importance of the balance and that too much of parallelization might fight back and harm in many possible ways. But when used properly it pays with performance and extra freedom for user code. Say, some code prints diagnostics info while working. Usually one uses print, or say to send it to the console. But what if the code is multithreaded or otherwise asynchronous? How to sort out the mess of interleaving lines coming from different threads? With Vikna one could have one widget per each thread and use it like:

$widget.say: "Hello world!";
And that’s all!

… Ok, ok! Yes, there should be some boilerplate for starting the application. But basically it winds down to something like:

class MyApp is Vikna::App {
has Channel:D $.connection-queue .= new;
method main {
...; # Your application preparation code
start react {
whenever $.connection-queue -> $new-connection { self.start-processing: $new-connection }
}
}
method start_processing($conn) {
my $out = $.desktop.create-child: Vikna::TextScroll, ...;
$out.say: "Let's go!";
start { ...; } # do you work here
}
}

Does it look scary? :)

Speakers
avatar for Vadim Belman

Vadim Belman

Head of Department, Avanta


Friday June 26, 2020 11:00am - 11:50am
Zoom Channel 1
Feedback form isn't open yet.

Attendees (13)