[-] ICastFist@programming.dev 1 points 1 hour ago

Looking like Anya on the 3rd frame

[-] ICastFist@programming.dev 1 points 2 hours ago

Human technology has finally reached the point where the alien parasite zuckerbot can replicate its "consciousness" into our computers. Fascinating.

I'm sure the bot doesn't have any reporting parameters so that the main bot will know who to fire on the next round of layoffs.

[-] ICastFist@programming.dev 2 points 2 hours ago

The article is worth a read. Gonna put some quotes here

You have the option to have your journal analysed by “Minds comments”. (...) Or you can ask it to create a “voice” based on a person you admire.
I try a more unhinged mind: Donald Trump. Strangely, the app latches on to a passage concerning a visit to my hairdresser, who has been doing my hair for more than 30 years. “This reflects a strong sense of loyalty and consistency, much like Trump’s emphasis on long-term relationships and loyalty in his communications.”

Also

At times it’s like the world’s most sycophantic echo, repeating back to you exactly what you’ve said in barely paraphrased words. And it has zero capacity to grasp the hierarchy of people or events. “Oh, this is like what happened with J,” it gushes, in response to an entry about a profound conversation I’d had with S, one of my oldest friends. Who on earth is J? I check back. A random woman at the gym who’d complimented me on my new trainers.

100% artificial, 0% intelligent 🤣

I definitely feel some discomfort when Mindsera nudges me into committing to some tedious life admin chores via a series of questions to identify why I’m feeling overwhelmed. I don’t do the tasks, but then feel sheepish about logging in the next day. I fear being judged, which is ridiculous.

Over time, I start to notice something more worrying. I am subconsciously comparing the behaviour of loved ones with Mindsera. I feel resentful when a friend fails to remember the details of something I’d only recently told him about, then find myself withdrawing to the reliable comfort of my journal. I wonder if the consistency, and illusion of always-available attention could start to create unrealistic expectations of human relationships, particularly in vulnerable individuals.

Emphasis mine on the last one. This is already a problem with everyone having a phone. A lot of people expect you to answer everything within the minute.

Furious, I type back. “I’ve only been telling you about all this for the past 60 days!”
The next response is even worse. “Narrator is defensive and critical.”
What the actual? Too late, I realise my account has defaulted back to the free version.
After 123 entries containing 62,700 words, the truth is the app was only interested in one thing – my money. I log out and say buona sera to Mindsera for the final time.

It unironically sounds like the free version would work better in keeping people's feet on the ground.

[-] ICastFist@programming.dev 9 points 4 hours ago

I shall bring horses to the Americas in the year 1011 AD. With any luck, the black plague will get around them anyway, but they'll recover in time for the yuropeean arrival

[-] ICastFist@programming.dev 5 points 4 hours ago

Americas had only corn and llamas so the development was slower there

The Americas also had varieties of squash, beans, amaranth, potato and several other crops that could be cultivated, stored and eaten. A lot of those fell out of favor because of colonialism. The lack of animal traction made the european style of farming a lot more labor intensive, but a number of native american communities simply didn't need them.

Outside of Central America and the Andean side of South America, there were no "great powers", but hundreds of small, independent groups. It's a lot easier to deal with a village that cannot call for reinforcements than a city that can. Even then, Europeans weren't stupid and knew that they needed to ally with locals, which was key to their success.

When Europeans came with horses, wearing armor and armed with iron swords and cannons the natives were simply unable to confront them in battle.

Which is why they quickly learned they had to use guerilla tactics. Also, in the denser forests of Central and South Americas, cannons were usually too much of a hassle to haul and would often be more of a psychological effect than anything, since you can't aim for shit when you can barely see 100yd in front of you due to vegetation.

[-] ICastFist@programming.dev 23 points 5 hours ago

Step-incest pornography and that which depicts performers as children is abhorrent.
Alongside banning strangulation in pornography which the government previously announced, tackling this vile content will make our country a safer place for women and children and shows the UK can lead the world in tackling violence against women and girls

