HNHacker News
TopNewBestAskShowJobs

ogoffart

1,178 karma · joined June 30, 2012

https://slint.dev
submissionscomments
ogoffart··on Is C++26 getting destructive move semantics?
I’m curious what that showstopper bug actually was.

I was really looking forward to this feature, as it would've helped improve Rust <-> C++ interoperability.

ogoffart··on Is C++26 getting destructive move semantics?
Of course Rust can handle those use cases fine (GUIs, web browsers, and game engines).

C++ is still high on the TIOBE index mainly because it is indeed old and used in a lot of legacy systems. For new projects, though, there's less reason to choose C++.

ogoffart··on Ratatui – App Showcase
Author of one of these "markup"-based toolkits here. I believe that Rust might not be the best language syntax to express UI. I am curious why you are so strongly against using a DSL.

This topic comes up often, so I wrote a blog post explaining why I think a DSL is a good fit: https://slint.dev/blog/domain-specific-language-vs-imperativ...

ogoffart··on Qt Group Buys IAR Systems Group
Not OP, but some users migrated from Qt to Slint and are happy with it. [https://slint.dev] (I'm one of the Slint developers.)
ogoffart··on Upcoming Rust language features for kernel development
Slint does require using its DSL to define UIs, but I'd argue it's not really like learning a whole new language. It's not harder than learning the API surface of any other GUI framework.

I actually wrote a blog post about this exact topic, since it's a common question: https://slint.dev/blog/domain-specific-language-vs-imperativ...

ogoffart··on Upcoming Rust language features for kernel development
Regarding Rust GUI framework, there is also Slint https://slint.dev

(Disclaimer: I'm one of the Slint developers.)

ogoffart··on Ask HN: Which cross platform desktop GUI to use instead of Electron?
I'm one of the developers of Slint[0], a framework the should be ticking all the boxes for stable, lightweight, and native-style UIs supporting accessibility

[0] https://slint.dev

ogoffart··on C++ Reflection and Qt MOC
> Rust, contrary to public claims, often does worse on memory safety than C++, which is a sad state of affairs.

Nonsense! Where do you get that from?

Aslo, you can make easily make linked list, it's just not a recommended data structure.

ogoffart··on C++ Reflection and Qt MOC
> Rust claws at market share but has problems with basic stuff like doubly linked lists, WIP gccrs and memory unsafety,

Doubly linked lists aren’t that important today. Rust doesn’t need gccrs to be useful, and it gives much better memory safety than C++ without needing a GC. So I find your criticism of Rust seems a bit weak. Rust is a strong alternative to C++.

ogoffart··on C++ Reflection and Qt MOC
10 years ago, in another life, I was already experimenting with trying to provides feature from moc with reflections and from other macros:

- https://woboq.com/blog/reflection-in-cpp-and-qt-moc.html 2014, That was based on a previous reflection proposal

- https://github.com/woboq/verdigris : 2016, Replaces the moc by a set of macros.

What my verdigris experience shows is that it is perfectly possible to replace the moc at the cost of slightly uglier macros. And this was using C++14. I haven't look in details at the C++26 reflection, but I'm sure it would make it easier to make these macro more pretty.

ogoffart··on We rewrote the Ghostty GTK application
Did you know about Slint https://slint.dev ? What do you think about it?
ogoffart··on Bypassing Google's big anti-adblock update
I’m actually working on an alternative called Slint => https://slint.dev
ogoffart··on Code-GUI bidirectional editing via LSP
I use the the code lenses of code action feature of the LSP so that the user can start a preview. The LSP server will then open a native window on desktop.

Every time the users do some change in the code, the editor sends the document and we re-render the preview.

I use the textDocument/documentHighlight request to know when elements are being selected from the code so I can highlight them in the preview.

When selecting an element in the preview UI, my LSP server sends a window/showDocument to position the cursor at the right location. And if the user changes property or do change in the file, we do a workspace/applyEdit command with the changes.

Btw, the code is there: https://github.com/slint-ui/slint/tree/master/tools/lsp

ogoffart··on Code-GUI bidirectional editing via LSP
For Slint [https://slint.dev], a (native) GUI Toolkit, I've also developed a LSP server that do live preview and editing. You can try it online at https://slintpad.com : if you click on the toolbar button to enable the right panel, you can edit the properties from the UI, and this is all done through the LSP and can be integrated in any editor that supports it.
ogoffart··on I Switched from Flutter and Rust to Rust and Egui
Slint is aiming at having native looking widgets.
ogoffart··on I Switched from Flutter and Rust to Rust and Egui
We're building Slint as a business. It takes a lot of time and effort to maintain and improve it. We're not looking to support users who want to use it in proprietary software and give absolutely nothing back, not even a small credit. That doesn’t feel like too much to ask. (Even the MIT license requires including a copyright notice.)

Honestly, it’s a bit sad that for some, using libraries for free isn't enough, they also expect to do so without even mentioning the project.

ogoffart··on I Switched from Flutter and Rust to Rust and Egui
Since others are sharing Rust GUI libraries, I’ll mention Slint [https://slint.rs] a native GUI toolkit written Rust. It has a declarative domain specific languages, editor tools, and has been stable with no breaking API changes since 2023. I'm one of the developers.
ogoffart··on Slint 1.12 Released with WGPU Support, iOS Port, and Figma Variables Integration
Hi, I'm one of the developers behind Slint. Sorry to hear Slint didn't work out for you. We’re aiming for a great developer experience, so I’d love to understand what specifically went wrong.
ogoffart··on Codex CLI is going native
> Qt level GUI framework

Trying to bring that with Slint: https://slint.rs

ogoffart··on Modern C++ – RAII
> Rust could get a rock solid portable GUI toolkit that doesn't rely on a webview [...], but it's not there yet.

What would you say is missing in Slint?

> probably not much harder than wrapping Qt, to be honest

There are already Qt bindings for rust (cxx-qt, qmetaobject-rs). What's missing from these?

ogoffart··on Show HN: I rewrote my Mac Electron app in Rust
Slint is free for desktop.

Slint is under three licenses: GPL, or royalty-free on desktop/mobile, or paid for embedded. So you only have to pay if you sell hardware.

ogoffart··on Qt's New Bridging Technology – Looking Back to Move Forward
I actually wrote Rust bindings for Qt a while back: https://github.com/woboq/qmetaobject-rs/. I'm curious to see how Qt's own take with Qt Bridges will work out. That said, I’ve since moved on and now work on Slint [https://github.com/slint-ui/slint]

Slint was created with the same idea as what drives "Qt Bridges". We made a UI toolkit that is language-agnostic from the start. Slint uses its own UI language (inspired by QML), and gives you first-class, idiomatic APIs in Rust, C++, Pyhton, and JavaScript. And a clean separation between UI and business logic.

ogoffart··on Reports of Deno's Demise Have Been Greatly Exaggerated
Off-topic, but the idea of "colored functions" from the "What Color is Your Function" article doesn't apply to Rust's async/await. That article is about JavaScript before it had async/await, when it used callbacks.

In Rust, you can call async functions from normal ones by spawning them on the executor. The .await syntax isn't as painful as dealing with callbacks and closures in JavaScript. Plus, if you call an async function incorrectly, Rust's compiler will catch it and give you a clear error message, unlike JavaScript, where bad function calls could lead to unpredictable behavior. The premises of the article don't apply, so Rust's async/await doesn't introduce the same "colored function" issues.

(See also https://without.boats/blog/let-futures-be-futures/ )

ogoffart··on Stability by Design
Just wanted to mention that Slint has had a stable API for over two years now. (We released Slint 1.0 more than two years ago and have kept things backward compatible since) So stable GUI APIs in Rust are possible. If you're looking for something solid to build on, Slint might be worth a look.
ogoffart··on Kate and Python Language Server
I wrote a language server too, and I also went with "-lsp" naming because it's way more recognizable. "LSP" is kind of a brand. If you look at the list at https://microsoft.github.io/language-server-protocol/impleme... a lot of them are named -lsp.
ogoffart··on Migrating away from Rust
You can have a tree view Slint. There is one example in https://github.com/slint-ui/cargo-ui And also in https://github.com/LibrePCB/LibrePCB/pull/1504
ogoffart··on Migrating away from Rust
If you're looking for a stable GUI toolkit, there is Slint
ogoffart··on GCC 15.1
> This is going to silently break so much existing code

The code was already broken. It was an undefined behavior.

That's a problem with C and it's undefined behavior minefields.

ogoffart··on Rust Any part 3: we have upcasts
> Prior to the current version of Rust it was impossible to access methods on `Foo` when a `&dyn Bar` was passed.

This has been working since Rust 1.0, I think:

    trait Foo {
        fn foo(&self);
    }
    trait Bar : Foo {}

    impl Foo for () {
        fn foo(&self) { println!("Hello") }
    }
    impl Bar for () {}

    fn xxx(x: &dyn Bar) {
       x.foo();
    }

    pub fn main() {
        xxx(&());
    }
> With the current beta version you can upcast

Right. Now you can convert from `&dyn Bar` to `&dyn Foo` which wasn't possible before.

ogoffart··on 20 years working on the same software product
I'm developer of Slint and I'm glad to see Slint mentioned. I want to clarify that we're not trying to mimic the web. We have a great vision for the desktop integration, but we unfortunately have limited resources. Our team is fairly small and we are mainly working with paying customers to pay the bills, which are mostly in embedded space at the moment. I agree with your points, and while there’s still a lot to do, I hope Slint can become a strong option for building powerful complex desktop applications.
← PreviousPage 2 of 9Next →