Comment by ๐Ÿ‘ป ps

Re: "I intend to start working on my Gemini browser, Profectus,โ€ฆ"

In: u/clseibold

@clseibold could you please explain in the README how to build on Linux from sources?

it's go1.23.5 linux/amd64 here.

๐Ÿ‘ป ps

2025-02-03 ยท 1 year ago

25 Later Comments โ†“

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 19:21:

@skyjake Yeah, the versioning makes sense, espeically for lagrange. I probably won't do that for Profectus only because it was meant to be experimental to begin with, and golang already has problems with being updated in the software repos, particularly on Debian/Ubuntu, lol.

What I'm excited about most is that I can switch off of using cgo, which has to link at compile time, and move to the purego library, which is like dynlib where it does it all at runtime. Cgo required me to use mingw to compile for Windows and it was a mess. Purego won't require mingw.

I also really like a lot of the changes in SDL_ttf in particular. YOu can now get just the size of wrapped text! :D

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 19:28:

@ps Sorry, I'm dumb - I thought you meant building golang.

Building on go requires installing the dependencies and then running "go build ." and that's it.

These should be the dependencies for Ubuntu:

If you are on Fedora, then replace "dev" with "devel" and "libsdl2-" with "SDL2_".

๐Ÿ‘ป ps ยท 2025-02-03 at 19:32:

hm, same command but no output in the terminal after run `go build`, maybe I should just wait.. thanks

upd. sure, I have already installed dependencies

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 19:35:

@ps I don't know how long it should take, but it might take a bit. If it goes longer than 5-10 minutes, then something is definitely wrong, I think. The command should not output anything when successful, it should just take you back to the shell, and you'll have the executable in the current directory.

๐Ÿ‘ป ps ยท 2025-02-03 at 19:39:

well, after some time of wait, I got the output:

so will resolve these dependencies for myself.

at least now I see what to do next.

๐Ÿ‘ป ps ยท 2025-02-03 at 19:41:

I don't know how long it should take, but it might take a bit.

Not first time I'm compiling in Go (Yggdrasil written using it also) just empty output for about 1-2 min confusing a bit.

or maybe some Go updates or that's because I'm running it on Fedora (as dnf take a while also, comparing to apt).

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 19:47:

@ps This is a medium-sized program, but with quite a few dependencies, so it does take a while, but I think there is some weird golang thing where if there's a cgo/linking error, then it takes even longer to compile to show you the error, lol. I've noticed that myself.

๐Ÿ‘ป ps ยท 2025-02-03 at 20:10:

just installed dependencies (if somebody looking for inline):

after running profectus binary, I see only this CLI output but no UI / window:

maybe it's would be simpler to install with Flatpak :)

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 21:07:

@ps *sigh* Right! I forgot that the latest master is broken because the SDL2 bindings library that I use is broken. I have an issue open that never got fixed and I haven't been on linux in a long while to provide more details: https://github.com/veandco/go-sdl2/issues/598

You'll have to checkout an older commit of the repo. Do `git checkout 2bebbcb342469ec6a50993ecb7e89fdf94e9960f` and then rebuild.

You can also try to flatpak if you want, but I think flatpak has some weird issues where the scrolling speed or rendering or something is slower.

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 21:10:

@ps Btw, I do have precompiled binaries here: gemini://scrollprotocol.us.to/software/precompiled/

๐Ÿ‘ป ps ยท 2025-02-03 at 21:13:

thanks, I'll try checkout the commit!

๐Ÿš€ stack ยท 2025-02-03 at 21:37:

We really need the amused guy eating popcorn emoji.

Potatos look better and better. Cross-compiling 68K GEM OS on a VAX was 5-10 min.! And you definitely knew if it didn't work (we had error messages!)

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 22:00:

@ps I was finally able to fix the latest version of the master branch. So you should no longer need to do the git checkout. You can do "git checkout HEAD" to get back to the latest commit.

๐Ÿ‘ป ps ยท 2025-02-03 at 22:18:

@clseibold yes, I can confirm it launching now.

but can't understand why does building process going silently (without output) and takes lot of time, comparing to cargo

๐Ÿ‘ป ps ยท 2025-02-03 at 22:26:

I'm not familiar with SDL (such as desktop development) but applications that written using this framework usually working strange, maybe in GNOME environment only - for example, I can't normally catch and select text area in the request input etc. At this moment, I like Adwaita theme, as ex-MacOS user, it looks intuitively for me and expected in UI behavior (just not sure about other platforms)

Thoughts switch to Iced, but it is pretty raw, and maybe have same issues like I have in SDL-based apps.

Just my imho, thanks for working on! At least, if you have created Scroll protocol, you're free to implement good support for all features presented there, will follow the project news!

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 22:31:

