È possibile individuare i video fasulli, generati da applicativi di intelligenza artificiale?
  • Mechanize Mechanize Now 100%

    Onestamente si tratta di un articolo fuffa, senza alcun tipo d'informazione utile ad eccezione di questa:

    Un recente studio di ricercatori dell’Università di Drexel, in Pennsylvania

    Senza riportare ulteriori dati.

    Il resto sembran parole scritte per lo più a caso da qualcuno che, evidentemente, non ha infarinatura nell'argomento.

    Capisco che scrivere sull'IA porti click, ma così mi pare esagerato. La cosa triste - se non addirittura deprimente - è che un Large Language Model a cui fosse stato dato in pasto l'abstract dello studio avrebbe probabilmente potuto fare un lavoro migliore. O magari si tratta di un testo generato da un modello di piccole dimensioni, viste anche le continue ripetizioni (questi applicativi, mettere in evidenza, attento studio), il che renderebbe il tutto almeno divertente.

    Un articolo migliore - ma con spin ovviamente positivo ed in inglese - si può trovare qui: drexel.edu

    Notare la data.

    E qui il paper:

    Mi dispiace esser così negativo sul lavoro altrui, ma sembra quasi abbia messo più ricerca e sforzo io in questo post che l'articolista nel suo.

    Comunque, per chi fosse interessato, questa è la parte sostanziale, che si può trovare nel sito, senza aprire il paper su arxiv:

    This corresponds to a detector's ability to detect videos from a new generator without any re-training. These results show that while the detector achieves strong performance on videos from generators seen during training, performance drops significantly when evaluating on new generators.

    Additionally, we performed few-shot learning experiments to evaluate the detector's ability to detect videos from new generators with only a few examples. These results show that the detector can very accurately transfer to detect new generators through few-shot learning.

    AKA il sistema funziona bene solo su modelli il cui output è disponibile in quantità (40.000 frame per modello, Tabella 4, pagina 5 per il training) e si può usare per fare l'addestramento.

    Quindi utile solo contro video di livello amatoriale, fatti con modelli disponibili al pubblico generale.

    Vorrei soffermarmi di più sulla questione dei falsi positivi, ma trovo il paper veramente poco chiaro al riguardo, e credo di aver già dedicato troppo tempo ad un post che probabilmente non leggerà nessuno su un paper che non ho trovato particolarmente illuminante o interessante.

    Accetto volentieri correzioni.

    Tap for Changelog

    falsi negativi -> falsi positivi

    1
  • Artist is Suing Copyright Office For Refusing to Register His AI Image
  • Mechanize Mechanize Now 91%

    This is getting weird.

    If I would generate an image with an AI and then take a photo of it, I could copyright the photo, even if the underlying art is not copyrightable, just like the leaves?

    So, in an hypothetical way, I could hold a copyright on the photo of the image, but not on the image itself.

    So if someone would find the model, seed, inference engine and prompt they could theoretically redo the image and use it, but until then they would be unable to use my photo for it?

    So I would have a copyright to it through obscurity, trying to make it unfeasible to replicate?

    This does sound bananas, which - to be fair - is pretty in line with my general impression of copyright laws.

    28
  • Any ideas? My desktop always ends up like this on login, i don't even know where to begin to fix.
  • Mechanize Mechanize Now 100%

    The only two things I can currently think of are:

    1. Shut down the PC and try inverting the slot your monitors are plugged in in the graphic card
    2. Right click on the Desktop -> Swap the primary Display -> Apply -> Swap it back

    Honestly I'm not sure if it will help but I don't have other ideas aside from purging the configuration, which is probably not the solution and unwarrented.

    Another thing to try would be a search on the KDE bugtracker.

    5
  • Tails was started more than 767,542 times this month
  • Mechanize Mechanize Now 100%

    I didn't know about this project, so I took a quick look around.

    I didn't see any mention of Telemetry or Metrics, but I assume they can use this:

    After starting Tails and connecting to Tor, Tails Upgrader automatically checks if upgrades are available and then proposes you to upgrade your USB stick. The upgrades are checked for and downloaded through Tor.

    https://tails.net/doc/upgrade/index.en.html#automatic

    Still, I just gave this a few minutes, so there could be more.

    43
  • What are they pointing at? Wrong answers only.
  • Mechanize Mechanize Now 100%

    They are on the Odyssey bridge, pointing at the Ori warships passing through the Supergate!

    6
  • Annapurna Video-Game Team Resigns, Leaving Partners Scrambling - Bloomberg
  • Mechanize Mechanize Now 100%

    Remedy and Annapurna announce a strategic cooperation agreement on Control 2 and bringing Control and Alan Wake to film and television

    I'm not sure this is going to directly affect that, because their deal talks mainly about financing for the Control game, and the other news is about movie adaptations, so probably it is going to be another team, lead by the newly re-hired Hector Sanchez, working on that...

    But who knows, this kind of things are always hard to follow from the outside

    3
  • Il mio ISP può tracciare il mio traffico e farne un mio profilo?
  • Mechanize Mechanize Now 100%

    Spulciati i contratti.

    In linea di massima quasi tutti gli ISP creano profili per poi venderli.

    3
  • [SOLVED] ProtonVPN on Arch Linux (CachyOS) ?
  • Mechanize Mechanize Now 100%

    So, I can't install aur packages via pacman?

    Nope, you have to do it manually or using an helper that abstracts the manual work away.

    AUR packages, or to be more precise the PKGBUILD files, are recipes to compile or download stuff outside from the official repositories, manage their deps and installing them on the system.

    You should always only run PKGBUILD files that you trust, they can do basically anything on your system. Checking the comments of the package in the aur repo is a good practice too.

    Also Are you quoting certain nExT gEn gAmE guy?

    ...maybe

    2
  • [SOLVED] ProtonVPN on Arch Linux (CachyOS) ?
  • Mechanize Mechanize Now 100%

    Also in wiki they didn't mention anything about OpenSSL?

    Sorry, that was my bad, I wrote OpenSSL instead of openvpn. That one is probably needed too, but you should not have to pull it manually.

    Generally speaking the ArchWiki is one of the best, more structured and well maintained source of information about Linux things even for other distros, but it can too be outdated, so you should always check if the info is valid. In this case it seems so.

    In theory you should be able to just install proton-vpn-gtk-app using one of the many AUR helpers and it should Just Work™. Paru and yay are the most commonly used ones - as far as I know - and they wrap around pacman too, so you can use them to do everything packages related. Usually Arch related distro use one of them, for example EndeavourOS have yay already installed.

    At worst when you try to start protonvpn the GUI will not appear or immediately crash: if that happens, usually, you can try and run the program from the Shell and see what kind of error it returns and work your way from there. Checking if the deps listed in the wiki are installed is always a great first step.

    2
  • [SOLVED] ProtonVPN on Arch Linux (CachyOS) ?
  • Mechanize Mechanize Now 100%

    Reading rorschac's comment I assume both OpenSSL and wireguard are already installed on CachyOS, or anyway pulled by the aur package.

    If you want to make sure you can install them explicitly before protonvpn:

    paru openvpn wireguard-tools
    

    or using yay or the vanilla pacman -Syu --needed openvpn wireguard-tools (it will sync and update the system too) or how it is suggested for CachyOS to install packages. I repeat I've no direct experience with that one.

    If you are scared to mess things up you can always spin up a VM with CachyOS and try to install it inside that. If it all works you can then do the same on your main OS.

    As a general advice, only run in your shell commands that you are sure about.

    2
  • [SOLVED] ProtonVPN on Arch Linux (CachyOS) ?
  • Mechanize Mechanize Now 100%

    I can attest that this AUR package, which is the one indicated in the wiki, works fine on EndeavourOS, but I had to add the gnome key wallet (IIRC) to handle the VPN keys. I think that was fixed.

    I have no experience with CachyOS.

    8
  • What is this country?
  • Mechanize Mechanize Now 100%

    To add to CookieShovel's answer, that is the character representing the Zhou Dinasty.

    From Wikipedia:

    The Zhou dynasty ([ʈʂóʊ]; Chinese: 周)[c] was a royal dynasty of China that existed for 789 years from c. 1046 BC until 256 BC, the longest of such reign in Chinese history.

    6
  • Bill! BILL! Bill! BILL!
  • Mechanize Mechanize Now 100%

    That was depressing.

    15
  • Credible assistant gunner
  • Mechanize Mechanize Now 100%

    I can't see it

    9
  • 🤖.🌎
  • Mechanize Mechanize Now 84%

    Considering you seem to dislike the whole concept of Bots, isn't the Bot toggle in the Lemmy profile exactly what you want?

    It auto ignores all posts and comments made by accounts marked as Bots. Sure, the owner of the account has to correctly mark it, but I feel that can easily be solved by reporting unmarked bots.

    But I'm interested, if you would like to expand on it, how would you make a bot opt-in?
    The only way I could think of is through PMs, but that would be cumbersome, and generally unfit for purpose, for all the involved parties.

    13
  • This is so much more economical
  • Mechanize Mechanize Now 100%

    Psychologists in shambles

    27
  • Last night Organic Maps was removed from the Play Store
  • Mechanize Mechanize Now 100%

    Actually Obtainium is mentioned (but thank you, checking back I saw I had a typo in the github link that I had missed, and I've now fixed it!), but this is the first time I hear about Accrescent: is it this App store?

    10
  • Last night Organic Maps was removed from the Play Store
  • Mechanize Mechanize Now 100%

    You are right, and I forgot to add the link to it in the opening post. I'll edit it in!

    49
  • > Last night Organic Maps was removed from the Play Store without any warnings or additional details due to "not meeting the requirements for the Family Program". Compared to Google Maps and other maps apps rated for 3+ age, there are no ads or in-app purchases in Organic Maps. We have asked for an appeal. > As a temporary workaround for the Google Play issue, you can install the new upcoming Google Play update from this link: <https://cdn.organicmaps.app/apk/OrganicMaps-24081605-GooglePlay.apk> The Announcement on various Networks: [Fosstodon Post](https://fosstodon.org/@organicmaps/112976308191001762) [Twitter Post](https://x.com/organicmapsapp/status/1824727403580596260) [Telegram Post](https://t.me/OrganicMapsApp/401) If you don't know what Organic Maps is, it is an alternative to [OsmAnd](https://osmand.net/) and google maps, more info on the official site ([link](https://organicmaps.app/)) and [GitHub](https://github.com/organicmaps/organicmaps). Maybe an error? Honestly this is a weird one. I hope we will learn more in the coming hours. You can still get it on the other channels, like [F-Droid](https://f-droid.org/it/packages/app.organicmaps/) or [Obtainium](https://github.com/ImranR98/Obtainium). Still, we all know that not being on the Play Store is an heavy sentence for any Android app. ::: spoiler EDITs - Added [F-Droid](https://f-droid.org/it/packages/app.organicmaps/) link. - Fixed Typo in the obtainium link. :::

    673
    115
    Woman 'who first shared lies that sparked UK riots' arrested
  • Mechanize Mechanize Now 93%

    While she has not been named in the police statement about the arrest, it is believed to be Bonnie Spofforth

    This, I don't like. If you - the newspaper, the means of information - are not sure about a name you should really refrain from using it.

    It would be not the first time people get their lives ruined by some careless journalist because of a namesake or just an error.

    It's not that different from "spreading rumors".

    That aside, in this case, it is probably a rumor from an inside source. Still. Not a fan.

    185
  • Ciao a tutti! La [discussione](https://feddit.it/comment/1165396) dell'altro giorno riguardo a Bot per Lemmy mi ha invogliato a perder un po' di tempo libero e buttare giù un semplicissimo script in Rust che crea un nuovo post quando viene invocato, seguendo i dati in un file di configurazione. Anche se si tratta, fondamentalmente, di qualcosa d'incredibilmente semplice l'ho creato in modo da dar esempi pratici a molti degli argomenti che spesso, chi inizia Rust, ha difficoltà a trovare in un insieme coerente. Per esser chiari questa non è - volutamente - la più efficiente o idiomatica versione del codice per eseguire il compito, ma ho cercato di mantenerla semplice da capire e _tendenzialmente_ idiomatica, evitando tutte quelle forme che potrebbero intimidire o confondere, anche se migliori. E, soprattutto, questo _non è_ un tutorial. Vuole solo dare una prospettiva ampia. Dentro ci sono esempi di: - [Option](https://doc.rust-lang.org/std/option/index.html) - [match](https://doc.rust-lang.org/std/keyword.match.html) - Del crate [reqwest](https://crates.io/crates/reqwest), usato per inviare una richiesta POST. - Come leggere un file di configurazione con [toml](https://crates.io/crates/toml) e [serde](https://crates.io/crates/serde). - Il random in Rust, che non è integrato direttamente nella Standard Library ma per cui bisogna usare il crate [rand](https://crates.io/crates/rand) (o similari). - Come ottenere e [formattare](https://docs.rs/time/0.3.23/time/struct.Date.html#method.format) [una data](https://time-rs.github.io/book/api/format-description.html) con il crate [time](https://crates.io/crates/time). Normalmente ho sempre usato [chrono](https://crates.io/crates/chrono), quindi questa è stata un'esperienza nuova anche per me! haha - Diversi modi per [interpolare](https://doc.rust-lang.org/std/macro.format.html) [le stringhe](https://doc.rust-lang.org/std/fmt/index.html). - Come attivare per un crate delle [feature](https://doc.rust-lang.org/cargo/reference/features-examples.html) non default nel proprio [cargo.toml](https://doc.rust-lang.org/cargo/reference/manifest.html) - [panic!](https://doc.rust-lang.org/std/macro.panic.html) AKA Come far crashare il proprio programma! ...volutamente! - [expect](https://doc.rust-lang.org/std/result/enum.Result.html#method.expect) non è il male! Ha il suo posto anche all'interno di programmi più solidi e non solo per veloce prototipi. Ora non voglio venderlo per più di quello che è, ma credo sia una buona base di partenza per qualcuno che è interessato a Rust ma non lo ha mai visto con esempi reali, semplici e non mono argomento. Ho aggiunto anche diversi commenti che spero possano aiutare a comprenderne il flusso. Quindi, per finire, funziona? Sì! È solido e resiliente? Nope. È una buona base per far qualcosa di meglio se volessi imparare e giocare un po' con Rust? Credo di sì. Se volete provarlo e fare dei test, il metodo migliore è usare le istanze di test ufficiali di Lemmy: - [ds9.lemmy.ml](https://ds9.lemmy.ml) - [voyager.lemmy.ml](https://voyager.lemmy.ml) - [enterprise.lemmy.ml](https://enterprise.lemmy.ml) Oppure la [palestra](https://feddit.it/c/test) qui su feddit.it (credo?) Una buona alternativa sono anche i servizi come [https://httpbun.org/](https://httpbun.org/) o [https://httpbin.org/](https://httpbin.org/) (down al momento dei miei test). ::: spoiler FAQ Perché non su github? > Al momento non ho un account che posso usare per queste cose, mi dispiace! Ma basta che copio i file? > Beh, sì, ma sarebbe il caso di creare un nuovo progetto con `cargo new --bin simplecofeebot` e sovrascrivere/modificare i file. Cosa succede se faccio `cargo run`? > Che invii una richiesta errata a feddit.it, perché non c'è alcun token jwt nel file di configurazione. > Nel caso in cui tu inserisca un token jwt allora - se non modifichi nulla - dovrebbe inviare una nuova discussione nella comunità del Caffé, chiamata "Caffè Italia DD/MM/AAAA" con la data del giorno d'invio, ed un messaggio fra quelli nella body_pool. Quindi meglio non farlo, o si finisce per spammare il caffé. :D Perché nel Caffè invece di Informatica?! > Leggendo le regole della comunità !informatica@feddit.it mi sembra di capire sia solo incentrata sulle notizie! Puoi compilarlo per me? > Nope. Non consiglio di usarlo seriamente così come è. Questo codice è un macello! > Grazie, mi sono impegnato! Se hai notato bug, typo o cose insensate per favore commenta qui sotto! Licenza??? > MIT o Apache 2! ::: --- ::: spoiler Cargo.toml ```toml [package] name = "simplecofeebot" version = "0.1.0" edition = "2021" publish = false license = "MIT OR Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] toml = "0.7.6" reqwest = { version = "0.11.18", features = ["blocking", "json"] } time = { version = "0.3.23", features = ["std", "local-offset", "formatting"] } serde = { version = "1.0.174", features = ["derive"] } serde_json = "1.0.103" rand = "0.8.5" ``` ::: ::: spoiler /simplecofeebot.toml ```toml [instance] url = "https://feddit.it" # curl --get -d "name=caffeitalia" https://feddit.it/api/v3/community community_id = 11869 [authentication] # curl --header "Content-Type: application/json" --request POST --data '{"username_or_email":"UsernameFigo","password":"PasswordComplicata"}' https://feddit.it/api/v3/user/login session_token = "" [text] body_pool = [ "Salve!", "Che piacere vederla, commendatore, il solito?", "Un bel caffettino?", ] # title_pool = ["hmhm", "oh no"] ``` ::: ::: spoiler src/main.rs ```Rust // In poche parole questi sono gli import. use std::{fs::File, io::Read, path::Path}; use rand::{rngs::ThreadRng, Rng}; use serde::Deserialize; use serde_json::json; use time::{format_description, OffsetDateTime}; // Creiamo una serie di Struct per contenere i vari // dati presenti nel file di configurazione. // derive è una macro procedurale che // genererà per noi determinate parti di codice. // Deserialize è fondamentale e proviene dal crate // serde, su cui toml fa affidamento. #[derive(Debug, Deserialize)] struct Config { instance: InstanceConfig, authentication: AuthenticationConfig, text: TextConfig, } #[derive(Debug, Deserialize)] struct InstanceConfig { url: String, community_id: i32, } #[derive(Debug, Deserialize)] struct AuthenticationConfig { session_token: String, } #[derive(Debug, Deserialize)] struct TextConfig { // Perché un Option? Perché la pool di titoli nel file // di configurazione può esserci o non esserci, è, per // l'appunto, opzionale. // Potremo facilmente controllare che il valore sia presente // in base al suo tipo: // Some(Vec<String>) - un vettore contenente stringhe // None - un'Option vuota title_pool: Option<Vec<String>>, body_pool: Option<Vec<String>>, } fn main() { // Specifica la posizione ed il nome del file di configurazione. let path = Path::new("./simplecofeebot.toml"); // Apri il file di configurazione e controlla che l'operazione non dia errore. let (config, title, body): (Config, String, String) = match File::open(path) { // Il file è stato aperto con successo, quindi usiamo un pattern // per estrarre il contenuto del nostro tipo Result<File, Error>. Ok(mut file) => { // Creiamo una nuova Stringa che verrà utilizzata come buffer per il contenuto // del nostro file di configurazione. // Deve esser mut perché dobbiamo modificarla. let mut doc = String::new(); // Ed ora tentiamo di trasportare il contenuto del file dentro la stringa di buffer! match file.read_to_string(&mut doc) { // Non siamo interessati a quello che read_to_string ritorna dentro l'Ok() // quindi usiamo _ per indicare che non serve una variabile dove inserirlo. Ok(_) => { // Usiamo il crate Rand per creare un generatore di numeri casuali locale. let mut rng = rand::thread_rng(); // Finalmente usiamo il crate toml per analizzare il file di configurazione. let config: Config = match toml::from_str(doc.as_str()) { // Il match può ritornare un valore al suo completamento, quindi, // nel caso sia andato tutto bene, ritorniamo il valore contenuto // all'interno del nostro Ok. Ok(s) => s, Err(err) => { // Oh no! // Qualcosa è andato storto e non ci è possibile recuperare // da questo errore. Ci tocca chiudere il programma con un bel // e salutare crash. Cerchiamo almeno di spiegare il perché... panic!( "Errore! Impossibile analizzare il file di configurazione!\n{}", err ); } }; // Per rendere il titolo un po' meno monotono aggiungiamo un suffisso // estratto a caso fra le stringhe date nell'apposito spazio nel file di // configurazione. // Useremo una funzione chiamata pick_random, definita poco sotto! let title_suffix = config .text .title_pool .as_ref() .map_or(String::new(), |v| pick_random(&mut rng, v)); let body_default = "Salve!".to_owned(); let mut body = config .text .body_pool .as_ref() .map_or(body_default.clone(), |v| pick_random(&mut rng, v)); // Abbiamo fatto in modo che, in caso il nostro utente non // abbia definito body_pool nella configurazione, allora vi sia // la String "Salve!" come body, ma cosa succede nel caso in cui // il nostro utente abbia passato [""] o []? // Dato che abbiamo preso una decisione esecutiva d'avere come // default "Salve!", allora è il caso d'aggiungere // un altro controllo... if body.is_empty() { body = body_default; } // Rimandiamo indietro una bella Tupla d'elementi.. questo // puzza solo a me? // Se si fa affidamento su un dato strutturato, per muoverlo // in giro, forse sarebbe il caso di creare direttamente una // nuova Struct ed esser sicuri di quel che passiamo! (config, generate_title(title_suffix), body) } Err(err) => { // Hmm.. probabilmente il file non era codificato in UTF-8! Oh no! Anche qui... // niente configurazione, niente funzionalità! panic!( "Errore! Sei sicuro che il file di configurazione sia in UTF-8 valido?\n{}", err ); } } } // C'è stato un errore durante l'apertura del file! Err(err) => { // Niente file di configurazione significa che non abbiamo accesso al token JWT.. // Anche se avessimo dei default per gli altri elementi non è possibile andare oltre, // l'unica via è un bel crash! panic!( "Errore! Impossibile aprire il file in \"{}\":\n{}", path.display(), err ) } }; // Ora che abbiamo il nostro titolo ed il nostro corpo del messaggio // è arrivato il momento di postarli! Ma come fare? // A piccoli passi! // Sarebbe opportuno controllare che l'url dell'istanza sia // almeno formalmente corretto. // Perché non fare tutti i controlli subito appena analizzato // il file di configurazione, così da non sprecare // tempo e computazioni? È un ottima domanda! // E la strategia giusta sarebbe di spostare tutto ciò che // riguarda la configurazione in un suo modulo a parte, // far tutte le validazioni del caso, e solo dopo procedere! // ...ma qui siamo bonari, ci fidiamo del nostro utente! // Saltiamo direttamente ad usare un nuovo crate per // inviare richieste: reqwest! let client = reqwest::blocking::Client::new(); // Cosa succede se, per caso, l'url dell'istanza è malformato, pieno // di spazi bianchi o con un bel / alla fine..? E se non inizia con // il protocollo? let api_endpoint = format!("{}/api/v3/post", config.instance.url); // Questi son un sacco di dati da prendere e di cui fidarsi così, senza // pensarci.. // Però siamo avventurosi! Creiamo direttamente il json sulla fiducia. // Per farlo utilizziamo una macro che proviene da serde_json. // Esistono molte altre vie, ma questa è quella più semplice da // gestire in modo sano, se dovessimo mai decidere d'implementare // altre casistiche. let req = json!({ "auth": config.authentication.session_token, "name": title, "community_id": config.instance.community_id, "body": body, }); // Ed ora proviamo ad inviare la richiesta! match client.post(api_endpoint).json(&req).send() { Ok(response) => { // Sembra esser tutto riuscito! Mettiamo un bel messaggino con // un sacco d'informazioni inutili nella console, giusto per // dar un po' di fastidio al nostro amato utente! // In più con un unwrap messo così c'è sempre la possibilità // d'avere un divertente crash al momento meno opportuno! println!("La discussione con il titolo \"{title}\" è stata inviata correttamente.\nRisposta: {}", response.text().unwrap()) // Ma un momento... Se l'url era sbagliato e abbiam ricevuto // indietro un 404, 503 o qualche altro problema che ha impedito al // post d'esser ricevuto? Al momento il nostro script direbbe // sempre che tutto è andato bene! Ooooops! // Forse potremmo controllare response.status() e fare un bel match... } Err(err) => eprint!( "Errore! Non è stato possibile inviare la discussione!\n{}\n", err ), } } fn pick_random(trng: &mut ThreadRng, trg: &Vec<String>) -> String { // hmm.. cosa succede se viene passato un vettore vuoto...? // Meglio controllare! E in Rust anche l'if può direttamente // ritornare un valore. if trg.is_empty() { // È un po' triste e non esattamente il massimo.. Ma una stringa // vuota è pur sempre un'opzione! // Notare come trasformiamo "" da una &'static str in una String usando // to_owned(). "".to_owned() } else { // Invece se c'è almeno un elemento allora procediamo all'estrazione! // Notare come len() ritorni la lunghezza del vettore, quindi // [0, 1, 2] ha una len() di 3, però l'ultimo elemento ha un'id // di 2! // Un'altra ottimizzazione possibile sarebbe nel caso avessimo // un solo elemento... ma.. Ne vale la pena? trg.get(trng.gen_range(0..=(trg.len() - 1))) .unwrap() .to_owned() } } fn generate_title(suffix: String) -> String { // Creiamo un descrittore per il formato della data da inserire nel titolo. // Nel caso ci sia qualche errore crashamo direttamente usando expect, // perché siamo bravi mettiamo anche un messaggio che cerca di spiegare il // motivo più probabile per il nostro crash.. Potrebbe esser utile in futuro, se // qualcuno decidesse di render il descrittore configurabile! let date_format = format_description::parse("[day]/[month]/[year]").expect( "La stringa che stai cercando di usare per formattare la data non sembra corretta!", ); // Cerchiamo d'ottenere la datetime della macchina locale... let date = match OffsetDateTime::now_local() { Ok(datetime) => datetime.date(), Err(_) => { // Impossibile ottenere la data locale, con tristezza usiamo quella UTC. // Potrebbe capitare che il giorno sia diverso, per colpa dei fusi orari.. eprintln!("Errore! Impossibile ottenere la data locale: verrà usata quella UTC."); OffsetDateTime::now_utc().date() } } .format(&date_format) .expect("Non siamo riusciti a formattare la data..?"); format!("Caffè Italia {} {}", date, suffix) .trim() .to_owned() } ``` ::: --- Alcune possibili migliorie semplici ed interessanti potrebbero esser: - Una gestione migliore degli errori, usando l'operatore '?', ed il crate anyhow. - Potremmo anche creare degli errori migliori con thiserror! - Abbiamo già il crate time.. Perché non aggiungere dei timestamp ai messaggi nella console? - Creare diversi moduli per gestire in modo più generale e specifico (Ah! Sembra un ossimoro ma non lo è!) le varie funzioni! - Dopo aver creato la discussione, se ha accesso ai poteri da mod, pinnarla! - Magari sanitizzare un po' le stringe provenienti dal file config? Anche solo un trim sarebbe un bel passo avanti! Anche quando l'utente è fidato cercare di coprire gli errori più comuni è sempre una buona idea! - Cosa succede se il session_token è scaduto..? Magari si potrebbe direttamente fare il login? - Magari trasformarlo per, oltre al file di configurazione, accettare anche dei parametri da linea di comando, usando un crate come Clap! - Attualmente lo script posta quando è invocato.. Magari potremmo creare un loop e una configurazione per postare a determinate date/orari? Certo, un cron job quando disponibile è sempre la scelta migliore.. Ma se proprio ci si sta annoiando...!

    16
    11
    web.archive.org

    "_L'Agcom potrà bloccare entro 30 minuti i siti che trasmettono illegalmente le partite di calcio._" Oggi il Senato ha dato il suo Sì definitivo alla famosa legge "Anti pezzotto", come l'ho vista più volte chiamare sui vari giornali. Cosa ne pensate? Avrà effetti positivi, avrà effetti negativi o al primo tentativo di applicare il blocco finiranno per oscurare centinaia se non migliaia di siti web per sbaglio, magari inserendo l'ip range di qualche CDN? Personalmente penso sarà interessantissimo vedere quanto, come e in quali casi verrà applicata. Alcuni punti IMHO degni di ulteriore nota (presi dall'articolo collegato): - Il Senato ha approvato all'unanimità. - Fino a tre anni di reclusione e quindicimila euro di multa. - I giudici potranno risalire al titolare della pagina e accedere alle sue informazioni personali tramite il tracciamento dei pagamenti. - L'Agcom potrà bloccare il sito entro 30 minuti i siti. Nota: Ho preso Wired perché è il primo che mi è capitato che non riportasse solamente uno striminzito trafiletto e non fosse dietro un paywall. Se qualcuno ha fonti migliori, ben vengano!

    24
    21

    Un paio di giorni fa mi è arrivata un'email da parte di Gandi, il famoso rivenditore Francese di domini web. Il TLDR della cosa è: Tutti i domini avranno prezzi più alti (da quel che so eran già fra i più alti sul mercato) e le mailbox che venivano concesse "gratuitamente" con ognuno di essi verranno chiuse: si dovrà passare al loro nuovo sistema "migliorato" (il numero di virgolette che mi trovo ad utilizzare è ridicolo, ma necessario). Anch'esso ovviamente ad un prezzo decisamente aumentato: la base passa da 0,40$/m a 2,99$/m e la plus - non ancora ufficialmente annunciata - dovrebbe passare da 2,00$ a 4,99$. Senza perdersi troppo nella modifica dell'indirizzo morale dell'azienda - a quanto pare lo slogan "No Bullshit" è completamente sparito dal loro sito, le regole morali che avevan prima nei Termini di Servizio non vi sono più e oltre ad una striminzita FAQ non c'è da nessuna parte sul loro sito notizia delle modifiche - penso sia un cambio di rotta sinceramente troppo repentino, distruttivo e completamente fuori di testa. Persone che hanno acquistato domini per multipli anni ora si ritrovano ad aver pagato cifre decisamente più alte di quelle offerte dalla concorrenza e con servizi su cui magari facevano affidamento letteralmente svaniti. ### Alcuni collegamenti per approfondire - [alternativeto.net - Gandi to end free GandiMail service and introduce new pricing policy](https://alternativeto.net/news/2023/6/gandi-to-end-free-gandimail-service-and-introduce-new-pricing-policy/) - [Hacker News - Gandi.net – Pricing Update](https://news.ycombinator.com/item?id=36321783) - [Hacker News - Domain registrar Gandi gets bought out, removes free mailboxes](https://news.ycombinator.com/item?id=35080777) - [your.online - Gandi & TWS Join Forces to Form Your.Online](https://your.online/press-release/) - [gandi.net - FAQ – New Mailbox service and management of your current mailboxes](https://news.gandi.net/en/2023/06/faq-new-mailbox-service/) ### Da qui in poi la parte personale Personalmente credo lascerò con loro i domini con scadenza pluriennale, ma per i miei domini .it - che devono esser rinnovati anno per anno - credo inizierò una ricerca per una nuova casa, e se mi troverò bene sposterò anche gli altri. Avete qualche consiglio da darmi? Ormai eran secoli che mi fornivo da loro e lo consigliavo a clienti ed amici. [Aruba](https://hosting.aruba.it/domini/gtld/it.aspx) preferirei evitarlo: ho sentito un numero di storie dell'orrore riguardo la stabilità dei loro servizi, senza considerare che obbligano all'uso della loro orrenda app per il 2FA. Per il problema delle email credo inizialmente utilizzerò qualche servizio come [SimpleLogin](https://simplelogin.io/pricing/) o [AnonAddy](https://anonaddy.com/#pricing) per far il redirect su qualche casella a pagamento che ho già, mentre cerco un'alternativa più stabile. Accetto felicemente consigli anche riguardo a queste! [Tutanota](https://tutanota.com/pricing) e [Protonmail](https://proton.me/mail/pricing) sembran interessanti ma eccessivi per usarli per delle PMI che seguo. ### Note: - Ho cercato di metter i collegamenti alle pagine di pricing, perché probabilmente son quelle più chiare su cosa un servizio dà davvero, invece d'esser solo una collezione di noiose parole chiave. Purtroppo pure lì c'è un sacco di marketing. - Sono cliente di alcuni dei servizi collegati, ma oltre a ciò non ho affiliazioni o interessi monetari in essi. - Questo è il mio primo post, spero di non aver fatto danni! 😄

    22
    21
    Mechanize Now
    4 213

    Mechanize

    feddit.it

    I did nothing and I'm all out of ideas!