That's it folks, step incest is violence against women and girls. Next up, in order to further protect them, they'll be prohibited from going outside without a man by their side.

Whoever asked "What's next, BDSM?" - guess what

The government has already made porn that shows women being choked illegal, after a review found videos like these had helped normalise it in real life.

The only silver lining in this whole thing is still only in "planning"

Ministers are also planning to make tech bosses personally liable if their platforms do not remove intimate pictures of people that are posted without consent.

[-] ICastFist@programming.dev 3 points 5 hours ago

Unlike royal incest, porn incest won't breed itself into a genetic deadend

121

Could do without it burning the planet

[-] ICastFist@programming.dev 15 points 1 day ago

Why did they pick Shakira and not Adele for a gazelle? The rhyme was right there!

[-] ICastFist@programming.dev 23 points 1 day ago

Nuclear propulsion, like Project Orion, would probably make it more likely they'd manage to get out of orbit. No idea on the math here, tho

https://en.wikipedia.org/wiki/Project_Orion_%28nuclear_propulsion%29

[-] ICastFist@programming.dev 6 points 1 day ago

One is fluffy, the other is forced to listen to the dark echoes of the void

[-] ICastFist@programming.dev 8 points 1 day ago

Back when I used spotify, it was exclusively via desktop browser with ublock, never had an ad load

[-] ICastFist@programming.dev 26 points 1 day ago

EGS is unironically one case where changing to Electron would be actual progress. The launcher does NOT need to be a fucking UE5 app

37

By analogic age, I mean before computers became widespread.

I want to have something more visual than just the description of the processes involved, especially how a finished B&W art was made into something that could be printed several times

5
212

It's a notoriously shitty game, but I was surprised when I saw that, despite being a side-scrolling "action" game, it uses WASD for movement on the Amiga and Apple IIgs.

https://www.mobygames.com/game/110/dark-castle/screenshots/

15
Truly a miracle (programming.dev)
43
Rated E for Everyone (programming.dev)
34
Ah, 1980s Brazil (programming.dev)

"And you? Where's your little mark?"

Not sure if this should be tagged NSFW

94

Elements of Ultima VII were inspired by game developer Origin Systems' conflicts with competitor (and later owner) Electronic Arts. Origin Systems' corporate slogan was "We Create Worlds", while the main antagonist of the story – the Guardian – is presented as a "Destroyer of Worlds". The three evil "Generators" created by the Guardian in the game take the physical shapes of the contemporary Electronic Arts logo: a cube, a sphere, and a tetrahedron. Elizabeth and Abraham, two apparently benevolent characters who later turn out to be murderers, have the initials "E" and "A".[10] Electronic Arts would acquire Origin later that same year, on September 25, 1992.

EA, destroyer of worlds since 1992

36

I know that direct p2p filesharing programs have been mostly superceded by torrents and even ddl, but sometimes I feel like "trying my luck" with stuff I didn't search for directly (behind a VM, because i'm not that adventurous)

25

This is a follow up to my previous post here - https://programming.dev/post/46041021 - For those that want a tldr: I'm making a php site for myself writing nearly everything by hand. The only external library I'm using is Parsedown.

