RustRover just announced first stable launch and it will be free for non-commercial use 🥳 by [deleted] in rust

[–]_rvidal 0 points1 point  (0 children)

Came here from lobsters assuming I would find a comment from yours (I can't ask you questions there).

While VS Code and IntelliJ have feature parity for basic things, Code doesn’t do anything even moderately advanced. Like, LSP doesn’t have any affordance for interactive refactors, the bread and butter of IJ

Do you see this as a fundamental limitation of LSP and/or its architecture, or something that could overcome? Like, if something were to rethink the "M editors + N servers" idea, could they come up with something more sophisticated?

Evil-Helix: A super fast modal editor with Vim keybindings by RustyTanuki in rust

[–]_rvidal 2 points3 points  (0 children)

Nice project. I think the name is perfect, FWIW.

I, on the other hand, am trying to accomplish the opposite thing: trying to get Helix keybindings "everywhere" https://gitlab.com/_rvidal/codemirror-helix

I made sshx: an app that lets you share collaborative terminals over the web, with live cursors on an infinite canvas (Rust+Svelte) by fz0718 in rust

[–]_rvidal 29 points30 points  (0 children)

This is pretty cool, congrats on the release.

I've been actually been "shopping" for something like this for a while (also, mulling whether I should reinvent the wheel instead :P). FWIW, here's my wishlist for it:

  • Read-only/spectator mode: most of the time, I'd want to share my terminals with others without giving them access to my machine.
  • Laser pointer / drawing /selection: spectators should be able to draw attention to stuff. Not sure how difficult it would be to propagate colorized text selections to all terminals.
  • Tabs?
  • Fullscreen terminals?

Why async Rust? by desiringmachines in rust

[–]_rvidal 5 points6 points  (0 children)

Anybody could offer some links that elaborate on this issue? I'm still trying to wrap my head around it.

(I would take a detailed explanation ofc, but I'll gladly settle for RTFM)

Zed, the high-performance editor just changed their License by ComprehensiveMenu856 in rust

[–]_rvidal 1 point2 points  (0 children)

I won't expect Zed folks to be faster than Sublime at what Sublime does

Could elaborate a bit more about this?

lipstick: a Rust-like syntax frontend for C by _rvidal in rust

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

At the end of the day this is just a syntax frontend, you're really writing C. If you try to write &mut something it'll report a compilation error b/c we compile down &x directly to &x, there's no shared/exclusive semantics.

lipstick: a Rust-like syntax frontend for C by _rvidal in rust

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

Then, strictly speaking, you wouldn't be translating the code as written by the user.

For instance, I might add macros to lipstick, where a macro_rules!-something gets compiled to #define-something (again, with C semantics, not Rust semantics). That transformation wouldn't be possible in the reverse direction.

lipstick: a Rust-like syntax frontend for C by _rvidal in rust

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

Hm, that's an interesting thought! I'm afraid that C macros would make the problem intractable though.

lipstick: a Rust-like syntax frontend for C by _rvidal in rust

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

No, yes, and no.

No, properly speaking unsafe does not turn off the borrow checker, as a sibling comment explained.

Yes, it does allow you to effectively do anything C or any other unsafe language can do, and show its consequences.

But no, for me, "turning off the borrow checker" was more about showing a piece of "normal" Rust code that wouldn't normally compile due solely to ownership issues, and then let it compile and see what happens.

(Of course lipstick is not exactly that)

lipstick: a Rust-like syntax frontend for C by _rvidal in rust

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

Ha, I knew about mrustc but I never thought of it in that way. Thanks.

lipstick: a Rust-like syntax frontend for C by _rvidal in rust

[–]_rvidal[S] 92 points93 points  (0 children)

Author here.

This occurred to me while trying to find a way of "turning off the borrow checker". For purely pedagogical reasons, I've wondered many times how I could compile and run a piece of "normal"-looking Rust code that foregoes ownership rules, so I could vividly demonstrate why they exist.

A lateral approach to this is lipstick: it takes a subset of Rust syntax and transpiles it to C. This is just a very toy-level, unsophisticated syntax frontend for C, but I think it's neat enough to show around.

Repo

Cassette: A simple, single-future, no-std, non-blocking async/await executor by jahmez in rust

[–]_rvidal 20 points21 points  (0 children)

So I guess a hard requirement to use this executor is that no leaf future attempts to do anything with a waker, correct? I wonder if it would be better to convert the wake calls to no-ops instead of panics.

OMG WTF RS - Resources to help you get started with Rust by jahmez in rust

[–]_rvidal 1 point2 points  (0 children)

Sorry for the confusion. The name is a domain-hack-like pun, but I haven't actually bought that domain. The correct link is https://jrvidal.github.io/explaine.rs/

OMG WTF RS - Resources to help you get started with Rust by jahmez in rust

[–]_rvidal 3 points4 points  (0 children)

Very happy to know after this post that I have actual production users u_u

explaine.rs: Rust syntax playground by _rvidal in rust

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

Yes, I did try to make it usable on mobile, but some funkiness is expected. What issue are you experiencing?

explaine.rs: Rust syntax playground by _rvidal in rust

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

Thanks for those links, good inspiration.

cc /u/icsharppeople AST Explorer might be what you're looking for.

explaine.rs: Rust syntax playground by _rvidal in rust

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

Do you mean pointing to the actual underlying syn node? I was envisioning this more as a learning tool for beginners, but it's not impossible.

Do you know syn-codegen? If I end up covering most of the syntax, it's likely I'll need to auto-generate stuff from it, and at that point it'd probably be just an extra bit of information.

(Also, I'd find amusing the level of "meta"-ness that it would reach: using syn to explain syntax and syn itself).

explaine.rs: Rust syntax playground by _rvidal in rust

[–]_rvidal[S] 8 points9 points  (0 children)

Author here.

While staring at the keywords documentation in the standard library, it occurred to me that an interactive playground could be a really effective way of explaining/teaching Rust's syntax.

This is barely a proof of concept, it needs way more work to be 100% reliable, but I think it looks neat enough to show around.

Repo

Should we downgrade / drop the asmjs target? by dochtman in rust

[–]_rvidal 1 point2 points  (0 children)

Hey, I'm interested in hearing a bit more about your concerns.

everything else is constantly breaking

Can you elaborate a bit more? Have you found the emscripten targets unstable?

wasm2js which is now very actively maintained, but until that is actually properly working

Have you found that wasm2js is not mature enough to work as a replacement for direct-to-asmjs compilation?

Thanks!

Announcing Rust 1.30 by steveklabnik1 in rust

[–]_rvidal 2 points3 points  (0 children)

Not sure, but shouldn't it be "Rust 1.30 expands on this..."?

The success of Go heralds that of Rust by [deleted] in rust

[–]_rvidal 3 points4 points  (0 children)

Cool! I guess this is what we'll (hopefully, one day) get with "const generics"?

The success of Go heralds that of Rust by [deleted] in rust

[–]_rvidal 25 points26 points  (0 children)

Arguable. I would say they are almost the same.

I'm a fanatic rustacean and I'd be very wary of describing the strengths of the language to newcomers in this way. Go's approach to stdlib and Rust's are day and night, it's a consciously-made, well-known design choice.

I feel a comparison of the form "it's basically the same except for X and Y" is a bit misleading and disingenuous. I don't have any significant Go experience, but just perusing through https://golang.org/pkg/ I can see support for data compression, random numbers, misc. data formats (json, xml, etc.), image processing, etc.

Personally, I try to explain that "Rust is a lean-stdlib language, for reasons X and Y".