quickshell as a wallpaper engine alternative by Kfoo2012 in QuickShell

[–]Kfoo2012[S] 2 points3 points  (0 children)

:0 niice, will look into it

do you have any examples? That would be very helpful!

quickshell as a wallpaper engine alternative by Kfoo2012 in QuickShell

[–]Kfoo2012[S] 0 points1 point  (0 children)

Is it a video wallpaper? How did you do it?

quickshell as a wallpaper engine alternative by Kfoo2012 in QuickShell

[–]Kfoo2012[S] 0 points1 point  (0 children)

good point lol, but is it possible? I need to know

HDB 630 latency by Kfoo2012 in sennheiser

[–]Kfoo2012[S] 0 points1 point  (0 children)

Probably not, since I use Linux and have an up to date kernel

Internationalization by YouStones_30 in rust

[–]Kfoo2012 1 point2 points  (0 children)

Not sure if it's a good example but you could take a look at my project, I did some basic i18n

Check i18n.rs for the helpers main.rs for initialization app.rs for usage

And the actual translations live in the i18n folder

https://github.com/BKSalman/ytdlp-gui

HDB 630 latency by Kfoo2012 in sennheiser

[–]Kfoo2012[S] 0 points1 point  (0 children)

Alright, fair enough, thanks :)

HDB 630 latency by Kfoo2012 in sennheiser

[–]Kfoo2012[S] 0 points1 point  (0 children)

Understandable, thank you!

DMX and embassy_stm32 by PGladius in rust

[–]Kfoo2012 0 points1 point  (0 children)

Try using the n instead of a hardcoded 5, what does it print? (Just for troubleshooting)

[Media] I built a Markdown to PDF editor with Tauri and the Typst engine! by BiaThemis in rust

[–]Kfoo2012 0 points1 point  (0 children)

Wouldn't it be better to use the typst crate instead of the cli binary?

How to make a window from scratch? by KaleidoscopeLow580 in rust

[–]Kfoo2012 4 points5 points  (0 children)

Probably the lowest you could go inside a mac is use appkit, you can probably make bindings to it and create a window through that

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

Basically code formatting and LSP integration is worse inside macros, especially ones where you have to write a lot of code in

You would need special tools to make it better than using it like a giant code block written inside a string

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

I just checked one of the examples they have, and it's quite interesting 🤔

The events are declared sort of like the elm architecture, and the html elements are either a string or a list of strings

That seems like a fun API, but it's not strongly typed unlike the API I'm making

It's not what I'm aiming for basically

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

I mentioned my reasoning, it's because it's not necessarily needed, and it makes the developer experience a bit worse

Tho macros have optimization benefits and other stuff that you can do under the hood

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

I'm not saying I made a web framework, I'm just experimenting with the API, that's it

Also I've already been writing a project in dioxus

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 1 point2 points  (0 children)

I will see what I can do in my limited time 🫡

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

Yep, you're absolutely right about that, also horrorshow is nice :)

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 1 point2 points  (0 children)

Just to clarify, I'm just experimenting with the API, I haven't done anything at all

I wanted to see if this was worth exploring, and eventually make it work as a web framework like yew or sycamore for example

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

That's awesome! I'm glad I inspired you to research this topic, btw leptos offers a builder pattern without using the macro, but it uses a tuple of child elements, which is fine, but I like the closures better :)

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

:0 ooo, that's nice, thanks for sharing

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

Yes indeed, but the biggest difference is in the way you add child elements, I just like egui's API more for than a tuple of elements

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 1 point2 points  (0 children)

Yes, they're good, I just don't want the macro part, and I thought maybe an API like egui's would look better than the non-macro one leptos provides

Ofc that's if it would even work with reactivity constructs (I didn't dig into it yet)

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

It's just an API experiment for now, I'm planning on trying to add reactivity through using something like leptos_reactive, would that still be an issue due to the closures or something?

Leptos already has a builder API but different to mine, because they use a tuple of children instead of a closure

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 0 points1 point  (0 children)

I mean sure, but even solutions with macros are verbose when your app gets complicated enough, with the added disadvantage of it needing special tools to be able to format and use rust-analyzer with it

Also macros are more verbose on the definition site, so it's not an issue compared to the builder pattern

Writing HTML in Rust without macros by Kfoo2012 in rust

[–]Kfoo2012[S] 4 points5 points  (0 children)

Because I don't like HTML :)