Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
amirouche committed Dec 3, 2023
1 parent 9f3fd0c commit 2887a0b
Show file tree
Hide file tree
Showing 7 changed files with 556 additions and 54 deletions.
6 changes: 3 additions & 3 deletions found/ffw.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HTMLElement: # inspired from nevow
"""

__slots__ = ('_tag', '_children', '_properties')
__slots__ = ("_tag", "_children", "_properties")

def __init__(self, tag):
self._tag = tag
Expand All @@ -34,7 +34,7 @@ def __call__(self, **properties):
return self

def __repr__(self):
return '<HTMLElement: %s %s>' % (self._tag, self._properties)
return "<HTMLElement: %s %s>" % (self._tag, self._properties)

def extend(self, nodes):
for node in nodes:
Expand Down Expand Up @@ -151,7 +151,7 @@ def recurse(element):
]

for key, value in element._properties.items():
if key.startswith('on'):
if key.startswith("on"):
uid = uuid4().hex
# XXX: mutate non-local dictionary called `events`
assert callable(value)
Expand Down
54 changes: 54 additions & 0 deletions found/templates/history-change.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!doctype html>
<html lang="en" data-bs-theme="auto">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Amirouche A. BOUBEKKI et al.">
<meta name="generator" content="Le Blanc-Mesnil">
<title>found vnstore</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
</head>
<body>
<div class="bg-primary text-secondary px-7 py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col lh-base">
<h2>🔠🔡🔢🔣</h2>
<h1 class="display-5 fw-bold text-white">found vnstore</h1>
<p class="display-7 fw-bold text-white">Where Time Meets Data - Seamless Versioning, Infinite Possibilities.</p>
</div>
</div>
</div>
</div>
<div class="bg-light text-secondary px-7 py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col lh-base">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">home</a></li>
<li class="breadcrumb-item"><a href="/history/">history</a></li>
<li class="breadcrumb-item active" aria-current="page">change</li>
</ol>
</nav>
</div>
</div>
</div>
</div>

<div class="container py-5 px-7" >
<h2>make a change</h2>
<p>Coming Soon: Your Turn to Shape the Story! vnstore is gearing up for your change. Get ready to describe the twist you're adding to the data tale. Stay tuned for your moment to make a mark—describe the change and be part of our evolving narrative!</p>
<div class="row row-cols-1 row-cols-md-3 mb-3">
<form method="POST">
<div class="mb-3">
<label for="description" class="form-label">Describe the change you will make:</label>
<textarea class="form-control" id="description" name="description" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</body>
</html>
51 changes: 51 additions & 0 deletions found/templates/history-detail-add.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{% extends "history-detail.html" %}

{% block action %}

<div class="modal" tabindex="-1" style="display: block; background: hsla(0, 100%, 100%, 0.75)">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<a href="/history/u/{{ uid.hex}}/" type="button" class="btn-close" aria-label="Close"></a>
</div>
<form method="POST">
<div class="modal-body">
<div class="mb-3">
<label for="uid" class="form-label">identifier:</label>
<input name=uid class="form-control" id="uid" placeholder="fd5eee01563441b284608020c30762b2">
<div class="form-text">
The identifier associated with the entity your are
editing. For new entities, use <code>_</code> to
generate a new unique identifier.
</div>
</div>
<div class="mb-3">
<label for="key" class="form-label">key name:</label>
<input name=key class="form-control" id="key" placeholder="label">
<div class="form-text">
A key name can be a hexadecimal string or one
or more english words. For example <code>label</code> is
used to associate label with the entity with the <code>identifier</code>
given in the previous box.
</div>
</div>
<div class="mb-3">
<label for="value" class="form-label">value:</label>
<input name=value class="form-control" id="value" placeholder="vnstore found">
</div>
<div class="form-text">
For the given <code>identifier</code>, and <code>key name</code> provide
a value that is associated with them.
</div>
</div>
<div class="modal-footer">
<a href="/history/u/{{ uid.hex}}/" type="button" class="btn btn-secondary" data-bs-dismiss="modal">close</a>
<button type="submit" class="btn btn-primary">add change</button>
</div>
</form>
</div>
</div>
</div>

{% endblock %}
88 changes: 88 additions & 0 deletions found/templates/history-detail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!doctype html>
<html lang="en" data-bs-theme="auto">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Amirouche A. BOUBEKKI et al.">
<meta name="generator" content="Le Blanc-Mesnil">
<title>found vnstore</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
</head>
<body>
<div class="bg-primary text-secondary px-7 py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col lh-base">
<h2>🔠🔡🔢🔣</h2>
<h1 class="display-5 fw-bold text-white">found vnstore</h1>
<p class="display-7 fw-bold text-white">Where Time Meets Data - Seamless Versioning, Infinite Possibilities.</p>
</div>
</div>
</div>
</div>
<div class="bg-light text-secondary px-7 py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col lh-base">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">home</a></li>
<li class="breadcrumb-item"><a href="/history/">history</a></li>
<li class="breadcrumb-item active" aria-current="page">
<a href="/history/{{ uid.hex }}/">
<code>{{ uid.hex }}</code>
</a>
</li>
<li class="breadcrumb-item active" aria-current="page">{{ message }}</li>
</ol>
</nav>
</div>
</div>
</div>
</div>

<div class="container py-5 px-7" >
<div class="row row-cols-6">
<div class="col-2">
<h2>to do</h2>
<div class="list-group">
<a href="/history/u/{{ uid.hex }}/add/" class="list-group-item list-group-item-action active" aria-current="true">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">add</h5>
</div>
<!-- <p class="mb-1">You known something.</p>
<small>And some small print.</small> -->
</a>
<a href="/history/u/{{ uid.hex }}/remove/" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">remove</h5>
</div>
<!-- <p class="mb-1">Some placeholder content in a paragraph.</p>
<small class="text-body-secondary">And some muted small print.</small> -->
</a>
<!-- <a href="#" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">List group item heading</h5>
<small class="text-body-secondary">3 days ago</small>
</div>
<p class="mb-1">Some placeholder content in a paragraph.</p>
<small class="text-body-secondary">And some muted small print.</small>
</a> -->
</div>
</div>
<div class="col-10">
<h2>to do</h2>
<div class="alert alert-primary" role="alert">
Alert! The Data Canvas Awaits! 🚀 No changes
detected. Time to add, remove, or modify tuples and
infuse life into our database. Your input sparks the
evolution—let's make waves together! Click to
contribute and shape the future of our data.
</div>
</div>
</div>
</div>
{% block action %}{% endblock %}
</body>
</html>
47 changes: 47 additions & 0 deletions found/templates/history-list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!doctype html>
<html lang="en" data-bs-theme="auto">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Amirouche A. BOUBEKKI et al.">
<meta name="generator" content="Le Blanc-Mesnil">
<title>found vnstore</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
</head>
<body>
<div class="bg-primary text-secondary px-7 py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col lh-base">
<h2>🔠🔡🔢🔣</h2>
<h1 class="display-5 fw-bold text-white">found vnstore</h1>
<p class="display-7 fw-bold text-white">Where Time Meets Data - Seamless Versioning, Infinite Possibilities.</p>
</div>
</div>
</div>
</div>
<div class="bg-light text-secondary px-7 py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col lh-base">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">home</a></li>
<li class="breadcrumb-item"><a href="/history/">history</a></li>
</ol>
</nav>
</div>
</div>
</div>
</div>

<div class="container py-5 px-7" >
<ul class="list-group">
{% for change in changes %}
<li class="list-group-item"><a href="/history/u/{{ change.uid.hex }}/">{{ change.message }}</a></li>
{% endfor %}
</ul>
</div>
</body>
</html>
28 changes: 18 additions & 10 deletions found/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
<!doctype html>
<html lang="en" data-bs-theme="auto">
<head><script src="/docs/5.3/assets/js/color-modes.js"></script>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Amirouche A. Amazigh et al.">
<meta name="author" content="Amirouche A. BOUBEKKI et al.">
<meta name="generator" content="Le Blanc-Mesnil">
<title>found vnstore</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
</head>
<body>
<div class="bg-dark text-secondary px-7 py-5">
<div class="bg-primary text-secondary px-7 py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col lh-base">
<h2>🔠🔡🔢🔣</h2>
<h1 class="display-5 fw-bold text-white">found vnstore</h1>
<p class="display-7 fw-bold text-white">lego tool of transactional structured knowledge.</p>
<p class="display-7 text-white">The generic tuple store (code named <code>vnstore</code>) can time travel at any point in history while being able to query and modify the latest data. It is implemented using a novel approach powered by an algorithm documented by Erdős. Versioning in production systems is a trick everybody knows about whether it is through backup, logging systems and ad-hoc audit trails. It allows to inspect, debug and in worst cases rollback to previous states. There is not need to explain the great importance of versioning in the production of software as tools like git have shaped our times. Having the power of versioning open the door to maifold applications. It allows to implement a mechanic similar to github's pull requests over very large data sets. That very mechanic is explicit about the people workflow, in particular, when a person validates a change made by another person online in order to produce the output.</p>
<p class="display-7 text-white">The versioned generic tuple store make the implementation of history, and co-op mechanics more systematic and less error prone as the implementation can be shared across various tools.</p>
<p class="display-7 fw-bold text-white">Where Time Meets Data - Seamless Versioning, Infinite Possibilities.</p>
</div>
</div>
</div>
</div>
<div class="bg-light text-secondary px-7 py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col lh-base">
<p class="display-7 text-black">Introducing our game-changing versioned generic tuple store, affectionately known as "vnstore". This innovative data powerhouse transcends the constraints of traditional databases, offering a unique ability to time travel through historical data while effortlessly querying and modifying the latest information. Behind its curtain lies a groundbreaking implementation, fueled by an algorithm with roots traced back to the brilliant mind of Erdős.</p>
<p class="display-7 text-black">While versioning in production systems is a well-known art, our vnstore transforms it into a science, seamlessly integrating inspection, debugging, and even rollbacks into its core functionality. Versioning, a cornerstone in software production exemplified by tools like Git, takes center stage, unlocking a myriad of applications. Imagine implementing a mechanic akin to GitHub's pull requests on expansive datasets—our vnstore makes it possible.</p>
<p class="display-7 text-black">What sets vnstore apart is its systematic approach to implementing history and cooperative mechanics. By providing a shared implementation across various tools, it not only enhances efficiency but also minimizes errors. Whether navigating through historical data or orchestrating collaborative workflows, vnstore is the key to a more streamlined, error-resistant data future. Welcome to a new era where versioning meets versatility, and every query is a journey through time and possibility.</p>
</div>
</div>
</div>
Expand All @@ -29,7 +37,7 @@ <h1 class="display-5 fw-bold text-white">found vnstore</h1>

<div class="row row-cols-1 row-cols-md-3 mb-3">
<div class="col">
<a href="/navigate" class="card mb-4 rounded-3 shadow-sm">
<a href="/navigate/" class="card mb-4 rounded-3 shadow-sm">
<div class="card-header py-3">
<h4 class="my-0 fw-normal">navigate</h4>
</div>
Expand All @@ -39,7 +47,7 @@ <h4 class="my-0 fw-normal">navigate</h4>
</a>
</div>
<div class="col">
<a href="/history" class="card mb-4 rounded-3 shadow-sm">
<a href="/history/" class="card mb-4 rounded-3 shadow-sm">
<div class="card-header py-3">
<h4 class="my-0 fw-normal">history</h4>
</div>
Expand All @@ -49,7 +57,7 @@ <h4 class="my-0 fw-normal">history</h4>
</a>
</div>
<div class="col">
<a href="/change" class="card mb-4 rounded-3 shadow-sm border-primary">
<a href="/history/change/" class="card mb-4 rounded-3 shadow-sm border-primary">
<div class="card-header py-3 text-bg-primary border-primary">
<h4 class="my-0 fw-normal">change</h4>
</div>
Expand Down
Loading

0 comments on commit 2887a0b

Please sign in to comment.