u/ki4jgt

Has anyone experimented with creating their own File System?

Think it would be cool to create something like:

```

ToC

file-x: seek: 2048

2048: file-x contents

```

Or, even better, if the FS was a merkle-dagg with self-healing and native encryption. The ToC could index where all the blocks started, by their individual hashes.

Something you could mount in your native file system, plug other devices into and expand/shrink as needed out of the box. 2 1TB USBs would just instinctively form a 2TB storage system, without any special software.

All files, on both drives fully available to the computer. And, if you really needed access to one particular drive, you could add a subselector to its path.

Add a network exchange protocol, and a fully networked, journaled office filesystem becomes the future of system architecture. Drives would only be unplugged when something needed to be taken out of network. And, if blocks are preencrypted based on user permissions, it wouldn't matter what anyone took home. They couldn't read it.

Edit: Microsoft already has something like this! Dang it!

reddit.com
u/ki4jgt — 17 hours ago

Here's how the Open Cross Network is coming along

I've posted a couple times about an open source P2P communication network, allowing peers to find each other and facilitate UDP hole punching, basically a network of rendezvous nodes.

I'm just a hobby coder, and this isn't anywhere near repo ready yet. Here's what I have thus far.

  • I'm working base10 within the software, but the IDs will be presented to the end user as base16.
  • The peer management logic is ironed out.
  • The main server runs.
  • Now, I just have to implement the routing logic.
  • I'm keeping a list of all pinged nodes, so that hackers can't spoof a bunch of pongs.

If you have suggestions, please let me know.

#!/usr/bin/env python3

# Ocronet (The Open Cross Network) is a volunteer P2P network of international
# registration and peer discovery nodes used for third-party decentralized
# applications.

# The network is organized via a simple chord protocol, with a 16-character
# hexadecimal node ID space. Network navigation and registration rules are set
# by said third-party applications.

# Python was chosen because of its native support for big integers.

# NodeIDs are generated by hashing the node's `ip|port` with SHA3-512.

from socket import socket, AF_INET6, SOCK_DGRAM, SOL_SOCKET, SO_REUSEADDR
from time import sleep, time
from os import name as os_name
from os import system
from concurrent.futures import ThreadPoolExecutor
from hashlib import sha3_512
from collections import Counter
from json import loads, dumps

# Global Functions

if os_name == 'nt':
    def clear():
        system('cls')
else:
    def clear():
        system('clear')

def getNodeNo(data):
    return int.from_bytes(sha3_512(data.encode()).digest()[:8], 'big')

def getNodeID(nodeNo):
    return hex(nodeNo)[2:].upper().zfill(16)

def tally(votes):
    if not votes:
        return None
    tally = Counter(votes).most_common()[0][0]
    return tally

# Global Variables

wheel = [1, 2, 3] + [2**i for i in range(2, 63)]

# Peer Management

class peerManager:
    def __init__(self):
        self.publicAddress = None
        self.idealPeers = []
        self.peers = []
        self.pan = []

        self.threadpool = ThreadPoolExecutor()
        self.threadpool.submit(self._peerMaintenance)

    def _calculateIdealPeers(self):
        self.idealPeers = []
        for i in wheel:
            self.idealPeers.append((self.nodeNo + i) % 1 << 64)

    def _findClosestPeers(self):
        peers = {}
        for entry in self.idealPeers:
            d = 1 << 64
            p = None
            for peer in self.pan[:200]:
                v = [entry, peer]
                v.sort()
                if v[1] - v[0] < d and entry not in peers:
                    p = peer
                    d = v[1] - v[0]
            peers[entry] = p
        
        peerList = []
        for entry in peers:
            peerList.append(peers[entry])
        
        self.peers = peerList

    def consider(self, Address):

        for peer in self.pan:
            if peer[1] == Address:
                peer[2] = time()
                break
        else:
            self.pan.insert(0, [getNodeNo(Address), Address, time()])

    def update(self, Address):
        if self.publicAddress is not Address:
            self.publicAddress = Address
            self.nodeNo = getNodeNo(Address)
            self._calculateIdealPeers()

    def _peerMaintenance(self):
        while True:
            print(f"Peer maintenance: {len(self.peers)} ideal peers, {len(self.pan)} known peers.")

            self.pan.sort(key=lambda x: x[2], reverse=True)

            while len(self.pan) > 1000:
                self.pan.pop()

            self._findClosestPeers()

            sleep(600)