@ps SDL is not a GUI library, it is a rendering library. Profectus uses its own GUI library, called HorusUI. It's actually an IMGUI that is build as a tree of GUI Elements and then rendered using SDL. I could switch out the renderer (for the most part) if I wanted to, but that will take a lot of work. Lagrange does a similar thing, and since it's way more mature than Profectus, it has things like text selection, lol.

The reason you cannot select text is because I haven't implemented it in my GUI library or in the SDL renderer part yet. I will implement it once SDL_ttf v3 is released mainly because the new API will make this so much easier.

(Side Note: The only thing where the boundaries between HorusUI and SDL is blurred is the text rendering stuff, mainly because I haven't figured out a good way to make HorusUI API-agnostic in this regard)

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 22:38:

@ps You should check out Profectus' theming! It's the thing I'm most proud of. If you go to ~/.config/profectus/themes/ you'll see a list of theme files. The Help page in Profectus also links to the theming guide that will tell you how to theme.

Just copy one of those theme files, rename it, and edit it to make your own theme. When you're in profectus, you can use Alt-T to cycle through the themes.

I will consider implementing an adwaita theme for Profectus to be shipped with the program built-in. Thanks for the suggestion!

๐Ÿ‘ป ps ยท 2025-02-03 at 22:41:

reason you cannot select text is because I haven't implemented it in my GUI library or in the SDL renderer part yet

I have similar issue in Lagrange, as understand, it also uses SDL. Maybe just expecting for something, that not possible or hard to implement in different platforms.

I'm also pretty conservative, feeling discomfort on KDE as looks 'plastic' (like Windows) for me, tried i3 but everywhere I can't find myself but in GTK only. Fortunately, current Gnome not such ugly like it first releases (after v2). One problem - I'm not coding in C, and not always can implement something in Rust that I really want from framework written in C.

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 22:43:

@ps You should be able to select text in lagrange. You should provide the details to @skyjake so he can figure out what's going on.

๐Ÿ‘ป ps ยท 2025-02-03 at 22:51:

I will consider implementing an adwaita

Adwaita is not UI only, it includes lot of GTK extensions, including widgets that extending existing GNOME API:

โ€” https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/index.html

Like GtkSourceView that extends TextView, and many other components. The style/CSS is only top of the iceberg, lot of things implemented in deep backend level, using Glib API, Pango for fonts drawing, etc.

So I don't think you really should re-implement something like Adwaita CSS, it's not covering entire widgets responsibility so users who using GTK will probably not choose application just because of colors. I hope it's clear, as I can't describe all thought well in English.

๐Ÿš€ clseibold [OP, ๐Ÿ›‚] ยท 2025-02-03 at 22:53:

@ps I won't be reimplementing Adwaita CSS, but if there's common adwaita themes, then I can mimic those in the theming system for Profectus. That's what I meant.

๐Ÿ‘ป ps ยท 2025-02-03 at 22:55:

You should be able to select text in lagrange.

of course I can select the text there, but sometimes selection goes out of cursor, reacts unexpected on double click (after FireFox) don't know how to describe and won't disturb @skyjake because not sure that's really bug but some specifics of the framework or mismatch my expecting just.

๐Ÿ‘ป ps ยท 2025-02-03 at 23:06:

hah, maybe that's stupid idea but sometimes I'm thinking about fork of the FireFox, drop engine from there and integrate Gemini. Just sometimes I clear to give up with building own app frame (forms, buttons, menus) instead of features I really want (e.g. proxy settings, geo ip controls and other thinks make me motivated build the Yoda). But all the time I'm working with widgets instead of backend features. I still have no options window, no history, no bookmarks.. it's about one year of work and nothing done yet :)

another thought - is write the SOCKS5 proxy, but I won't re-transmit HTTP traffic even there is no problem with performance on the modern machines.

๐Ÿš€ stack ยท 2025-02-03 at 23:52:

Lagrange text selection works fine in every environment I've tried, from Android to every Linux I've used and even FreeBSD.

๐Ÿš€ stack ยท 2025-02-03 at 23:54:

I've thought about harnessing Firefox a few times, but it is really a giant pain.

Original Post

๐Ÿš€ clseibold [๐Ÿ›‚]

I intend to start working on my Gemini browser, Profectus, again once SDL3 and SDL3_ttf are released (and available on Ubuntu, Fedora, and Flatpak). The move to SDL3 will include much better HiDPI support on all major platforms, and my font-rendering will be redone now that SDL3_ttf has a decently sane API, lol. [https link] Profectus Repo [https link] Profectus on Flathub

๐Ÿ’ฌ 33 comments ยท 3 likes ยท 2025-02-02 ยท 1 year ago