D4no0

D4no0

I currently have some free time and looking to create a library for elixir. The thing that always hold me back is trying to come up with an idea of a library that could be truly useful in elixir, I want to avoid creating a library for the sake of it. The things I am looking for are:

  • The library should be lacking from elixir/erlang or must be re-implemented from the scratch: I don’t want to create an elixir wrapper for an existing erlang library or maintain an already created library;
  • The library should be used: this points to the thing previously mentioned, I don’t want to create a library for the sake of writing some code;
  • The library should make sense in elixir ecosystem: I want to avoid creating a library that would have no place in elixir ecosystem.

If you have any interesting ideas, let me know.

Showing Posts 1 to 10

Eiji

Eiji

There is lots of place around scenic library. scenic itself focus on embedded devices, but allows to write “standard” desktop GUI applications. There are tons of topics here …

  1. Desktop integrations - every OS/Desktop Environment (Windows, KDE/Plasma, Gnome and so on) specific things like notifications, media control, panel progress notifier, tray icon, themes, icon themes, sound themes etc.

  2. Non-DE/OS integrations - integration for everything which is not tray, panel, window manager etc. like custom sound effects, custom app’s OS-independent and custom themed notifications, detecting the type of hardware, its temperature and so on …

  3. from custom pickers up to office (word, excel etc.) components, equivalent to core_components in Phoenix would be amazing, ability to easily stylize app to bootstrap or other css framework could be interesting to many existing web projects as well

  4. I even saw some simple 2D games in it, so maybe some simple game engines for easily creating card games or something like that

and literally thousands of other ideas. We don’t have much Elixir in desktop GUI and even less of those are really popular.

Why? Just for example livebook.dev - they have only Windows and Mac versions. Having a scenic-based would give us one project compilable for Windows, Mac and Linux at least.

D4no0

D4no0 OP

To be fair I had plans in the past of working on scenic, and it totally went under my radar now.

I wanted to create a backend for OpenGL ES, so I could run a full render pipeline on Android. In my vision elixir and OTP are vastly superior to any development solutions currently available. gogl even tries now hard to make their shitty jvm they use on android have some fault tolerance capabilities.

The point that stopped me from investing any more time into this are gogl shady practices, they roll updates that try to tight down the usage of native binaries, even to this moment the only way to deploy and use binaries is to mask them as so libraries and symlink them at runtime.

If we take android out of the question, the next question is why would someone use scenic or a library built on top of it, instead of a library that renders a browser natively like elixir-desktop? For example the original use-case scenic is used for, on embedded devices, makes perfect sense.

Eiji

Eiji

Well … I think that it would be as big change as Elixir was for me. Now when I have a repeating task that I don’t want to do once and once I’m simply writing a single file tiny Elixir script (rarely close to 100 LOC). I spend on it extremely small amount of time and this is just amazing. Also even an ecto-based script is pretty simple to do as I already posted some answers with them. I would love to have something like it in scenic.

Look that in KDE/Plasma there are interesting scripts like kdialog:

{_output, status} = System.cmd("kdialog", ["--yesno", "Do you like Elixir"])

if status == 0 do
  System.cmd("kdialog", ["--msgbox", "That's great! Me too!"])
end

With a bit of love we could do something like:

if MyLib.Dialog.question("Do you like Elixir", image: question_mark_img, sound: question_sound, theme: custom_theme) do
  MyLib.Notify.send("That's great! Me too!", image: tada_emoji_img, sound: tada_sound, theme: :auto_detect)
end

We could either detect a current DE/OS theme or use custom. We could draw notifications or use a DE/OS one with integration. There are lots of possibilities to use such lib.

lud

lud

Why not use wxwidgets?

D4no0

D4no0 OP

In general, interaction with OS sound like a nice idea, however the biggest question is how achievable is this cross-platform? You have Windows, Mac and linux that runs multiple desktop environments, each possibly having APIs conceptually different from each-other. The other question is the same as @lud, why not use wxwidgets that already is part of OTP, making a wrapper for wx is something I would like to avoid.

Eiji

Eiji

