Build a Canvas App for a habit tracker using use-fireproof, where:
Data Model
• One document per habit
{ "type": "habit", "name": "Drink Water", "created": Date.now(),
const mockUseFireproof = (dbName) => { | |
const [state, setState] = React.useState({ | |
database: null, | |
docs: [] | |
}); | |
// Initialize database if not already done | |
React.useEffect(() => { | |
if (!state.database) { | |
setState(s => ({ |
Build a Canvas App for a habit tracker using use-fireproof, where:
Data Model
• One document per habit
{ "type": "habit", "name": "Drink Water", "created": Date.now(),
import { useFireproof } from "use-fireproof"; | |
import { connect } from "@fireproof/cloud"; | |
export default function App() { | |
const { database, useLiveQuery, useDocument } = useFireproof("my_db"); | |
connect(database, '0192b029-0021-7b91-b49d-c5423607bc7b'); | |
const { docs } = useLiveQuery("_id"); | |
const [newDoc, setNewDoc, saveNewDoc] = useDocument({ input: "" }); |
Fireproof’s groundbreaking data management approach leverages cryptographic techniques like Merkle proofs and prolly trees to support cloudless, data-anywhere capabilities. Because the data is verified and content-addressed, it can be trusted irrespective of its geographical location or source, allowing applications to interact with the fastest copy. Fireproof’s location independence significantly reduces operational burdens. It also allows the database to avoid setup or configuration until after your application is up and running.
Fireproof’s rigorous commitment to data security includes end-to-end encryption which manages keys separately from the data itself, enabling the data to be stored on untrusted services while the keys remain secure in your existing auth system.
The Entailment Relationship in Turing Machines and the Lack of Aggregated Experience | |
Abstract: | |
The logical rules of a Turing machine dictate the behavior of the machine and its pattern implementation. This relationship between the rules and the patterns is one of entailment, meaning that the patterns are completely determined by the rules. This narrows the causal channel of the machine's substrate components, meaning that the behavior of the substrate is limited to the rules of the game and cannot be influenced by any other factors. As a result, the aggregation of animist experience from the matter level to the pattern level is prevented, as the rules of the game do not allow for any meaningful interaction between the substrate and the patterns. | |
Central Argument: | |
The central argument is that the rules of a finite state machine, such as a card game or a Turing machine, create an entailment relationship that blocks any meaningful causation between the units of the substrate. This results in a lack of aggregat |
⌚️📸📺🔭💎🎥🏰🏍🛴🚲🎸🎻🛹🌂 |
import faunadb, {query as q} from 'faunadb' | |
const client = new faunadb.Client({ | |
secret: "x" | |
}); | |
// jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000 | |
async function runThese() { | |
var edits = 20 |
import faunadb, {query as q} from 'faunadb'; | |
const client = new faunadb.Client({ | |
secret: "XXXXXX" | |
}); | |
async function runThese() { | |
const ref = q.Ref(q.Class("posts"), 6) |
var faunadb = require("faunadb"); | |
var q = faunadb.query; | |
var client = new faunadb.Client({ | |
secret: "secret", | |
scheme: 'http', | |
domain: '127.0.0.1', | |
port: 8443 | |
}) |
package main | |
import ( | |
"fmt" | |
f "github.com/faunadb/faunadb-go/faunadb" | |
) | |
// I guess we can blog about how easy is to integrate your data structures with fauna using the go driver | |
// which, in my opinion, is one of the easiest so far. |