Skip to content

Commit

Permalink
thinking on introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
FadiShawki committed Apr 7, 2024
1 parent 1dacde2 commit a88d209
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 25 deletions.
20 changes: 10 additions & 10 deletions orbitmines.com/src/lib/organizations/temp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ const res = string.split('\n')
.replaceAll(/[- ]/g, "_")
.toUpperCase();

// return `${ref}: <Content>{
// reference: {
// title: '${title}',
// authors: [${authors.map(author => `{name: '${author}'}`).join(',')}],
// organizations: [${organizations.map(org => `ORGANIZATIONS.${org}`)}],
// year: '${year}',
// link: "${link}"
// }, status: Viewed.VIEWED, viewed_at: "2023, December"
// }`
return `REFERENCES.${ref}`;
return `${ref}: <Content>{
reference: {
title: '${title}',
authors: [${authors.map(author => `{name: '${author}'}`).join(',')}],
organizations: [${organizations.map(org => `ORGANIZATIONS.${org}`)}],
year: '${year}',
link: "${link}"
}, status: Viewed.VIEWED, viewed_at: "2023, December"
}`
// return `REFERENCES.${ref}`;
}).join(',\n')
console.log(res);
39 changes: 27 additions & 12 deletions orbitmines.com/src/lib/paper/layout/Reference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {Col, Row} from "../../layout/flexbox";
import ORGANIZATIONS, {TOrganization, TProfile} from "../../organizations/ORGANIZATIONS";
import {RowProps} from "../../layout/flexbox/Row";
import CustomIcon from "../../layout/icons/CustomIcon";
import {or} from "three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements";


