• 1 Post
  • 17 Comments
Joined 4 years ago
cake
Cake day: November 23rd, 2022

help-circle

  • Kajika@lemmy.ml
    cake
    toProgramming@programming.dev•Using Go after C
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    4 days ago

    I am building myself a truly efficient GUI framework in C++ (not C though) as even Qt is a no-go to me as it is very hard to work with in a clean manner (no Qt editor or other vendor lock).

    I can’t find anything that really crafted for efficient/not-bloated GUI : not running dumbly at 60 FPS while nothing needs to be redraw and not being in 20 years old immediate mode OpenGL (very inefficient).

    I touched this subject no so long ago with a post about a 6 years-old GLFW bug on wayland -> https://lemmy.ml/post/54916148 . This makes me think that we are very few on hearth who cares/knows about GUI outside HTML+CSS+chrome solutions.

    I think that making a C library (out of C++ for me) could bring something for many languages like Go, Python, etc. But I don’t have many hopes thus not really putting to much work on this as revenue is very limited, at least for me, so other projects must be put in priority.

    I am genuinely curious about what are the needs of others, as I don’t need cross-platform (Windows is way too much work) nor a lot of fancy widget most of time. Already having text, images, buttons, and inputs (text area) would be a pretty solid start. For the rest give me a opengl context and I can work with that.

    My library’s idea is to follow the habits of HTML+CSS (flex object, relative/absolute positioning, separated style options):

    int main()
    {
    	const auto app = uui::create_application(uui::Application::Implementation::OPENGL);
    	app->create_window(800, 600, "UUI sample", [](uui::Window& window) {
    		window.set_background_color({0.1f, 0.1f, 0.1f, 0.8f});
    		window.create_component({.x = 0, .y = 0, .width = 200, .height = 100}, [](uui::Component& component) {
    			component.set_background_color({1.0f, 0.f, 0.f, 0.5f});
    		});
    		window.create_label(
    			{.x = 0.5f, .y = 0.5f, .text = "Hello world!", .text_color = {0.8f, 0.8f, 0.8f, 1.0f}}, nullptr);
    		window.set_keyboard_callback([&](int key, int scancode, uui::KeyAction action, uui::KeyMod mods) {
    			std::cout << "keyboard callback key=" << key << ", scancode=" << scancode << ", action=" << action << ", mods=" << mods << "\n";
    			if(key == 256 && action == uui::KeyAction::PRESS)
    				window.close();
    		});
    	});
    	app->run();
    	return 0;
    }
    

    I guess it is not a today solution but if people are interested I wanted to share the idea (I could share the code too if some people are interested, I don’t want to publish half finished library).


  • You’re totally valid and right to share this. This is 100 times better than a lot of corporate chill content.

    We should talk, use developers, about our craft and push for FOSS and the free access to everyone to technology. And this is very political, human interactions always are. I don’t believe a world of big tech hoarding everything is desirable and it seems not even long-term viable anyway.

    So many people are jailed into the narrative of mainstream about AI. While so many issue are know and so blatant everyone become blind to them just because they feel powerless about it and prefer trying their best to profit of the situation instead of fight back.


    • Why are all source files in the root folder (kinda unnecessarily messy)?
    • Am I reading correctly about the benchmark being way bellow C here ?
    • Limitations of the language feel not attractive for application development

    a dynamically allocated array is a typed memory area without intrinsic length information […] no threads in the language, no WCHAR

    • I haven’t read about the module/import mechanism because it is buried too deep in the documentation, if this is a strong point this should be talked about. Also a “Getting started” is very attractive to me.
    • Bonus : getting away from Github would be a big W to me.





  • Fascism is the concept this guy is lacking in order to describe what’s happening here, and its consequence: imperialism.

    Oh wait, wikipedia:

    Vardi is open about his Zionism and is listed as a signatory on an anti-academic-boycott letter “United Against the Academic Boycott of Israel,” that denies that genocide has ever occurred in Palestine, despite an inquiry by a United Nations Independent International Commission and International Association of Genocide Scholars stating that the legal definition of genocide has been met according to the Genocide Convention. Vardi supports a two-state solution and served 5 years in the Israel Defense Forces, participating in two wars during his service. Vardi has remarked that boycotts against Israel on university campuses are “deeply distasteful”.

    He is fascist after all, Wow.





  • Security is achieved through other means.

    Let’s explicit this: you can, and should, sign your commits if you want security (no commit tampering). You need to:

    • generated a gpg key: gpg --full-generate-key
    • set git to look for the public key to use: git config --global user.signingkey [public key ID]
    • set git to sign your commits: git config --global commit.gpgsign true

    Note that I used --global here but you can do without to sign on a per-project basis.

    Also gpg UX is terrible, to find the [public key ID] use the command gpg --list-keys, it should looks like:

    pub   ed25519 2026-01-01 [SC] <- type algorithm date and capability (this key is only to Sign and Certify)
          662E3CDD6FE329002D0CA5BB40339DD82B12EF16 <- Public key ID
    uid           [ultimate] my full name (Master Key) <[email protected]> <- owner information (should be your name and email address)
    sub   rsa4096 2026-01-01 [E] <- sub key used to encrypt
    sub   ed25519 2026-01-01 [S] [expires: 2027-01-01] <- subkey used to sign
    

    Last, if you want to save/backup you keys the default location of gpg files is ~/gnupg or you can export keys with gpg --export [key ID] > path/to/file.key for the public part and gpg --export-secret-keys [private key ID] for the private part. Both export can have a -a or --armor argument to output as base64 text instead of raw binary. [private key ID] can be found with gpg --list-secret-keys.

    EDIT: after writing this I checked https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work and TIL you can sign tags too.

    EDIT 2: you can also use your ssh key to sign -> git config --global gpg.format ssh (I am less inclined to do this as you won’t have subkeys and expiration date but this would be simplier indeed)






  • Kajika@lemmy.ml
    cake
    toTechnology@lemmy.ml•Why is Hacker News like that?
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    2 months ago

    Y combinator is deeply rooted in fascism, I’m trying to find the hacker-news post that shocked me about “going back to silicon-valley root: the military industry”. The “liberal-progressive” tone that can be read from commenters can soften the overall vibe but in the end the tone is definitely not great : last example for me was how the “stopomarchy” news was treated (flagged, and the comments smells very bad) : https://news.ycombinator.com/item?id=49661901

    It’s been 2 years now that on top of this the vast majority of “news” are LLM related. And if you’re not into that this make the website not worth anything any more.