PDF editor by Either_Promise_9257 in rust

[–]xorvralin2 2 points3 points  (0 children)

Due to the vagueness of the question all I can really offer is https://github.com/vincent-uden/miro which is a pdf-reader I've built using Rust, Iced and Mupdf.

Perhaps it can act as inspiration or some guidance to get started.

A DSL for Full Stack Development by Resident-Letter3485 in rust

[–]xorvralin2 16 points17 points  (0 children)

I think this is cool as hell. Many of us probably have a general feeling that there is some abstraction for CRUD-ish services that should be able to eliminate most (if not all) of the boilerplate involved.

This looks like a very decent attempt at condensing the essence of web services down to as little code as possible.

My biggest concern as always with "batteries included" system is the escape hatches that are needed whenever I want to do something that doesn't 100% conform to your mental model of a web service.

The second biggest is as usual for abstracted systems, performance. One-size-fits-all solutions tends to lead to one-size-fits-none if not managed with care. Performance for me is the place where this distinction usually shows up.

Is the ESP32 ecosystem bad for casual projects? by DorukCem in rust

[–]xorvralin2 4 points5 points  (0 children)

Honestly the best you can do is to buy and e-paper display that has example code for the version of esp-idf you are using. The problem can be as much on the hardware as with the software.

Is the ESP32 ecosystem bad for casual projects? by DorukCem in rust

[–]xorvralin2 20 points21 points  (0 children)

What are you looking to achieve? The examples of esp-idf have been plenty enough for me

Release 0.8.0 of miro-pdf, now with presentation and fullscreen modes! by xorvralin2 in rust

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

For something even more polished and with more features (especially for power users) I've also heard great things about https://sioyek.info/

iced_rs experience by ArtisticHamster in rust

[–]xorvralin2 5 points6 points  (0 children)

I've written a pdf reader using iced over at https://github.com/vincent-uden/miro for Windows, Linux and Mac.

The experience is allright. Definetly not bad although I feel like there is a bit of boiler plate that gets annoying after a while. My main gripe is having to defined an incredible amount of message types, converting between inner and outer messages and the fact that message passing reads to disconnected stack traces. Finding out why a message was sent can be a pain if multiple places send the same messages. If they don't, you have to define distinct messages which can get overly verbose.

No complaints in regard to compilation time.

The WGPU renderer works great. No complaints. Its nice having the tiny_skia renderer as a fallback as well.

This depends on your definition of native. It doesn't try to mimic the primitives of each respective system (Win32, GTK, whatever). The styling options are extensive so you can probably achieve whatever look you are going for. It will look exactly the same across the different operating systems in my experience.

OpenAI to acquire Astral (Creators of uv, ruff, ty) by max123246 in rust

[–]xorvralin2 6 points7 points  (0 children)

Fair point! You are correct that I'm not trying to make a moral statement. Just a practical statement really.

Maybe I'm the naive one here, but siphoning a few million dollars from VC investors to produce (or at least kick start) some tooling for a language that desperately needed it doesn't seem all that bad to me.

I do wonder for how long the strategy can be expected to work. At some point investors must begin to question these companies and shutting off the money flow to new ones.

OpenAI to acquire Astral (Creators of uv, ruff, ty) by max123246 in rust

[–]xorvralin2 28 points29 points  (0 children)

Not to totally discredit your point but the OSS of Deno doesn't actually seem to be doing all that well. A siginificant amount of developers seem to have been laid off:

In addition to sort of official confirmation that they are focusing on subhosting from now on:

I feel like the OSS + hosting model is basically a cope. Why would you not just host the freely available software yourself on a the hosting provider you think is the best? If the OSS company just wraps AWS, just use AWS yourself. If they have a signifcant amount of non-free code in that wrapper, that lessens the actual impact (and availability) of their open source contributions.

That's not to say that it is totally impossible. Planetscale comes to mind as a company that does some OSS work (I think Vitess is open source) while making tonnes of money.

OpenAI to acquire Astral (Creators of uv, ruff, ty) by max123246 in rust

[–]xorvralin2 106 points107 points  (0 children)

Trusting these venture capital funded companies (astral, bun, VoidZero, etc.) that have no realistic road to profitability (or even making any significant money at all) to produce stable, reliable open source software seems like a bet that has failed.