# Main server class

class ocronetServer:
    def __init__(self, **kwargs):
        
        name = "Ocronet 26.05.31"

        clear()
        print(f"======================== {name} ========================")

        # Define and merge user settings with defaults
        self.settings = {
            "address": "::|1984",
            "bootstrap": [],
            "threadLimit": 100
        }
        self.settings.update(kwargs)

        # Create and bind the UDP server socket
        self.server = socket(AF_INET6, SOCK_DGRAM)
        self.server.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
        address = self.settings['address'].split("|")
        self.server.bind((address[0], int(address[1])))

        # Print the server address and port
        print(f"\nOcronet server started on {self.settings["address"]}\n")

        # Declare voting variables
        self.publicAddressVotes = []
        self.publicAddressVoters = []
        self.publicAddress = None
        self.network = peerManager()

        # Start the server and bootstrap threads
        self.mainThreadpool = ThreadPoolExecutor()

        self.mainThreadpool.submit(self._server)
        self.mainThreadpool.submit(self._bootstrap)

        self.pinged = {}

        # Keep the main thread alive
        while True:
            sleep(1)

    def _server(self):
        self.connThreadpool = ThreadPoolExecutor(max_workers=self.settings["threadLimit"])
        while True:
            data, addr = self.server.recvfrom(4096)
            addr = f"{addr[0]}|{addr[1]}"
            if addr == self.settings['address'] or addr == self.publicAddress:
                continue
            try:
                data = loads(data.decode('utf-8'))
            except Exception as e:
                print(f"Error processing data from {addr}: {e}")
                continue
            if not isinstance(data, list) or not data:
                continue
            print(f"Received [{data[0].upper()}] message from {addr}")
            self.connThreadpool.submit(self._handler, data, addr)

    def _handler(self, data, addr):

        match data[0].upper():

            # Info request
            case "INFO":
                self.send(["addr", addr], addr)
            
            case "ADDR":
                if addr not in self.settings["bootstrap"] or addr in self.publicAddressVoters:
                    return
                self.publicAddressVoters.append(addr)
                self.publicAddressVotes.append(data[1])

            # Ping request
            case "PING":
                self.send(["PONG"], addr)
            
            case "PONG":
                self.network.consider(addr)

            # Peer list request
            case "PEERS":
                self.send(["PEERS"] + self.network.peers, addr)

            # Client registration request
            case "CLIENTS":
                pass

            case "REGISTER":
                pass

            # Facilitate introductions between peers
            case "INTRODUCE":
                self.send(["MEET", addr], data[1])

            case "MEET":
                for i in range(5):
                    self.send(["PING"], data[1])

    def send(self, data, addr):
        addr = addr.split("|")
        self.server.sendto(dumps(list(data)).encode(), (addr[0], int(addr[1])))

    def _bootstrap(self):
        while True:

            self.publicAddress = tally(self.publicAddressVotes)
            self.publicAddressVotes, self.publicAddressVoters = [], []

            for peer in self.settings['bootstrap']:
                self.send(["INFO"], peer)
            
            if self.publicAddress:
                self.network.update(self.publicAddress)
                print(f"Public address consensus: {self.publicAddress} (NodeID: {getNodeID(getNodeNo(self.publicAddress))})")
            else:
                print("Getting network consensus.")
                sleep(30)
                continue
            
            sleep(900)

# Testing
if __name__ == "__main__":
    ocronetServer()
reddit.com
u/ki4jgt — 1 day ago
▲ 4 r/AskUS

Are Americans just looking for something that sounds good?

Every president in modern US history has run on a set up of promises that they violated after going into office. And their supporters remained 100% loyal to them.

In one of the largest financial collapses in modern history, are Americans just looking to feel good?

