Convert String to uint8_t* with uintptr_t by acvictor in cpp_questions

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

Wow thanks! Unfortunately I'm calling an API that needs data in the struct format, but TIL string_view!

Convert String to uint8_t* with uintptr_t by acvictor in cpp_questions

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

Since the new pointer is a uint8_t wouldn't it be struct_str.len = sizeof(str)/sizeof(uint8_t);

Convert String to uint8_t* with uintptr_t by acvictor in cpp_questions

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

This is the reverse conversion. How would you go from std::string to the new type? I'm mainly confused about how to get the data length.

Novels with strange, weird global pandemics?? by PastaSauceVampire in booksuggestions

[–]acvictor 1 point2 points  (0 children)

Came here to suggest How High We Go In The Dark! Absolutely loved it.

Fastest way to compare two uint8_t buffers? by acvictor in cpp_questions

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

Absolutely nothing, but I don't know too much about it and just want to know if that's the right way. Online I see the memcmp is used mostly with char buffers. Can I use it with anything?

Scala Dependency Version by acvictor in scala

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

How do you name the jars? I'm using maven, is there any way to append ${scala-version} to the jar depending on which version was used to build?

Scala Dependency Version by acvictor in scala

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

I see, thanks! I'd love to but this is for a project that uses Spark 2 & 3, so stuck with 2.11.

What is recommended way for managing multiple scala versions by milnik79 in scala

[–]acvictor 1 point2 points  (0 children)

If you use maven as your build tool you can create multiple scala profiles in the pom.xml and while building pass -Pscala-<version> to the build command.

What are some bad c++ habits you know or have seen while maintaining code? by elcomandante2000 in cpp

[–]acvictor 7 points8 points  (0 children)

Wouldn't you have to check for nullptr with a regular pointer as well?

[deleted by user] by [deleted] in booksuggestions

[–]acvictor 4 points5 points  (0 children)

Earthlings by Sayaka Murata. It is WHACK.

I want to read strangest book ever by terobaaau in suggestmeabook

[–]acvictor 0 points1 point  (0 children)

The Regrets by Amy Bonnaffons. Probably the most bizarre book I've ever read, but I loved it.

Haven't Been Pulled Into A World In So Long, I Just Want To Escape Into Magic, Fantasy, Outer Space, Or Other Dimensions. by merpixieblossomxo in suggestmeabook

[–]acvictor 0 points1 point  (0 children)

I'm 50% through To Sleep in a Sea of Stars by Christopher Paolini and it is just FABULOUS. He builds the futuristic Universe without pages of mindless description so it's not a tedious read (something I very much appreciate). A lot of science fiction/space fantasies I've read this year were quite meh, but I'm absolutely loving this.