Settings

Theme

Selkie – Opinionated TUI Framework for Raku

github.com

7 points by apogee 2 months ago · 12 comments

Reader

davidschultz 2 months ago

Nice. To get your dependency Notcurses::Native built via zef on my OpenSUSE Tumbleweed, I had to run

zypper in ffmpeg-7-libavdevice-devel ffmpeg-7-libavutil-devel ffmpeg-7-libavcodec-devel libunistring-devel libdeflate-devel

which pulled in several dependencies, resulting in the overall package list:

ffmpeg-7-libavcodec-devel ffmpeg-7-libavutil-devel ffmpeg-7-libswresample-devel ffmpeg-7-libavformat-devel ffmpeg-7-libavdevice-devel ffmpeg-7-libavfilter-devel ffmpeg-7-libpostproc-devel ffmpeg-7-libswscale-devel libdeflate-devel libunistring-devel

Maybe just a subset of these is necessary. Conversely, I've already had ffmpeg-7 and libavcodec57 and a number of other devel packages installed from before, so some other packages might also be neccessary. Still, this might help you in adding instructions for installing your Notcurses::Native on OpenSUSE.

  • apogeeOP 2 months ago

    Thanks, I will get this into the next version of the Readme, I think the minimum would be roughly:

      sudo zypper in \                                                                                                                                                         
        ncurses-devel libunistring-devel libdeflate-devel \                                                                                                                    
        ffmpeg-7-libavcodec-devel ffmpeg-7-libavformat-devel \                                                                                                                 
        ffmpeg-7-libavutil-devel ffmpeg-7-libavdevice-devel \                                                                                                                  
        ffmpeg-7-libswscale-devel \                                                                                                                                            
        cmake pkg-config gcc
  • apogeeOP 2 months ago

    I've set up GitHub actions to prebuild all the deps so on any modern Mac/Windows/Linux it should just be 'zef install selkie' now.

librasteve 2 months ago

Oh I found this https://raku.land/zef:antononcube/DSL::Examples

So Raku has a module for “few shot” LLM training for DSLs … would be cool to see an example DSL interpreter in Selkie (eg a window for DSL code and a window for output…

librasteve 2 months ago

I tried this on macOS … very smooth install and looks great.

But why would I switch to Raku just to get a TUI framework?

  • apogeeOP 2 months ago

    The tl;dr is: because you want native performance and don't want to focus on blitting pixels or terminal internals.

    Selkie has an event/effect model similar to Elm & re-frame, you just declare your widgets and renders/updates are handled by the lib.

    As for why Raku:

    - grammars allow for easy parsing of complex DSLs

    - supply/tap are a natural fit for the event/effect model, asynchronous thread-safe programming

    - roles make composing widgets simple

    - it's fun to write :D

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection