Skip to content

Instantly share code, notes, and snippets.

View amb26's full-sized avatar

Antranig Basman amb26

View GitHub Profile
10. Q: What existing data or datasets are you aware of that could help build AI-empowered solutions in this space? What data needs to be collected to be successful?
A: The notion of "collecting" data is inherently faulty and centralising. The communities already have their data, they merely need the tools to express their ownership, control, and relationships which centre on it, at a price they can afford.
Top-level driver:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<link rel="stylesheet" type="text/css" href="../../node_modules/infusion/src/framework/core/css/fluid.css" />
<link rel="stylesheet" type="text/css" href="../../textfieldControl/css/TextfieldSlider.css" />
fluid.renderer.fuseNode = function (target, source) {
while (source.childNodes.length > 0) {
target.appendChild(source.firstChild);
}
for (var i = 0; i < source.attributes.length; i++) {
var attrib = source.attributes[i];
if (attrib.name !== "class" && attrib.name !== "id") {
target.setAttribute(attrib.name, attrib.value);
}
}
Thu, Apr 15 2021
the-t-in-rtf
So, I was reviewing some older fluid-handlebars work and wanted to ask about your current thinking about conditional renderering in the new world.
The simplest example is having different class names on a particular element based on aspects of the model.
A more complex example would be a search, where you might have a bunch of results you want to render, or you might just want to display "no results found" or some other diagnostic.
If each result is a sub-component, that raises one set of questions.
If on the other hand you want to have one thing generate the whole list (or the "no results found" message), it raises another question, namely are there iteration operators.
These two things are most of the useful smart bits in a template language like handlebars.
there's also the ability to create "helpers", so I was wondering about expanders in the future and whether we would be able to refer those in whatever syntax we use to express what should be rendered.
But I kind of thought

forgiving-data

What is this?

Algorithms for processing and relating data in ways which promote ownership, representation and inclusion, maintaining rather than effacing provenance.

How to use it?

This is very early-stage work. The file jobs/WeCount-ODC.json5 contains a very simple three-element

@amb26
amb26 / DataBindingTests.js
Created March 11, 2021 17:27
Boolean lensed components
// Linked from https://github.com/fluid-project/infusion/pull/1038/files#diff-6972ab970b7ccb5a497ebc0fc51a19df59946de2ba24f58b1577c4ae40546f8cR1005-R1036
fluid.defaults("fluid.tests.fluid6390booleanRoot", {
gradeNames: "fluid.modelComponent",
model: {
shouldComponentExist: 1
},
dynamicComponents: {
conditionalComponent: {
source: "{that}.model.shouldComponentExist",
"use strict";
var fluid = require("infusion");
fluid.tangledMat = function (layersIn) {
var that = {
layers: layersIn || [ // Array of {
// layer: Object|Array
// name: String
],
"use strict";
var fluid = require("infusion");
fluid.registerNamespace("fluid.tangledMat");
fluid.tangledMat = function (layersIn) {
var that = {
layers: layersIn || [ // Array of {
// layer: Object|Array
¶Ô²»Æð
\dui4 \bu4 \qi3
\ch{¶Ô}\pro{\dui4}\horr{176}{5}
\link{http://www.zhongwen.com/d/185/d239.htm}
\def{correct, right, proper;face ,oppose;treat}
\exp{foliage measured by a sage}
\ch{Æð}\pro{\qi3}\hor{57}{5}
\link{http://zhongwen.com/d/176/d95.htm}
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10.64 14.59">
<defs>
<style>
.cls-1 {
fill: red;
}
</style>
</defs>
<path
d="M9.23,3h0A4.5,4.5,0,0,0,5.42.79h-.2a4.51,4.51,0,0,0-3.86,6.7L4.63,13.4a.8.8,0,0,0,1.09.29A.92.92,0,0,0,6,13.4L9.29,7.49A4.51,4.51,0,0,0,9.23,3ZM5.32,1.58h.09A3.71,3.71,0,0,1,8.59,7.09L5.32,13,2.05,7.09A3.71,3.71,0,0,1,5.24,1.58Z"