programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
TadoTheRustacean to Programmer HumorEnglish · 2 years ago

thisIsGoingToBeASeriousDebate

message-square
41
link
fedilink
270

thisIsGoingToBeASeriousDebate

TadoTheRustacean to Programmer HumorEnglish · 2 years ago
message-square
41
link
fedilink
  • TadoTheRustaceanOP
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    I am hopeless at getting the text_ptr simpler than i64::from_str_radix(&format!(“{:p}”, my_string)[2…], 16).unwrap(); How can i get it the normal way?

    • Speiser0@feddit.de
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      Just use str::as_ptr().

      Here’s an example (disclaimer: I haven’t used inline asm in rust before, expect issues): https://godbolt.org/z/sczYGe96f

Programmer Humor

programmer_humor

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 563 users / day
  • 4.95K users / week
  • 10.2K users / month
  • 19.5K users / 6 months
  • 2.43K local subscribers
  • 24.2K subscribers
  • 1.49K Posts
  • 56K Comments
  • Modlog
  • mods:
  • adr1an
  • Feyter
  • BurningTurtle
  • Pierre-Yves Lapersonne
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org