export type FootnoteProps = {
Expand Down Expand Up @@ -62,6 +63,7 @@ export const getFootnotes = (node: ReactNode): JSX.Element[] => {
export type ReferenceStyle = {
inline?: boolean,
simple?: boolean,
render?: ReactNode
is?: 'reference' | 'footnote',
}
export type ReferenceProps = {
Expand Down Expand Up @@ -90,6 +92,15 @@ export type ReferenceProps = {
notes?: { render: () => ReactNode, date: string }[]
};

const RefIcon = ({organization}: {organization: TOrganization}) => {
if (organization?.assets?.icon_png)
return <img key={organization.key} src={organization.assets.icon_png} style={{maxWidth: '1rem', verticalAlign: 'middle'}} />;

if (organization?.assets?.icon)
return <CustomIcon icon={organization.key} />

return <></>
}
export const Reference = (props: { reference?: ReferenceProps, target?: string } & React.HTMLAttributes<HTMLElement> & RowProps & ReferenceStyle & FootnoteProps) => {
const {
reference,
Expand All @@ -98,14 +109,15 @@ export const Reference = (props: { reference?: ReferenceProps, target?: string }
simple,
inline = false,
is = 'reference',
render,

index,

children,

...otherProps
} = props;
const {
let {
title,
subtitle,

Expand All @@ -123,6 +135,9 @@ export const Reference = (props: { reference?: ReferenceProps, target?: string }
notes,
} = reference || {};

if (link)
link = link.replace("https://orbitmines.com", "")

const footnote = () => (<span style={{fontSize: '12px'}}>
<Popover
interactionKind="hover"
Expand All @@ -133,7 +148,15 @@ export const Reference = (props: { reference?: ReferenceProps, target?: string }
</FootnoteContent>
</div>}
>
<span className="bp5-text-muted" style={{fontWeight: 'bold'}}>[{index}]</span>
<span className="bp5-text-muted" style={{fontWeight: 'bold'}}>
[
{index}
{link ? <>
{link.startsWith('https://github.com') ? <a href={link} target="_blank"> <RefIcon organization={ORGANIZATIONS.github} /></a> : <></>}
{link.startsWith('/') ? <a href={link} target="_blank"> <RefIcon organization={ORGANIZATIONS.orbitmines_research}/></a> : <></>}
</> : <></>}
]
</span>
</Popover>
</span>)

Expand All @@ -148,7 +171,7 @@ export const Reference = (props: { reference?: ReferenceProps, target?: string }
: _.compact([author ? `${author}.` : author, title ? `"${title}"` : '', journal, year ? `(${year})` : '', pointer]).join(' ')

const inline_reference = () => React.createElement(link ? 'a' : 'span', {
...(link ? { href: link.replace("https://orbitmines.com", ""), target } : {}),
...(link ? { href: link, target } : {}),
children: <>
{display}
</>
Expand All @@ -164,15 +187,7 @@ export const Reference = (props: { reference?: ReferenceProps, target?: string }
{React.createElement(link ? 'a' : 'span', {
...(link ? { href: link.replace("https://orbitmines.com", ""), target, className: 'child-mr-2' } : {}),
children: <>
{(organizations ?? []).map(organization => {
if (organization?.assets?.icon_png)
return <img key={organization.key} src={organization.assets.icon_png} style={{maxWidth: '1rem', verticalAlign: 'middle'}} />;

if (organization?.assets?.icon)
return <CustomIcon icon={organization.key} />

return <></>
})}
{(organizations ?? []).map(organization => <RefIcon organization={organization} />)}
<Rendered renderable={title} />
</>
})}
Expand Down
26 changes: 23 additions & 3 deletions orbitmines.com/src/routes/papers/2024.AUniversalLanguage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const A_UNIVERSAL_LANGUAGE: Content = {
draft: true,
link: 'https://orbitmines.com/papers/a-universal-language',
year: "2024",
date: "2024-04-30",
date: "2024-05-31",
external: {
// TODO
// discord: {serverId: '1055502602365845534', channelId: '1190719376085766195', link: () => "https://discord.com/channels/1055502602365845534/1190719376085766195/1190719376085766195"}
Expand All @@ -46,7 +46,7 @@ const AUniversalLanguage = () => {
...A_UNIVERSAL_LANGUAGE.reference,
subtitle: renderable<string>("", (value: any) => <>
One Ray to rule them all, One Ray to find them,<BR/> One Ray to bring them all, and in the darkness bind them.<BR/><div className="pt-15"/> Explore a technical deep dive into Rays {<Reference is="footnote" index={referenceCounter()} reference={{...ON_ORBITS.reference}}/>} <Reference is="footnote" index={referenceCounter()} reference={{title: 'github.com/orbitmines/ray', link: 'https://github.com/orbitmines/ray', authors: [{
...PROFILES.fadi_shawki}], organizations: [ORGANIZATIONS.github]}}/>. Accompanied by a simple implementation of <Reference is="reference" simple inline index={referenceCounter()} reference={{title: 'Aleks Kissinger\'s Chyp (Cospans of HYPergraphs)', link: 'https://github.com/akissinger/chyp', authors: [{name: 'Aleks Kissinger'}]}} />.
...PROFILES.fadi_shawki}], organizations: [ORGANIZATIONS.github]}} />. Accompanied by a simple implementation of <Reference is="reference" simple inline index={referenceCounter()} reference={{title: 'Aleks Kissinger\'s Chyp (Cospans of HYPergraphs)', link: 'https://github.com/akissinger/chyp', authors: [{name: 'Aleks Kissinger'}]}} />.
</>),
pdf: {
fonts: [JetBrainsMono],
Expand All @@ -60,8 +60,28 @@ const AUniversalLanguage = () => {
>
<Row center="xs">
<Section head="Introduction">

This thing is, in essence, a language to understand inconsistencies. A conceptual framework to make sense of ambiguity: A story of how destructively confusing languages can be. Though to me, most importantly, it is here as infrastructure. Infrastructure for the design and implementation of a <Reference is="reference" index={referenceCounter()} reference={{link: _2024_02_ORBITMINES_AS_A_GAME_PROJECT.reference.link, title: "different category of (programming) interfaces"}} simple inline />.

<BR/>

<span style={{textAlign: 'left', minWidth: '100%'}}>A simple way of phrasing this, is that the concept of a <span
className="bp5-text-muted"><span
className="bp5-text-disabled">(hyper-/)</span>'Vertex', <span
className="bp5-text-disabled">(hyper-/)</span>'Edge', <span
className="bp5-text-disabled">(hyper-/)</span>'Graph', <span
className="bp5-text-disabled">(hyper-/)</span>'Rule', <span
className="bp5-text-disabled">(hyper-/)</span>'Tactic', <span
className="bp5-text-disabled">(hyper-/)</span>..., <span
className="bp5-text-disabled">(hyper-/)</span>'Rewrite'</span> are merged into one thing: a Ray. It handles <span
className="bp5-text-muted">surrounding context, ignorances, equivalences, ..., differentiation</span> (And if it cannot, then it offers a way of implementing it for all of the above).</span>

<BR/>

<span style={{textAlign: 'left', minWidth: '100%'}}>Though quite importantly, even if those previous words are complete nonsense to you: Either this, or projects following from this, will aid in your understanding. This is the start of a story which will provide infrastructure for communication between all <span className="bp5-text-muted">sciences, (programming) languages, compilers, interfaces, ..., videogames</span>.</span>

<BR/>

Let me show you how.
</Section>
</Row>
</Paper>
Expand Down

0 comments on commit a88d209

Please sign in to comment.