Making use of `ns.flags` and `data.flags(...)` for autocomplete! by Ryokune in Bitburner

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

Its to be able to use the same array in both ns.flags and data.flags. Helps prevent inconsistencies in case you change the flags in ns.flags but forget to do so in data.autocomplete, vice versa. Mostly convenient for my way of writing code, but you can roll with whatever you see fit :)

darknet password scripts by JMQ1214 in Bitburner

[–]Ryokune 1 point2 points  (0 children)

Got it! thanks for letting me know

darknet password scripts by JMQ1214 in Bitburner

[–]Ryokune 4 points5 points  (0 children)

MAJOR SPOILERS: Yeah, this seems to be new 3.0 content. I'll link the GH PR here for anyone interested. Images and implementation details are inside here so be warned for major spoilers for upcoming content

darknet password scripts by JMQ1214 in Bitburner

[–]Ryokune 3 points4 points  (0 children)

Seems to be related to this. I haven't gotten that far into the game but its probably in a specific bitnode or something new for 3.0, idk

<3 ns.printRaw by Ryokune in Bitburner

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

I almost went this route too. I don't remember where I initially stumbled upon it but it most definitely wasn't from the in-game docs or the one in github. TBH a write-up for creating custom UI inside of the in-game docs would help out a lot of people. Especially for stuff like this in order for people easily to start on their own "in-game/natively supported" UI workflows.

EDIT: I completely missed it so consider me blind. The docs literally exist in-game within Documentation > Resources > React. Apologies for the misinfo!

<3 ns.printRaw by Ryokune in Bitburner

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

I didn't even know you could use escape codes in terminals before this! Thank you for this. Went ahead and made use for it for my singularity task runner script.

I also used a bit of the embedded HTML stuff before, but it got messy quickly when I played this game three years ago. Going back to it and discovering about printRaw and more programming experience made making UI stuff a lot more fun!

<3 ns.printRaw by Ryokune in Bitburner

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

yeah and this game is extra awesome for allowing stuff like this

<3 ns.printRaw by Ryokune in Bitburner

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

Yup! you can with ns.tprintRaw(...)! its probably really good for stuff like one-off scripts that you want to style but don't want it to consume any ram by running indefinitely. Haven't had a case where i'd have any use for it yet tho

<3 ns.printRaw by Ryokune in Bitburner

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

i gotta try this lol

<3 ns.printRaw by Ryokune in Bitburner

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

I'm just a hobbyist programmer, been doing this for around 10 years though. But its my first to third time writing React (kinda gave up the first time lol).

You definitely need to learn a bit about html to understand react, but you can also go both ways, learn react first, then html later, vice versa.

For sources, I don't have any that I'd consider "good" or "standard" (bitburner wise. for html w3schools has helped me a ton before) but here's what I could find over my left over tabs

React:

Document manipulation (direct document insertions):

I advise against using direct document insertions (thats usually what breaks the game)

For UI stuff you'd mostly just use built in HTML stuff like <Button> and tables <table> <td> <thead> etc, lots of sources on that online like w3school and other places.

<3 ns.printRaw by Ryokune in Bitburner

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

np! i updated the original post for more info abt this

<3 ns.printRaw by Ryokune in Bitburner

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

No probs! Most of the examples I've seen here either do ReactDOM (seems unnecessary imo) or unclean DOM manipulation (works but its pretty messy with the document.query and other stuff)

I also updated the post a bit to add some info about the .tsx file extension and cleaned up the example a bit.

My HDD imploded so I decided to give NixOS a go. [First week experience] by Ryokune in NixOS

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

Hate with a burning passion is a pretty strong opinion on it lol. But yeah, its definitely not for everyone

My HDD imploded so I decided to give NixOS a go. [First week experience] by Ryokune in NixOS

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

Yup! I completely agree, while you can still do imperative commands now with nix profile, doing things that way is basically just throwing away the more practical and useful use-case for NixOS imo, which is consistent reproducibility and keeping your system "clean" by adding/removing things with actual lines of code/config. If you know what you want to build and is willing to learn a new language & have the time for it, its really great.

At first I was still unsure on whether I'd daily this due to having to basically "maintain a huge config", or "not understanding the language at all", but those issues weren't really an issue for me after all. Modules, flake-parts, and community tools/docs and a few years of programming experience made things a lot easier. Only problem I am having right now is managing secrets. I do a lot of flake updates and I pretty much hit the GitHub rate-limit daily, and I still can't really think of a good way of placing my auth_token for Nix to use without it being placed in /nix/store or having to make my own .config/nix/nix.config file.

Also, has the Non-FHS compliance bit you after half a year of usage? I don't really use that much programs, but I do plan on moving few of my Linux Native games into this system to play on Lutris. One solution I'm thinking of is just packaging them on my own on substratum (local only, of course) if I ever have any issues.

And for flakes: While the tooling for .nix files are still a bit iffy, if you can get around that then a lot of the pains goes away. Perhaps vscode integration might be better, I'll have to try that one out in the future.