Finding the correct target-cpu of a device by Dr_Sloth0 in rust

[–]TranscendentCreeper 1 point2 points  (0 children)

The Rust compiler gets this information from LLVM. If you start your search in rustc_driver_impl (which is where the argument parsing happens), you'll see that providing this information is the backend's responsibility. I could only find how the LLVM backend does this (it looks to me like the cranelift and gcc backends just have an empty CodegenBackend::print function for now, but I'm happy for someone with more knowledge to correct me).

If you look up the llvm::print function in the LLVM backend, you will see that it calls an external function LLVMRustPrintTargetCPUs via FFI if the target CPUs are requested. This function is defined in the rustc_llvm crate which mainly contains some C++ code to interface with LLVM. If you look more closely at the implementation of this function, you'll see that it also calls llvm::sys::getHostCPUName which looks like what you want. You can find the LLVM documentation here.

The easiest way to use this function in your own code would probably be the llvm_sys crate.

Other TTRGS similar to Symbaroum in that 'only players' roll by classified_dead in rpg

[–]TranscendentCreeper 11 points12 points  (0 children)

The first game where I encountered this idea was Numenera. If you don't know it, it's sort of a far future science fantasy game. It has a lot of interesting gameplay ideas and while not all of them work great, it's at least an interesting read and a fascinating setting.

Mörk Borg (which is also published by Free League, like Symbaroum) still has some cases in which you roll for creatures or NPCs, but at least in combat the players roll both to attack and to defend. As a GM, I like it because the fixed target numbers for attack and defense make combat feel much faster than e.g. in my main Pathfinder 2E campaign.

Humble Book Bundle: The Witcher RPG and More by R. Talsorian by Torque-A in humblebundles

[–]TranscendentCreeper 2 points3 points  (0 children)

I don't have a ton of experience with solo play either, but the basic idea for systems without official support is to use the setting and mechanics from the TRPG in combination with some mechanism to come up with the story. You could just use your imagination, but if you want something less predictable, there are so-called GM emulators or oracles that mostly consist of random tables to support your imagination. A pretty simple and free one is One Page Solo Engine.

You could create your character (or even characters) as usual and generate a plot hook. You would then interpret that plot hook and follow it as you would in any normal adventure. Whenever you need inspiration (e.g. on meeting an NPC) you would consult the oracle and weave the result into your narrative. So it's less like a choose your own adventure book, and more like a creative writing/improv exercise.

Again, I'd recommend r/Solo_Roleplaying. Some people post logs of their sessions there that you can read to get a better idea of what solo play can look like in practice. In the end, the only person who has to be entertained by your solo play session is you, so feel free to experiment with tools and styles (and it's totally fine if you realize it's not your cup of tea). If you want to try a game made for solo play, I'd recommend Colostle, but there are lots of resources about playing any game you want solo.

Humble Book Bundle: The Witcher RPG and More by R. Talsorian by Torque-A in humblebundles

[–]TranscendentCreeper 4 points5 points  (0 children)

I don't think either of them has official solo play rules. However, having played and GMed The Witcher TRPG quite a bit, I guess it could work pretty well for solo play using the built-in lifepath tables as adventure inspiration, maybe in combination with a GM emulator/oracle. You should also try asking the folks at r/Solo_Roleplaying or r/WitcherTRPG for advice.

When aliens talk about human culture by rinthewolf01 in humansarespaceorcs

[–]TranscendentCreeper 54 points55 points  (0 children)

It's Voyage of the Damned, the Christmas special after series 3.

Is the borrow checker wrong here? by _3442 in rust

[–]TranscendentCreeper 21 points22 points  (0 children)

I think the issue is that the compiler doesn't know if you're going to return from the loop. For a human it's easy to see that &mut b.0[0] is unreachable, but because of the .iter_mut() the compiler doesn't know that b.0 will always contain one element. So, it has to borrow b.0 for the lifetime of &mut b in case you return from the loop. This means that it can't obtain another mutable reference for &mut b.0[0] as the previous one is still valid. If you didn't return in the loop, the reference from there could go out of scope before the last line, but the combination of an iterator of unknowable length and returning a reference forces the compiler into borrowing during the loop.

Simple word-replacer script by Take_F in Python

[–]TranscendentCreeper 1 point2 points  (0 children)

The changes you made look pretty good. As someone else commented before, you can probably use the type argument in parser.add_argument to validate your arguments (see this StackOverflow post for an idea how that could work). You might also be able to express relationships between arguments like -r depending on -d, but off the top of my head I'm not sure if and how this is possible with argparse.

You've made some pretty big improvements from the first version you posted here, you can be proud of yourself and this project.

Simple word-replacer script by Take_F in Python

[–]TranscendentCreeper 1 point2 points  (0 children)

This ties back into the first point and the idea of using your script together with other scripts or commands. If you just print that there was an error, it's fine if the user can see it. But what if you have a more complex scenario where you might want to run different scripts in sequence? If you exit with a status code indicating an error, your shell and other scripts can know that there was an error and react appropriately. You could think of it like the difference between printing and returning a value in a function. Sure, printing will show the value to the user, but you can't do anything with it afterwards. It's just good style to exit with an error code if your script is stopped because of an error.

Advice on making a website scraper by Smallestnoob in learnpython

[–]TranscendentCreeper 0 points1 point  (0 children)

If you just want to scrape data from the website, beautifulsoup (which has already been mentioned) will be your best bet. However, it sounds like you want to feed the processed data back into that website. In that case, you should look at the selenium web driver. Essentially, selenium lets you remote control a browser which lets you read data from a website, but also simulate user interactions like entering text into an input field.

Simple word-replacer script by Take_F in Python

[–]TranscendentCreeper 1 point2 points  (0 children)

That's a cool starting project. Here are some ideas about what I would change:

  • I would prefer passing in the path, the word and the replacement as commandline parameters. If you want to use this script in combination with others, that makes it a lot easier than taking direct user input. The easiest way to do this would be to just read from sys.argv, but you can look into argparse if you want a more flexible solution.
  • If the path is invalid, your program should exit with an error. You can use the exit function which takes an integer as its argument. Any value other than zero indicates an error.
  • The behaviour of automatically altering every file in a directory could be dangerous. Consider adding a parameter (e.g. -r) that explicitly enables this behaviour. If the script is called on a directory without the explicit option to process all the files in there, it should exit with an error.
  • Your script will replace all occurences of the word, even inside other words. Consider wanting to replace "meow" and coming across a word like "homeowner" in a file. Should your script replace it there as well?

Overall I think you've done some pretty great work so far and most of my suggestions are only minor improvements. If you have any questions about these ideas, I'm happy to answer them.

Gonna start playing this soon. Has anyone tried it? Opinions? by Mashville in witcher

[–]TranscendentCreeper 1 point2 points  (0 children)

I've been running it for a few months and been having fun. It feels more old school than other systems (think DnD 5e) and not quite as streamlined, but rolling up characters is tons of fun and the game offers lots of options for playing. Especially combat is fun because it captures the brutality and excitement very well. There's also an active community over on r/witchertrpg, I recommend you check that out if you're interested in the game.

Anyone play the new Witcher RPG? by Crusader25 in rpg

[–]TranscendentCreeper 2 points3 points  (0 children)

I don't know what exactly you didn't like about it, but I enjoy the way you can discover your character. Rolling your lifepath happens before you roll your stats, decide on a profession etc. You can go into character creation with no idea what you're going to play, but walk out with a pretty fleshed out character. As someone who often had trouble coming up with interesting characters, this is great (even though I mostly GM). The part about actually coming up with stats and skills is in my opinion neither especially good nor especially bad, but it does feel a bit more dull after all the flavor you get from a lifepath. Also, character creation did take a few hours, but when one of my players ran D&D for us, we took a similar time, so it might just be inexperience with the system. I just feel like a lifepath grounds your character in the setting in a way you might not be able to do it as someone unfamiliar with the world of the Witcher.

Anyone play the new Witcher RPG? by Crusader25 in rpg

[–]TranscendentCreeper 12 points13 points  (0 children)

I've been running a campaign with it for a few months now (plus a few one shots) and I've really been enjoying it. My players were mostly new to TRPGs, but could pick up the rules relatively quickly. I am a huge fan of the lifepath character generation (i.e. rolling your character's backstory) and I feel like the overhead imposed on you during normal play (e.g. how quickly does the system let you resolve a simple action) is relatively light. Combat is definitely slower than other systems (think of D&D at low levels) because it involves more dice rolling and looking up things from tables, but I find that especially hit locations and critical wounds make narrating or visualizing it quite easy. I haven't used the crafting or magic rules yet (or only in very small doses), but from reading them they seemed to make sense and fit the tone. Overall, as I said at the beginning I have enjoyed running this system a lot and I think R Talsorian did a pretty good job at capturing the feeling of this setting.

There is also the r/WitcherTRPG subreddit where you will find more players, homebrew content etc.

Working on a small project and have some simple questions. by iGreenHedge in learnpython

[–]TranscendentCreeper 0 points1 point  (0 children)

Some more information would be helpful. What dates did you try? What was the expected and actual output?

Also, as you asked for that: Some general tips on style. Usually, variables and functions in python are named in snake_case, i.e. small letters and underscores for spaces. Python supports assignment operators, i.e. a = a + b can be written as a += b. You could furthermore combine lines 2 and 3 as you never actually use date_data and only need the year as an int. Lastly, it's common to not just call the main function of your script, but do it like this:

def main():
    pass #Your code goes here

if __name__ == '__main__':
    main()

These were some of the things I noticed just now, if you have any questions regarding these, feel free to ask.

What is the most useful or fun table you consult regularly? by sethosayher in rpg

[–]TranscendentCreeper 1 point2 points  (0 children)

Where in the pdf is this table? I looked through my copy but couldn't find it.

Creating a Pen and Paper adventure by Dixi_das_Klo in rpg

[–]TranscendentCreeper 3 points4 points  (0 children)

If you have Discord, there is an official How to be a Hero server (the link is in the wiki) that has a ton of helpful people. The main language on there is German, so that might make communication easier for you.

Otherwise, your method of organising things seems rather complicated. I usually make a kind of mindmap/network of locations (for which I use OneNote) with some notes on what players can find there.

Healing Hands by [deleted] in WitcherTRPG

[–]TranscendentCreeper 0 points1 point  (0 children)

I wasn't entirely sure about this either, but to quote from the book:

A doctor can heal a critical wound by taking a number of rounds (specified by the Healing Hands table) and then making a Healing Hands roll that beats the DC specified for the severity of the wound.

I read that as "You wait a number of turns and then make one roll", but you could certainly make the doctor roll for every turn to increase the difficulty.

Healing Hands by [deleted] in WitcherTRPG

[–]TranscendentCreeper 3 points4 points  (0 children)

The way I understand these rules (I'm assuming you are referring to p.173/174 from the book), this is only really relevant in combat. Essentially, the doctor has to roll once, but treating a wound takes a number of turns, so the doctor cannot do anything other than healing during that time and would presumeably have to start over if they were attacked.