axelson

axelson

Scenic Core Team

3) ElixirConf 2017 - Elixir Native UI - Boyd Multerer

Okay, posting this day’s talk by @boydm:

ElixirConf 2017 - Elixir Native UI - Boyd Multerer

I will be showing and discussing an Elixir-Native UI package that only depends on OpenGL (through glut). No browser, no wxWidgets, just Erlang, Elixir and OpenGL… Intended for embedded applications, but with possibilities for use beyond.

The framework supports multiple scenes, animations, input, forms, fonts, and more. I’m trying to optimize it for small package size, as few dependencies as possible, and nice co-existence in an embedded application.

This is a work in progress, but is pretty far along. Hope to release a beta in the next few months. Think of it as an opportunity to both preview a large project and give feedback before the first release.

All talks thread:

First Post!

axelson

axelson

Scenic Core Team

I want to say that I really enjoyed this talk. And I am very excited to be able to play with code. I would love to build something on top of a framework like this. It looks like really nice work and I’m impressed by many of the small touches that are already included (such as the live per-frame performance breakdown and well-done translations). This makes me much more excited about Nerves as well!

Now I just need to patiently wait for the code to be released :slight_smile:

Also it looks like I wasn’t the only one that enjoyed it:

https://twitter.com/chris_mccord/status/908183839209648134

Most Liked

aseigo

aseigo

I think this is really nice for very small systems, but anything near the size of a RPi .. I’m unconvinced.

Building a UI toolkit that works well is really, really hard. The old “last 10% takes 90% of the effort” adage is 10x worse for UI frameworks. The last 1% takes 50% of the time IME. I would much, much rather see good integration with an existing and mature technology like QtQuick. It is declarative, provides all sorts of absolutely wonderful features and flexibility, including the ability to inline OpenGL shaders etc. And it works a dream on small-ish devices that can run a moderately modern OS like Linux, including RPi grade hardware.

Sequential programming of UIs is, outside of special cases like low-level game development, done imho. It is not realistic for the average human developer to produce UIs that fit modern expectations with a sequential API. The need to manage interactions between components, animations, data, etc. is just tool complex. When the more-or-less-static UI paradigm of WIMP started to die, that was really the end of sequential UI programming. For that reason, having a declarative UI system, as seen in QtQuick, is currently the best route.

(Prior to my current focus back on distributed systems, I spent ~15 years doing UI/UX R&D at medium and large companies .. the above is borne of that experience :slight_smile:

Rob-bie

Rob-bie

Like everyone else, excited for this project. Has there been any updates since? Watched this talk a couple of months ago and sort of forgot about it until now. Would love to tinker with it

boydm

boydm

Creator of Scenic

Love to see the interest. Was just reading the above thread…

Think of it is that it is a retained-mode model specifically designed to take advantage of OTP.

All UI scenes are GenServers. Scenes can reference (embed) other scenes. Input is all message passing/filtering/handling. This also means that developers can build “components”, which are just scenes/GenServers that can be reused by other devs. Nice for extensibility.

Drivers (rendering) are abstracted away from the scenes so that they can be swapped to run on different hardware without re-writing the UI logic. This allows me to run my app on Mac to debug, change a target, and build firmware for a raspberry on Nerves. Everything looks and works the same across the two.

The driver model has also been really good for getting remoting working. More on that later…

A big thing I’m going for is reliability. Devices in the field are going to encounter errors, whether it be code, unexpected data, malfunctioning sensors or whatever. This was harder to get right than I expected, but now any piece of UI can crash and things recover sensibly into a good state.

Multiple people have said they can tell it looks like something someone with game experience would make. Partly that was to get my dependencies down to just OGL. But also because transforms are just a great way to manipulate things.

As far as overall status goes, I’ve stopped adding features and am now focused on the large amount of supporting things around it. (Including stripping out the code from various dead-ends and experiments). I want the API to be pretty stable before it goes out to lots of people.

Last Post!

Eiji

Eiji

hmm, NanoVG as well as I remember supports only 2D vector drawing using OpenGL, but maybe something have changed from last time I saw this project

Will be there a chance for 3D graphics in future? Of course I’m not planning creating AAA game, but maybe there would be something to do with 3D animations.

About “framework” part. From video I did not noticed any “magic”. Is it as same framework like Phoenix is called (people says that’s basically works more like library than framework).

ok, I see

sure, anyway nice to see that it will work on so much environments

I believe it’s less scary if you are playing with OpenGL-like API “everyday”, so if you are creating button from scratch then it should not be a big deal to also draw some animations. From beginner side it’s much more trouble especially when you need to play with things you should not to like frame-less windows for custom title-bar.

I will definitely place a job offer at least to create library with what I have described and maybe there would be something more also like card game generator + launcher or even also advanced reader which I have in my crazy mind. :smiley:

Where Next?

Popular in Talks Top

LostKobrakai
After having watched the talk I’m wondering if this would also be a good opportunity to gather examples / tips about how to prevent or mi...
New
axelson
Here’s today’s talk: ElixirConf 2017 - Don’t Write Macros But Do Learn How They Work - by @jessejanderson ...
New
axelson
ElixirConf 2017 - Perhap: Applying Domain Driven Design and Reactive Architectures to Functional Programming - by @Version2beta ...
New
axelson
Here’s the last ElixirConf 2017 video of day one! ElixirConf 2017 - Scaling up Elixir at TpT - by @shanti I...
New
axelson
ElixirConf US 2018 – Architecting Flow in Elixir - From Leveraging Pipes to Designing Token APIs – René Föhring (@rrrene) ...
New
New
CodeSync
Code Sync: Keynote: Gang of None? Design Patterns in Elixir - José Valim | ElixirConf EU 2024 Comments welcome! View the <span class="ha...
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
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement