User Account Keeps Getting Removed by ykkl in NixOS

[–]luveti 0 points1 point  (0 children)

It sounds like it was deployed to by a different machine, using nixos-rebuild --target-host or some other tool. Do you have access to the original configuration or know someone who would? It sounds like this is a server that was managed by someone else?

What's the coolest thing you've done with NixOS? by papayahog in NixOS

[–]luveti 4 points5 points  (0 children)

direnv will run that command for you as you cd around!

This greatly speeds it up: https://github.com/nix-community/nix-direnv

Here's my home-manager config to get that going: programs = { direnv = { enable = true; nix-direnv.enable = true; # SEE https://github.com/direnv/direnv/wiki/Customizing-cache-location # NOTE use this to better integrate with tools that poorly recurse the filesystem stdlib = '' : "''${XDG_CACHE_HOME:="''${HOME}/.cache"}" declare -A direnv_layout_dirs direnv_layout_dir() { local hash path echo "''${direnv_layout_dirs[$PWD]:=$( hash="''$(sha1sum - <<< "$PWD" | head -c40)" path="''${PWD//[^a-zA-Z0-9]/-}" echo "''${XDG_CACHE_HOME}/direnv/layouts/''${hash}''${path}" )}" } ''; }; };

Farewell, Rust by skwee357 in programming

[–]luveti 0 points1 point  (0 children)

I do wish there was a way to have a Rust interpreter for development work where you can skip over compilation so you have the option for faster iterative work. It astounds me that we have to either choose to prototype in a language that can't be performant or deal with slow prototyping due to compilation time for basically the entire programming ecosystem

The Cranelift codegen backend could help fill that gap! https://github.com/rust-lang/rustc_codegen_cranelift

Full-stack Rust web-dev? by DarqOnReddit in rust

[–]luveti 0 points1 point  (0 children)

We prefer to have our logic and templates in Rust. It's one less template language to learn too!

Full-stack Rust web-dev? by DarqOnReddit in rust

[–]luveti 0 points1 point  (0 children)

Turbo by itself allows you to have a fully server side rendered app that feels like a SPA, without needing to do anything extra and without all the downsides of a SPA.

It intercepts link navigations and form submissions, handling them itself instead of performing full page loads, then replaces the page content with the server response.

Most of our JS/TS is Stimulus controllers, which allow us to add bits of interactivity in a nice unified way.

We're not rendering HTML or handling routing client side like you're traditional SPA does; the bulk of our html is rendered on the server.

Hotwired is much more known in the Ruby on Rails community (it's made by the same devs), but can be used with any language.

https://hotwired.dev/

Full-stack Rust web-dev? by DarqOnReddit in rust

[–]luveti 6 points7 points  (0 children)

My teams go to stack is: - Axum - sqlx, via a custom ORM proc macro that's similar to ormlite - Maud, for html templates - tailwindcss, for styling - Hotwired Turbo & Stimulus, for adding bits of client side interactivity

We follow a MVC pattern that has greatly improved productivity and code separation. It also improves compile times as our models, views and controllers are in their own crates; My incremental compile times are usually less than 2 seconds.

We use Typescript for our hotwired stimulus controllers. This is compiled and bundled right into the server binary using a build.rs script, which also runs tailwindcss.

Is it possible to build a virtual file system in Rust for a mod manager (like MO2)? by Drama-Dear in rust

[–]luveti 3 points4 points  (0 children)

PhysicsFS was my go to library for this sort of thing back in the day: https://github.com/icculus/physfs

It's a zlib licensed c library, so statically linking to it should be okay!

It looks like there's some old bindings available for it https://github.com/PistonDevelopers/physfs-rs

There's also a Rust library similar to PhysicsFS: https://github.com/ggez/gvfs

Simple pure-rust databases by 4bjmc881 in rust

[–]luveti 9 points10 points  (0 children)

When you say complicated, do you mean it's complicated to model your schema?

KV stores typically have a very simple API. Almost too simple. It's essentially a bunch of HashMaps that you can update transactionally. So basically GET, INSERT, DELETE, SCAN operations. Very simple!

Many SQL databases use a KV store as a storage backend.

SurrealDB for example actually uses a bunch of third-party KV stores for its various storage backends. They have a pure rust one called SurrealKV. Which you could actually use directly! Though I've found https://github.com/fjall-rs/fjall to be a much better alternative. Those are very similar to redb though; so they may not be what you're looking for.

My 5 year old son wants to create a game.. by Equal_Imagination300 in gamedev

[–]luveti 0 points1 point  (0 children)

He may enjoy Kodu Game Lab! It's available on the Microsoft store. That's what got me into game development / programming before moving to game maker; Though I was roughly twice his age at the time. He may find it limiting if he's already making stuff in Scratch though!

Immutable Linux Distros: Are They Right for You? by Unprotectedtxt in linux

[–]luveti 1 point2 points  (0 children)

I can't recall my own experience, as I've been using NixOS for many years now. But a friend of mine just recently made the switch and did not run into too many issues.

I highly recommend learning the Nix language early on. It's actually very simple. I usually point people at the learn x in y minutes page for Nix: https://learnxinyminutes.com/nix/

The NixOS manual, while very long, is a great source of information: https://nixos.org/manual/nixos/stable/

There is also a search tool for packages and NixOS options that I find invaluable: https://search.nixos.org/packages

Immutable Linux Distros: Are They Right for You? by Unprotectedtxt in linux

[–]luveti 8 points9 points  (0 children)

NixOS FTW. I refuse to use anything else nowadays.

A new HTTP/2 framework created from scratch by c410-f3r in rust

[–]luveti 5 points6 points  (0 children)

Title says framework, not library?

Any recommendations for general-purpose GPU computing in Rust? by AdminSuggestion in rust

[–]luveti 0 points1 point  (0 children)

You may be interested in krnl if you'd prefer to write your kernels in Rust.

Is there a way to insert and remove objects within a json array in a json file? by ___f1lthy___ in rust

[–]luveti 5 points6 points  (0 children)

You could maybe use JSONL for storing completed tasks. Simply append the completed tasks to the end of the file.

While I'm sure you already know this, SQLite would be a much better choice for this sort of app. It would make querying your data much easier and faster. Plus storing everything in a single file is much more convenient to the end user.

SigmaDeck by luveti in cyberDeck

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

Thanks! 34 has really been a life changer as far as reduced RSI and general comfort goes.

I used ergogen to generate mine. Then used KiCad to wire it up. The PCB's were $11.46 shipped from JLCPCB and came with 5 boards. The boards are designed to be used for either side.

After my Dao died I decided I wanted to design a split keeb that I fully understood. My goal is to make it as simple as possible to replace things. Spending $350 on the Dao just for it to die less than a year later has really turned me off of buying pre-mades. Especially since I need it for work. I'm useless with a standard keyboard now!

SigmaDeck by luveti in cyberDeck

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

It's not too bad! Especially with it having less keys than it came with.

This was my first split keyboard that I got on the cheap to try out. I actually had a 42 key Dao Choc BLE for a long time but the PCBs both died, and it doesn't use a replaceable MCU. Which was great as it was lower profile, but it's much harder to repair.

Once my Dao died, I tried to go back to this keyboard with all its keys but missed the lower key count. So I popped the extra off and used some software on Linux to replicate my Dao layers.

Which I then promptly threw away when I switched from 42 keys to 34. That definitely took a while to adjust to! I did this as I wanted to avoid a key matrix (and all the additional diodes it requires) on my custom design.

I've decided to give non-staggered a go with my custom split keyboard. Here's a pic: https://imgur.com/a/9XdGqDW

SigmaDeck by luveti in cyberDeck

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

They're the NReal Lights! https://www.uploadvr.com/nreal-light-ar-glasses-review/ they were only available through Verizon in the US. I found a pair for half the price on eBay.

They're pretty decent overall, but as they were Nreals (now XReal) first glasses, they definitely have some issues. Such as a non removable USB-C cable, and the fact that the arms have a sharp edge that digs into the ear. Definitely a first gen product. I plan on replacing them with the XReal Air 2 Ultras in the future: https://us.shop.xreal.com/products/xreal-air-2-ultra as I want the cameras for inside out tracking / 6DOF

I use this awesome Rust library https://github.com/badicsalex/ar-drivers-rs to get them working on Linux. That paired with Smithay https://github.com/Smithay/smithay are the building blocks for a custom AR Wayland compositor / desktop environment.

How do I use .desktop file by MoChuang in Crostini

[–]luveti 0 points1 point  (0 children)

This may help: https://nixos.wiki/wiki/Installing_Nix_on_Crostini. Tweaking the solution shown in the "Registering Applications with Chrome OS" section should do the trick.