There's a rise in Gen Z men going back to religion -- Gen Z women see it as patriarchal, and their numbers have remained the same. Social scientists are blaming this on resource scarcity and a lack of modern male identity. They don't know where to go, so God provides them a foundation to start from.

And with Trump embracing Christianity, do Americans just vote to feel good, with no idea what the outcome will be? Is that all American voting is?

"I feel like X doesn't like me, and would never include me, so I'm going to vote for Y?"

If it is, how do you guys ever plan to get anywhere? You're trying to legislate the entire world based on your feelings, like a toddler.

reddit.com
u/ki4jgt — 4 days ago

RFC: We need an source alternative to Flock

*open, swyped from a tablet.

I just came upon some law officers online, talking about how great Flock was. There were comments about how it helped prevent a kidnapping. Helped find a stolen car. And how none of the citizens complaining knew what they were talking about. It's clear that these were bots, but I fear we're gonna have to create an open source model to drive Flock out of business.

Whether we like it or not, Flock is pushing this hard. And since monopolies are illegal in the US, they cannot bar an open source project from competing in the same space.

We need cameras capable of logging plates and a central server to log those plates.

There are 2 ways this could go:

  1. Open architecture
  2. Private architecture

Open

Open architecture would have a centralized online hub, where all records were open to all individuals. It would have a map of cameras that were likely hosted by volunteers.

Each camera would keep a text record of every license plate it saw and do a text dump to the central server. Records should contain the user who owns the camera, and the individual camera ID, so users can sort out poisoned data.

The central server would allow searching by plate, user, or camera ID.

Private

Private architecture would allow individual communities to install cameras that reported only to a localized central server, monitored by community watchdogs. And include all the functionality above. Because it's open source, we can always taut the best security on the market.

This software should be completely gratis. Market it to inner city schools trying to keep their kids safe, and places without a budget. Once larger operations see they don't have to pay outrageous fees, they'll switch over.

It would give these communities the right to choose what they shared with outsiders. And have options for their flavor of police state.

All you'd need would be: Python, OpenCV, and Flask.

Call it OpenEye.

Capitalism 101.

reddit.com
u/ki4jgt — 5 days ago

What would a modern take on Eliza look like?

Skip the LLMs.

Eliza was made to be mentally therapeutic, using psychology to help its users explore complex topics.

Axing the LLMs, what would a modern flavor of Eliza look like?

reddit.com
u/ki4jgt — 6 days ago

RFC: Thinking about starting a ring of subs that only use Gregg to thwart AI

Think it would be cool to completely lock AI out of the Internet by having humans switch entirely to Gregg Anniversary Edition. It could be used for forums, emails, websites, etc. The list is endless.

  1. Communities which embraced this idea should prefix themselves with [GS]
  2. Messages should be written on a tablet, with pen, and stored in non-dimensional (no image size defined) .svg format
  3. Post should focus on the Anniversary Edition, as it has the most rules and intuitive inferences

Leaving this open for public comment. You guys have any other suggestions?

reddit.com
u/ki4jgt — 7 days ago
▲ 0 r/Rants

The only reason a religion needs state enforcement is if it isn't true

10 Commandment display locally being discussed.

reddit.com
u/ki4jgt — 11 days ago
▲ 2 r/AskUS

What do you think Edward Snowden's motives were?

Was he draining the swamp?

Was he delivering intel to our enemies?

Were his pants a little too tight, cutting circulation to his manhood?

reddit.com
u/ki4jgt — 11 days ago

I've been wondering this for a long time. Now I've watched a YouTube video making the same complaints. And I have to ask. . . Is Starfleet a dystopia?