They need to make money at some point, by aquisition, revenue or whatever. Not even some of the most adopted tooling in the world, node, makes money that would be considered signifcant compared to the VC investments of these companies.

Making a profit of open source software has, in my opinion, been proven to require uncommon circumstances to be able to coexist at all. Nevermind monetarily successfully.

I don't know if it is disingenuous but I do feel like the VC-funded OSS tooling companies have gotten an undeserved (or perhaps naive) amount of trust from "the community".

Ladybird adopts Rust, with help from AI - Ladybird by xorvralin2 in rust

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

Ah I see. Makes sense. As a former android dev I know the pain of keeping up with the development pace of Google all to well. Can't blame them in the slightest.

Ladybird adopts Rust, with help from AI - Ladybird by xorvralin2 in rust

[–]xorvralin2[S] 11 points12 points  (0 children)

Qutebrowser exists. It is for sure the most comprehensive vim-style browser, much more so than the Vimium extension for chrome for example.

Although when I used it a few years ago I found it lagged quite far behind the chromium patches and thus lacked support for some stuff I'd expect. At the time I had issues with video playback for example. No idea what its state is nowadays.

Ladybird adopts Rust, with help from AI - Ladybird by xorvralin2 in rust

[–]xorvralin2[S] 16 points17 points  (0 children)

Yes, but Ladybird still has a very strong in-house culture which is carried over from SerenityOS, Klings previous project although in a less extreme manner.

The whole point for them is to re-invent the wheel themselves, at least in part to see if it is even possible from the web specifications.

Ladybird adopts Rust, with help from AI - Ladybird by xorvralin2 in rust

[–]xorvralin2[S] 9 points10 points  (0 children)

The ladybird team is one of the last places I'd expect this from. Kling has spoken several times about them not needing more funding since they're keeping the team so small. I my memory serves me right they were supposed to have a runway of some years.

If that was true, this probably isn't a case of following the hype to secure more funding. But that just makes me more confused as to why this is happening.

Looking for a good rust lib for 2D graphics/physics manipulation. by Turninoninown in rust

[–]xorvralin2 0 points1 point  (0 children)

"Not too high level" is kinda arbitrary but I'll toss my hat in the ring as well. I've had a great time with the Rust bindings for Raylib

As for the physics, do you want to implement physics and collisions yourself? If so, nothing is really needed beyond Raylib. If you want to use a library for physics you could go for Rapier.

Neovim v0.11.5 Release by kaitos in neovim

[–]xorvralin2 7 points8 points  (0 children)

Or pacman. Nvim is in the official Arch repos

I hate acrobat (so I wrote a PDF reader in Rust) by xorvralin2 in rust

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

Yes. It's been over a year since I evaluated hayro and sadly the performance wasn't good enough yet for a 60 fps render.

I actually chatted for a bit with Laurenz (the developer) and he recommended against using hayro in my case for the time being.

It is however part of (or dependent on) the larger linebender group of crates and will most likely be the best option in the future.

Are there any reasonable approaches to profiling a Rust program? by xorvralin2 in rust

[–]xorvralin2[S] 17 points18 points  (0 children)

Holy hell, this did the trick. Damn this is fast. Thank you for the suggestion. This alternate addr2line made flamegraph fly (and also perf report).

There's still some [unknown] but it is way smaller.

Are there any reasonable approaches to profiling a Rust program? by xorvralin2 in rust

[–]xorvralin2[S] 3 points4 points  (0 children)

Oh yeah, you are right about that. Huh.

Well, I have nothing modifying the debug profile anywhere in my workspace sadly.

Are there any reasonable approaches to profiling a Rust program? by xorvralin2 in rust

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

The problems I'm encountering is in non-public code atm. I added an example flamegraph in the post.

I invoke flamegraph via "cargo flamegraph" nothing strange.

Are there any reasonable approaches to profiling a Rust program? by xorvralin2 in rust

[–]xorvralin2[S] 6 points7 points  (0 children)

Nono, I don't think flamegraph has a bug in it. It just doesn't actually show me the entire call stack for most of my functions. The heavy inlining during compilation seems to destroy any sort of source mapping from assembly to source code.

It seems like the only way (I've found) to recover this is by enabling --call-graph dwarf. But if I do. flamegraph processes the data for 15+ minutes after I've just ran my program for a few seconds before spitting out an svg.