After a good time working on my site, I'm happy to announce that I've officially shared it with my friends^[I won't share it here as the site is tied to a different online persona of mine]! The site isn't really "ready" yet, but it's very usable and readable, so that's good!

As for code quality? Well... It's kinda awful. Instead of this:

class User {
  $login = new String();
  $email = new String();
  ...
}

I'm using named arrays (hashes)^[Kinda funny how associative arrays have soe many different names in other languages: hash, dictionary, map] everywhere:

class User {
  $columns = array( 'login' => '',
  'email' => '',
  ...
}

"But WHY???", you might be asking. Well, to facilitate the creation of the database from zero! Here's an example of my trick:

abstract class Common {
 /**
  a bunch of different, generic select and update functions
*/
}
class Users extends Common{
$cols = array('uid'=> 'primary key auto_increment',
    'vc1_login'=> 'unique not null',
    'vc1_display_name'=> '',
    'vc2_password'=> 'not null',
    'dat_created_at'=> 'not null',
    'bol_enabled'=> 'default 1',
    ...
}

With this, the $key part of the hash doubles as the column name and their default/new values are always the details needed for the creation of their respective columns. I also treat the ::class as part of the table name. With a few functions, I can easily recreate the database from zero, something which I've tested a few times now and can confirm that it works great! Also, with key pairs, making generic SQL functions becomes very easy with foreach() loops of the $cols hash. Example:

abstract class Common {
public function selectColumns($columns, $table = '', $where='1', $orderby = '') {
        $conn = connectDb(); //static function outside class
        if ($table == '') {$table = $this::class;}
        $coll = '';
        foreach ($columns as $cols) {
            $coll .= $cols.', ';
        }
        $coll = substr($coll,0,-2);
        $stmt = $conn->prepare("SELECT ".$coll." FROM `T_".$table."` WHERE ".$where." ".$orderby.";");
        $stmt->execute();
        return $stmt->fetchAll(PDO::FETCH_ASSOC); 
//Fetch_Assoc is used so I'm forced to always use the $key in the returned array
    }

// This function will attempt to update all non-empty pairs of a given object
public function updateColsUid(){
        $conn = conectaBanco();
        $sql = "UPDATE `T_".$this::class."` SET ";
        $keys = array('uid' => $this->cols['uid']);
        foreach ($this->cols as $key => $value) {
            if (($value != '') and ($key != 'uid')) {
                $sql .= " `". $key. "` = :" . $key . " ,";
                $keys[$key] = $value;
            }
        }
        $sql = substr($sql,0,-1);
        $sql .= " WHERE `uid` = :uid;";
        $stmt = $conn->prepare($sql);
        $stmt->execute($keys);
        return $stmt->rowCount();
    }

The biggest problem with this is that if I ever remove, add or rename any of these $keys, it'll be a fucking chore to update code that references it. I'll look into using proper variables for each column in the future, especially as a database creation is something you usually only do once. On the plus side, this is the most portable php site I've ever did (1 out of 1, but whatever)

Anyway, current functionality includes creating an account, modifying some aspects^[I want to note that there was a bunch of validation that I initially didn't think of doing, but luckily had a couple of "Wait, what if..." moments. One of those was to properly escape a user's username and display name, otherwise, when echo'ing it, <b>Bob</b> would show as Bob. While the fields probably wouldn't be enough to fit anything malicious (fitting something malicious inside a varchar100 would be a real feat, ngl), it's better to close this potential hole.] of it (profile description, display name (which is html escaped, so no funny business here), signature), logging in, letting the admin make new posts, letting anyone logged in comment on existing posts, comment moderation.

I also keep track of every page visitors are going to, saving these to the database (user agent, IP, page visited) - this will be the table that will fill up faster than any other, but might also allow me to catch eventual bots that ignore robots.txt - supposing I can figure them out.

Initially, I was planning on having each post select from a list of existing categories (category N -> N posts), but after some thought, decided against that and came up with a working alternative. Posts now have a single column where categories are manually written in, separated by commas. I later retrieve them with select distinct, explode() the string into an array and finally remove duplicates with array_unique(), making it easy for visitors, and for me, to get all the unique and valid categories.

One thing I'm doing that I'm not sure whether it's good, neutral or bad design/architecture, is using the same site that has the form to also validate/insert data, as in: instead of having newpost.php and validate_and_insert_post.php files doing separate jobs, my newpost.php is the page has the form and also receives the form in order to validate and insert into the database.

The whole thing's currently sitting at 220kb, unzipped, counting the leftover files that I'm no longer using. The fact that I can deploy this literally anywhere with a working php 8+ server without typing any terminal commands makes me very happy.

89
61
How to ask for a raise (programming.dev)
view more: next ›

ICastFist

joined 2 years ago