From genetically modifying humans to elevate them above things like racism and prejudice to opposing the Maquis (for simply wanting rights). Add in the elevation of certain citizens over others (Picard's huge family estate) with more rights and privileges.

It all seems like a facade to me. What do they do with dissenters who don't want to live under their ideals, within their own territories? The Maquis are pretty much shoot on sight. We see that in DS9.

reddit.com
u/ki4jgt — 16 days ago

Starting with a square, if you turn the angles inwards, towards the center, they cover a full range of vision. Put a triangle inside it, and the triangle takes up half the area of the square. No matter how you warp the square, the triangle takes up half it's area. So, the angles are proportionate to each other and always equal 180. When you turn the points towards each other, they form half a field of vision, or a straight line.

If you put a circle over a square, it covers the square partially, but is 360 degrees.

A circle has no angles, but infinite points, set equidistant from a center point. From a field of vision perspective, the circle has full outward range. You also tend to get an overlap from shapes going above 4 angles. Making something higher than 360. Infinite angles are higher than 4.

My current working theory is that a circle must then be 4 angles already pointed inwards around the central point. And they are not shapes, but perimeters.

reddit.com
u/ki4jgt — 17 days ago

I got this idea from: https://www.reddit.com/r/chaosmagick/comments/1t295vc/burroughs_trump_and_the_cut_up_method/

Just posted this in AskUS, and a couple of the comments disappeared. Don't know if they were mod removed, or if users did it themselves. So, I feel safer asking it here.

All of the answers agreed with each other: Yes, absent Democrats and Republicans, we'd still be having the same political issues. Even under different parties.

Does anyone disagree?

It's a simple question, but it forces the person asking to remove the power of the teams and think on the issues themselves. It makes it so they can't blame the opposing team for anything, and use it to reinforce their views, because that team has no further sway in the conversation.

"If there were no Democrats, or Republicans, would we still be having this talk?"

"Yes."

"Then it isn't the Democrats/Republicans that are making you angry."

reddit.com
u/ki4jgt — 18 days ago
▲ 7 r/AskUS

I see 2 political ideals that keep hitting each other over the heads with rolled up newspapers, for being uncouth. And I have to ask, if there were no Republicans, nor Democrats (for the last 20 years), what political issues would we actually be discussing today?

Edit: I'm seeing that everyone agrees (there were 2 answers, but the second has oddly disappeared) that, even without Democrats and Republicans we'd still be fighting the same issues today.

Does anyone disagree?

reddit.com
u/ki4jgt — 18 days ago
▲ 10 r/Rants

"OK, grampa. Geriatric employees make upto 50% of 'burger flippers' in some chains. You're basically saying, 'I shouldn't be paid more. The government should give me more money.'"

Then he deleted me 🤷‍♀️

reddit.com
u/ki4jgt — 18 days ago

Drunk driving AIs are 98% accurate. At 242 million drivers in the US, that's 5 million false positives per day. 5 million people who cannot start their cars to go shopping, get to work, seek emergency medical attention (which will likely have a higher false positive rate), go check on their friends and families, etc.

Being able to operate your car will essentially be a lottery system. Unless you've got something that is 99.99999% accurate, you're going to end up killing someone trying to flee an emergency.

Do they, or their families, have a case in court against the government, or the car manufacturer? Because, people in the government are college educated. They should know that 99% of anything is statistically low. Yet they pass legislation requiring the tech.

reddit.com
u/ki4jgt — 18 days ago
▲ 0 r/Rants

Using a linux laptop/Raspberry Pi and Python, you can disable any wifi device (security camera, or otherwise) by:

  1. Using raw socket frames to listen for the devices' mac addresses.
  2. Then sending a raw deauth frame to either the device or the router, while assuming the MAC address of the other.

Wifi encryption does not prevent this from happening, as deauth frames are unencrypted. This can be used to knock out any wireless communications and/or security systems that run over wifi.

And, if this doesn't work, you can use other devices to flood the hardware's bluetooth receiver, which will force a remote shutdown.

Have a house you want to rob? Go for it. Just bring a laptop and de-authenticate their security cameras first.

You can find info on creating raw sockets and frames on Google, or by asking ChatGPT.

Remember kids, Capitalism purposefully designs things to be insecure, so that big daddy government can break into your house without asking.

There are fixes to these vulnerabilities, but companies are more interested in money than actually making sure your kids are safe. A deauth frame could be encrypted (behind your router's password) without losing any functionality whatsoever.

Disclaimer: This is for educational purposes only. Do not misuse this.

reddit.com
u/ki4jgt — 19 days ago