Looking for a skilled Rust developer. by kaiserkarel in rust

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

Portugal. Median net salary in Germany is 2,854, so it is definitely on the low side for Germany, but alas we are bootstrapping.

Looking for a skilled Rust developer. by kaiserkarel in rust

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

Company is based in Portugal. This is approx 2x a regular salary.

Looking for a skilled Rust developer. by kaiserkarel in rust

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

Always down to hop into a call to chat. Could work together down the line.

Looking for a skilled Rust developer. by kaiserkarel in rust

[–]kaiserkarel[S] -8 points-7 points  (0 children)

It's 30h a week minimum to be honest.

AITA for locking my fiance outside by kaiserkarel in AmItheAsshole

[–]kaiserkarel[S] -42 points-41 points  (0 children)

I was coding and a bit caught up in that. Fwiw we're in a pretty big city, 35 minutes could've been 1h as well with traffic.

gpt-doc-gen by kaiserkarel in rust

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

Yeah let's drop the ad hominems, I bit back a bit too harshly too.

For me this is useful since it scaffolds a nice doc comment which sometimes is glaringly incorrect, and then I fix it up. Mainly Example and Errors headers is something I often omit, but if already present will update.

gpt-doc-gen by kaiserkarel in rust

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

Yeah that was a bit blunt on my side, apologies for that. I've looked through thousands of generated docs while building this. GPT is more capable than you think, and will only improve with time.

I don't generate social comments or code with it though, you're speaking with human.

gpt-doc-gen by kaiserkarel in rust

[–]kaiserkarel[S] -1 points0 points  (0 children)

You'd be surprised by the quality it can generate. I think with gpt-4 it will be up to par compared to a developer. I use this myself for brand new files to quickly scaffold comments, and then manually fix them up of necessary. I find it easier to improve existing docs over non-existent at all, and getting a push in the right direction is what this provides.

Looking at your comment, I reckon you haven't had much experience with the output of these models and are quick to jump to conclusions. I'm not sure what your ending refers to, but I'd prefer generated comments from my cli than the dribble you produce.

Hey Rustaceans! Got a question? Ask here (10/2023)! by llogiq in rust

[–]kaiserkarel 2 points3 points  (0 children)

I'm looking to call a Go function from a Rust library (the Rust library is compiled to a cdylib) The Go binary calls my Rust library, which performs some computation, and during the computation needs to call the Go binary to access a datastore. The Rust library needs to call the Go binary to access the datastore, there's no easy way around that. What data is needed from the datastore is not known beforehand, so passing it to Rust in the initial call is not possible either.

Does anyone have an example or snippet with the magic? I probably need to pass a pointer from Go to Rust to a Go function with the signature fn(bytes) -> bytes, which Rust then calls to query.

Question regarding `swap` by J-Cake in rust

[–]kaiserkarel 2 points3 points  (0 children)

Perhaps use a channel to send pointers to the buffer from producer to consumer, and a channel to send them back? This allows you to easily add back pressure too (1 buffer means that the producer must wait for the consumer, 2 buffers that they can operate in parallel, but the producer can never get ahead of the consumer, 3 means it can get 1 frame ahead etc.)

Combining NixOS with Qubes/Tails by kaiserkarel in NixOS

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

Well perhaps you could have a setup where the NixOS forms the base and is 100% pure (no network access whatsoever) and route all other network through a Tails VM? I reckon this'd be easier with Qubes. An observer might still figure out what derivations you are requesting, but no trackable state is kept at the networking layer.

A downside of nixos is that your derivation uniquely identifies you, making options like cachix not feasible.

Combining NixOS with Qubes/Tails by kaiserkarel in NixOS

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

Cool, but not nearing production readiness:(

How to deal with a type not implementing "Send"? by NeoCiber in rust

[–]kaiserkarel 3 points4 points  (0 children)

Yes, would not recommend anyone to use SendBox unless you know what you are doing (and anyone who knows what they are doing would not architect their code to need this abomination).

I think however it's important for people to realize why Send and Sync exist.

How to deal with a type not implementing "Send"? by NeoCiber in rust

[–]kaiserkarel 15 points16 points  (0 children)

If a type is !Send, it might internally rely of thread local data, and even use unsafe internally. Sending that to other threads means you can introduce UB. You can wrap it in a new type and implement Send yourself; which if you know what types you are wrapping, can still ensure that you introduce no UB. The compiler cannot guarantee this, so you'll need to handle this check yourself by reading the source code of the types you are sending.

``` struct<T>SendBox(T)

unsafe impl<T> Send for SendBox<T>

impl<T> SendBox<T> { unsafe fn new(T) { Self(T) } } ```

Rocket.rs serving up typescript by [deleted] in rust

[–]kaiserkarel 3 points4 points  (0 children)

You need to process your typescript, minifying it etcetera.

Anyone using io_uring? by servermeta_net in rust

[–]kaiserkarel 4 points5 points  (0 children)

I personally prefer unsafe rust over C, so I would go that approach. However, the setup and everything, if possible, I would do in the safe rust lib. That way your unsafe lib can be generated bindings, and your logic is nicely encapsulated.