feddit.org

1,874 readers
510 users here now

Matrix Raum
Matrix Space

Static Badge

Wir sind eine deutsch- und englischsprachige Lemmy Community und entwickelten uns aus feddit.de heraus.

Feddit.org dient als Reddit-Alternative im Fediverse.

Wir sehen uns als einen selbstbestimmten Raum, außerhalb der Kontrolle kommerzieller Tech-Unternehmen.

Netiquette wird vorausgesetzt. Gepflegt wird ein respektvoller Umgang - ohne Hass, Hetze, Diskriminierung.

Alternative Oberflächen:

Werden euch Posts/Kommentare nicht angezeigt?

Diese Community ist spendenfinanziert und wird von der Fediverse Foundation unterstützt.

Serverregeln

Wir tolerieren kein diskriminierendes Verhalten und keine Inhalte, die die Unterdrückung von Mitgliedern marginalisierter Gruppen fördern oder befürworten. Diese Gruppen können durch eine der folgenden Eigenschaften gekennzeichnet sein (obwohl diese Liste natürlich unvollständig ist):

  • ethnische Zugehörigkeit
  • Geschlechtsidentität oder Ausdruck
  • sexuelle Identität oder Ausdruck
  • körperliche Merkmale oder Alter
  • Behinderung oder Krankheit
  • Nationalität, Wohnsitz, Staatsbürgerschaft
  • Reichtum oder Bildung
  • Religionszugehörigkeit, Agnostizismus oder Atheismus

Wir tolerieren kein bedrohliches Verhalten, Stalking und Doxxing. Wir tolerieren keine Belästigungen, einschließlich Brigading, Dogpiling oder jede andere Form des Kontakts mit einem Benutzer, der erklärt hat, dass er nicht kontaktiert werden möchte.

  • Sei respektvoll. Alle sind hier willkommen.
  • Kein Rassismus, Sexismus, Ableismus, Homophobie, oder anderweitige Xenophobie
  • Wir tolerieren kein Mobbing, einschließlich Beschimpfungen, absichtliches Misgendering oder Deadnaming.
  • Wir dulden keine gewalttätige nationalistische Propaganda, Nazisymbolik oder die Förderung der Ideologie des Nationalsozialismus.
  • Aktionen, die diese Instanz oder ihre Leistung beschädigen sollen, können zur sofortigen Sperrung des Kontos führen.
  • Provokationen können nach Ermessen der Moderation entfernt werden
  • Toxisches Verhalten wird nicht geduldet
  • Keine Werbung und Eigenwerbung
  • Kein Spam
  • Keine Pornografie / Adult Content
  • In Deutschland, Österreich oder Schweiz illegale Inhalte werden gelöscht und können zur sofortigen Sperrung des Accounts führen.

AttributionThis text was partly adapted and modified from chaos.social. It is free to be adapted and remixed under the terms of the CC-BY (Attribution 4.0 International) license.

 
Datenschutzerklärung

TOM


Matrix Room
Matrix Space

We are a German and English-speaking Lemmy community that evolved from feddit.de.

Feddit.org serves as a Reddit alternative in the Fediverse.

We see ourselves as a self-determined space, outside the control of commercial tech companies.

Netiquette is expected. A respectful interaction is maintained - without hate, harassment, discrimination.

Alternative UIs:

Are you missing posts/comments?

Serverrules

We do not tolerate discriminatory behavior or content that promotes or advocates the oppression of members of marginalized groups. These groups may be characterized by any of the following (though this list is of course incomplete):

  • ethnicity
  • gender identity or expression
  • sexual identity or expression
  • physical characteristics or age
  • disability or illness
  • nationality, residency, citizenship
  • wealth or education
  • religious affiliation, agnosticism, or atheism

We do not tolerate threatening behavior, stalking, and doxxing. We do not tolerate harassment, including brigading, dogpiling, or any other form of contact with a user who has stated that they do not wish to be contacted.

  • Be respectful. Everyone is welcome here.
  • No racism, sexism, ableism, homophobia, or other xenophobia
  • We do not tolerate bullying, including name-calling, intentional misgendering, or deadnaming.
  • We do not tolerate violent nationalist propaganda, Nazi symbolism or the promotion of the ideology of National Socialism.
  • Actions intended to damage this instance or its performance can lead to immediate blocking of the account.
  • Provocations can be removed at the discretion of the moderators
  • Toxic behavior will not be tolerated
  • No advertisements and self-advertisement
  • No spam
  • No pornography / adult content
  • Content that is illegal in Germany, Austria or Switzerland will be deleted and can lead to an immediate ban of the account.