Ok, but why we should use Elixir then when languages like C++ have a strong communities and tons of libraries around wxwidgets, Qt, GTK+, WinAPI, FLTK and others? wxwidgets in erlang are only bindings. By knowing the assumptions of scenic and read wx the erlang binding of wxWidgets — OTP 29.0.2 (wx 2.6) I really do not see the point of your question.

dmarcoux

dmarcoux

I’m definitely interested in helping out if you want some help. I also don’t really have an idea for a library since I’m fairly new to Elixir. I’ll be watching this thread.

Eiji

Eiji

Those are completely different topics. First of all we can easily fetch tons of data about themes and other things and use them when passing a theme option. The integrations are completely different topic. Sure, at start they are DE/OS specific and later someone would write a wrapper with %Notification{…} struct and would render only supported fields or (as an alternative option) use a custom (draw) OS-independent notifications.

The point of integrations is not having fully OS-independent app, but it’s about having an OS-independent app with an optional features enabled on runtime after detecting specific DE/OS. For example in KDE/Plasma tray icons are something completely different, but I really like the idea behind them. The developer should have ability to just create a “generic” tray icon or spend a bit more time to use library integrations and make his/her apps be more useful in specific DE/OS.

Well … If you really have no idea why not to use wxwidgets (or any other framework) in long term then let’s give a simple example … Could you please add an option in setting that let’s user choose any theme including KDE ones? Have fun trying to dynamically “convert” Linux configuration files to CSS files in different file structure.

Look in Elixir parsing a CSS and putting it’s values to struct is not a big deal. It’s even simpler for configuration files, but I really do not see an easy way to use Qt themes in GTK+ or GTK+ themes in Qt. Now think that each GUI framework have not only different engines, but also they change across versions. I do not track everything in that topic, but I can imagine that some things in GTK+ v4 are much simpler to do than in GTK+ v3. Not every theme have it’s version for all other GUI framework, but even if … Let’s say everything above is simpler than I think and everything could be done in 5 min …

Now please guide me how to write a KDE/Plasma (Qt 5 based) tray integration in wxwidgets? Most probably I would need a bindings for Qt and KDE libraries as well and “somehow” make all of them work together without any issues. Then let’s go even deeper into Debian-based system. Are they still on KDE version 3.x or did they already moved to 4.x version? :sweat_smile:

That’s why importing CSS or Linux configuration files into generic Elixir struct and pass it as an option to the library would make much more sense. Before Elixir I never dreamed that there could be a library that in “5 min” of work would allow me to make all DE/OS themes importable. Now it’s only a matter of time/work on said library. Look that even the most configurable DE does not have an option to import GTK+ themes. Having a truly DE/OS-independent apps with lots of integrations would be a killer feature for many end-users.

They often wait years before someone would fork some project and write it in other GUI framework, so it would integrate well with their DE. In practice they just take a popular theme or looks for alternative apps or as above have inconsistent look and feel for literally long years. Isn’t only theme part enough convincing? What about tons of other parts of applications that as in Elixir shouldn’t be touched by app developer as we have 10x less code in all other kind of projects.

felix-starman

felix-starman

One that’s always been a small but annoying one is PDF manipulation (reading/updating) and writing that doesn’t rely on wkhtmltopdf.

There’s plenty of generation libraries, but not many, if any, that can do both.

For comparison I was imagining an equivalent to Hexapdf in the Ruby world: https://hexapdf.gettalong.org/

The negative is the PDF2.0 docs have to be bought (like $300 to the org that maintains them), but the 1.7 docs are freely available.

Hexapdf’s source is OO obviously but generally alright to read, but when I looked into it, the 1.7 docs for the spec aren’t too bad just… it’s a lot.

Separately, I also wanted to do HTML to PDF that didn’t require node. I lightly looked into wrapping a rust library, like calling the Servo core libraries that power Firefox, but when I last looked a couple years ago, I couldn’t find the right place.

10
Post #9
LostKobrakai

LostKobrakai

There’s weasyprint, which works well, though still needs calling into python.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
_mfierro
Hello, I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews