Comment on
Parents Sue School That Gave Bad Grade to Student Who Used AI to Complete Assignment
Reply in thread
He already admitted to using AI
Comment on
Parents Sue School That Gave Bad Grade to Student Who Used AI to Complete Assignment
Reply in thread
He already admitted to using AI
Comment on
People who were born in the year 2000 can never forget what age they are.
Reply in thread
I think the point is just that the little bit of math is very easy if you're born in 2000.
Comment on
*Permanently Deleted*
Reply in thread
#define EVER (;;)
Comment on
Spirit Airlines goes out of business after 34 years, ending operations immediately
Reply in thread
He would have wanted to keep the trucks/wheels/bearings/etc (if you keep that stuff a new board alone would be cheaper than the fee) and it's a lot quicker to snap the board than sit there taking it apart.
Comment on
DARPA suggests turning old C code automatically into Rust – using AI, of course
Reply in thread
So a translation of legacy code into Rust would either attain memory safety, or wouldn’t compile.
They'd probably have to make sure it doesn't use the unsafe keyword to guarantee this.
Comment on
*Permanently Deleted*
Reply in thread
404media?
Comment on
*Permanently Deleted*
Reply in thread
The Japanese Mario 2 was released outside of Japan on the Super Nintendo in the Super Mario All-Stars game. It's known as "Super Mario Bros. The Lost Levels" on that cartridge.
Comment on
I'm down with this
Reply in thread
Yeah I don't know if I agree with no socal media at all. I think decentralized social media with no "algorithm" is probably valuable. But I'm still down with the spirit and intention of the post so I upvoted.
But there's days I'd definitely trade social media entirely for good pizza hut again lol
Comment on
Carenheit
I don't really get the hate for fahrenheit. It's a nice 0 to 100 scale for everyday weather temperatures. But also every 10 degrees is different enough that you don't even need to be precise when talking about it: "We'll probably need the AC today, it's going to be in the 80s".
I'm an American that's all for converting to metric but I would still use fahrenheit for weather since it's just so easy and convenient.
Comment on
Master of eastern martial arts
Reply in thread
Keep practicing!
Comment on
🎄 - 2023 DAY 1 SOLUTIONS -🎄
My solution in rust. I'm sure there's a lot more clever ways to do it but this is what I came up with. ::: spoiler Code
use std::{io::prelude::*, fs::File, path::Path, io };
fn main()
{
run_solution(false);
println!("\nPress enter to continue");
let mut buffer = String::new();
io::stdin().read_line(&mut buffer).unwrap();
run_solution(true);
}
fn run_solution(check_for_spelled: bool)
{
let data = load_data("data/input");
println!("\nProcessing Data...");
let mut sum: u64 = 0;
for line in data.lines()
{
// Doesn't seem like the to_ascii_lower call is needed but... just in case
let first = get_digit(line.to_ascii_lowercase().as_bytes(), false, check_for_spelled);
let last = get_digit(line.to_ascii_lowercase().as_bytes(), true, check_for_spelled);
let num = (first * 10) + last;
// println!("\nLine: {} -- First: {}, Second: {}, Num: {}", line, first, last, num);
sum += num as u64;
}
println!("\nFinal Sum: {}", sum);
}
fn get_digit(line: &[u8], from_back: bool, check_for_spelled: bool) -> u8
{
let mut range: Vec = (0..line.len()).collect();
if from_back
{
range.reverse();
}
for i in range
{
if is_num(line[i])
{
return (line[i] - 48) as u8;
}
if check_for_spelled
{
if let Some(num) = is_spelled_num(line, i)
{
return num;
}
}
}
return 0;
}
fn is_num(c: u8) -> bool
{
c >= 48 && c <= 57
}
fn is_spelled_num(line: &[u8], start: usize) -> Option
{
let words = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"];
for word_idx in 0..words.len()
{
let mut i = start;
let mut found = true;
for c in words[word_idx].as_bytes()
{
if i < line.len() && *c != line[i]
{
found = false;
break;
}
i += 1;
}
if found && i <= line.len()
{
return Some(word_idx as u8 + 1);
}
}
return None;
}
fn load_data(file_name: &str) -> String
{
let mut file = match File::open(Path::new(file_name))
{
Ok(file) => file,
Err(why) => panic!("Could not open file {}: {}", Path::new(file_name).display(), why),
};
let mut s = String::new();
let file_contents = match file.read_to_string(&mut s)
{
Err(why) => panic!("couldn't read {}: {}", Path::new(file_name).display(), why),
Ok(_) => s,
};
return file_contents;
}
:::
Comment on
Goth Birthday Party
Reply in thread
Awww Mom! Now I'm even more happy! You ruin EVERYTHING!
Comment on
Legend of Zelda
Reply in thread
The .. uh .. 3rd leg-end...
Comment on
Sperm.
Reply in thread
It's still real to me dammit!
Comment on
Minister Mortimer Adramelech of the Satanic Temple Gives Ultimatum to Iowa Republicans
Reply in thread
Gross