AttributionThis text was partly adapted and modified from chaos.social. It is free to be adapted and remixed under the terms of the CC-BY (Attribution 4.0 International) license.

 
Data-Protection-Policy

TOM

This community is powered by donations and supported by Fediverse Foundation.

Static Badge

founded 5 months ago
ADMINS
951
 
 
952
 
 

Summary

Special counsel Jack Smith dropped 44 federal charges against Donald Trump, citing DOJ policy that sitting presidents cannot be prosecuted.

The charges, including election interference and classified documents retention, could be refiled after Trump’s presidency.

Critics, including Rep. Dan Goldman and former Capitol officer Aquilino Gonell, decried the move as a miscarriage of justice, asserting it places Trump above the law.

Trump and allies celebrated the decision as a victory, with Vice President-elect JD Vance vowing to prevent similar prosecutions.

Democrats fear Trump will seek political retaliation, deepening national divisions.

953
 
 
954
 
 
955
 
 

Even for an HOA this is shitty

956
957
 
 
958
 
 

Introduction

In a recent incident response case, we dealt with a variant of the Mimic ransomware with some interesting customization features. The attackers were able to connect via RDP to the victim’s server after a successful brute force attack and then launch the ransomware. After that, the adversary was able to elevate their privileges by exploiting the CVE-2020-1472 vulnerability (Zerologon).

The identified variant abuses the Everything library and provides an easy-to-use GUI for the attacker to customize the operations performed by the malware. It also has features for disabling security mechanisms and running system commands.

This ransomware variant is named “Elpaco” and contains files with extensions under the same name. In this post, we provide details about Elpaco, besides already shared, as well the tactics, techniques and procedures (TTPs) employed by the attackers.

959
 
 

Polish defence minister says European countries need to increase spending on their own security; drone attack on Kyiv after Kharkiv and Odesa hit. What we know on day 1,007

960
 
 
961
962
 
 
963
 
 

Thank god

964
965
966
 
 

For the majority of artists, making music is financially unsustainable. According to a census conducted by the Musicians’ Union, nearly half of working musicians in the UK earn less than £14,000 a year from their craft, while a further half have to sustain their careers with other forms of income. It’s easy to imagine that these are the aspiring performers making tunes in their bedrooms and moonlighting as bartenders, but even household names are turning to alternative income streams.

British singer Kate Nash announced on Thursday that she would start posting pictures of her bottom on adult website OnlyFans to raise money for her tour. The Foundations singer has nearly a million monthly listeners on Spotify, and is playing all across the UK, including a sold out gig in London, but says that touring is a loss making exercise.

She started her “Butts 4 Tour Buses” page in order to ensure “good wages and safe means of travel for my band and crew”. Nash would rather you gawk at her gluteus maximus than listen to Foundations on Spotify. "No need to stream my music, I’m good for the 0.003 of a penny per stream thanks," she told her followers on Instagram.

For an independent solo artist to make the UK living wage they would need 9 million streams a year. But most artists need far more as revenue is split between bands, with record labels often taking a hefty cut.

While Spotify can provide a reliable if paltry source of income, touring is only profitable for musicians playing big venues to sold out crowds. A survey conducted by rehearsal space network Pirate Studios found that only 29% of artists make a profit from tours. Rising costs and a flailing economy have exacerbated this, and a government report earlier this year found that artists are facing a “cost-of-touring” crisis, with travel, accommodation and food prices all higher than ever.

...

With her backside hustle, Nash follows in the footsteps of Lily Allen, who started selling pictures of her feet on OnlyFans over summer. She had the idea after seeing that her feet had a perfect five star rating on WikiFeet, a photo-sharing foot fetish website. Subscribers pay £8 a month to access her posts. In October, Allen claimed that shots of her well-pedicured trotters were earning her more money than Spotify streams – and that’s saying something, considering Allen has over 7 million monthly listeners and more than a billion streams on her top three songs.

967
 
 
968
 
 
969
970
971
 
 

For an overview of how to use it, check this video:

https://youtu.be/xvlsJ3FqNYU

also check this video, although it's a bit outdated now.

https://youtu.be/sQYUQNozljo

972
 
 
973
 
 
974
9
submitted 12 hours ago* (last edited 12 hours ago) by raldone01@lemmy.world to c/rust@lemmy.ml
 
 

Hello,

I was playing around with rust and wondered if I could use const generics for toggling debug code on and off to avoid any runtime cost while still being able to toggle the DEBUG flag during runtime. I came up with a nifty solution that requires a single dynamic dispatch which many programs have anyways. It works by rewriting the vtable. It's a zero cost bool!

Is this technique worth it?

Probably not.

It's funny though.

Repo: https://github.com/raldone01/runtime_const_generics_rs/tree/v1.0.0

Full source code below:

use std::mem::transmute;
use std::sync::atomic::AtomicU32;
use std::sync::atomic::Ordering;

use replace_with::replace_with_or_abort;

trait GameObject {
  fn run(&mut self);
  fn set_debug(&mut self, flag: bool) -> &mut dyn GameObject;
}

trait GameObjectBoxExt {
  fn set_debug(self: Box<Self>, flag: bool) -> Box<dyn GameObject>;
}

impl GameObjectBoxExt for dyn GameObject {
  fn set_debug(self: Box<Self>, flag: bool) -> Box<dyn GameObject> {
    unsafe {
      let selv = Box::into_raw(self);
      let selv = (&mut *selv).set_debug(flag);
      return Box::from_raw(selv);
    }
  }
}

static ID_CNT: AtomicU32 = AtomicU32::new(0);

struct Node3D<const DEBUG: bool = false> {
  id: u32,
  cnt: u32,
}

impl Node3D {
  const TYPE_NAME: &str = "Node3D";
  fn new() -> Self {
    let id = ID_CNT.fetch_add(1, Ordering::Relaxed);
    let selv = Self { id, cnt: 0 };
    return selv;
  }
}

impl<const DEBUG: bool> GameObject for Node3D<DEBUG> {
  fn run(&mut self) {
    println!("Hello {} from {}@{}!", self.cnt, Node3D::TYPE_NAME, self.id);
    if DEBUG {
      println!("Debug {} from {}@{}!", self.cnt, Node3D::TYPE_NAME, self.id);
    }
    self.cnt += 1;
  }

  fn set_debug(&mut self, flag: bool) -> &mut dyn GameObject {
    unsafe {
      match flag {
        true => transmute::<_, &mut Node3D<true>>(self) as &mut dyn GameObject,
        false => transmute::<_, &mut Node3D<false>>(self) as &mut dyn GameObject,
      }
    }
  }
}

struct Node2D<const DEBUG: bool = false> {
  id: u32,
  cnt: u32,
}

impl Node2D {
  const TYPE_NAME: &str = "Node2D";
  fn new() -> Self {
    let id = ID_CNT.fetch_add(1, Ordering::Relaxed);
    let selv = Self { id, cnt: 0 };
    return selv;
  }
}

impl<const DEBUG: bool> GameObject for Node2D<DEBUG> {
  fn run(&mut self) {
    println!("Hello {} from {}@{}!", self.cnt, Node2D::TYPE_NAME, self.id);
    if DEBUG {
      println!("Debug {} from {}@{}!", self.cnt, Node2D::TYPE_NAME, self.id);
    }
    self.cnt += 1;
  }

  fn set_debug(&mut self, flag: bool) -> &mut dyn GameObject {
    unsafe {
      match flag {
        true => transmute::<_, &mut Node2D<true>>(self) as &mut dyn GameObject,
        false => transmute::<_, &mut Node2D<false>>(self) as &mut dyn GameObject,
      }
    }
  }
}

fn main() {
  let mut objects = Vec::new();
  for _ in 0..10 {
    objects.push(Box::new(Node3D::new()) as Box<dyn GameObject>);
    objects.push(Box::new(Node2D::new()) as Box<dyn GameObject>);
  }

  for o in 0..3 {
    for (i, object) in objects.iter_mut().enumerate() {
      let debug = (o + i) % 2 == 0;
      replace_with_or_abort(object, |object| object.set_debug(debug));
      object.run();
    }
  }
}

Note:

If anyone gets the following to work without unsafe, maybe by using the replace_with crate I would be very happy:

impl GameObjectBoxExt for dyn GameObject {
  fn set_debug(self: Box<Self>, flag: bool) -> Box<dyn GameObject> {
    unsafe {
      let selv = Box::into_raw(self);
      let selv = (&mut *selv).set_debug(flag);
      return Box::from_raw(selv);
    }
  }

I am curious to hear your thoughts.

975
view more: ‹ prev next ›