<!--{{{--> <link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' /> <!--}}}-->
Background: #fff Foreground: #000 PrimaryPale: #8cf PrimaryLight: #18f PrimaryMid: #04b PrimaryDark: #014 SecondaryPale: #ffc SecondaryLight: #fe8 SecondaryMid: #db4 SecondaryDark: #841 TertiaryPale: #eee TertiaryLight: #ccc TertiaryMid: #999 TertiaryDark: #666 Error: #f88
/*{{{*/ body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];} a {color:[[ColorPalette::PrimaryMid]];} a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];} a img {border:0;} h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;} h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];} h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];} .button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];} .button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];} .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];} .header {background:[[ColorPalette::PrimaryMid]];} .headerShadow {color:[[ColorPalette::Foreground]];} .headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];} .headerForeground {color:[[ColorPalette::Background]];} .headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];} .tabSelected{color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border-left:1px solid [[ColorPalette::TertiaryLight]]; border-top:1px solid [[ColorPalette::TertiaryLight]]; border-right:1px solid [[ColorPalette::TertiaryLight]]; } .tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];} .tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];} .tabContents .button {border:0;} #sidebar {} #sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];} #sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];} #sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];} #sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];} #sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];} .wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];} .wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;} .wizard h2 {color:[[ColorPalette::Foreground]]; border:none;} .wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]]; border:1px solid [[ColorPalette::PrimaryMid]];} .wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];} .wizardFooter {background:[[ColorPalette::PrimaryPale]];} .wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];} .wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid; border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];} .wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];} .wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid; border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];} .wizard .notChanged {background:transparent;} .wizard .changedLocally {background:#80ff80;} .wizard .changedServer {background:#8080ff;} .wizard .changedBoth {background:#ff8080;} .wizard .notFound {background:#ffff80;} .wizard .putToServer {background:#ff80ff;} .wizard .gotFromServer {background:#80ffff;} #messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];} #messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;} .popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];} .popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];} .popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;} .popup li.disabled {color:[[ColorPalette::TertiaryMid]];} .popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;} .popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;} .popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;} .popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];} .listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];} .tiddler .defaultCommand {font-weight:bold;} .shadow .title {color:[[ColorPalette::TertiaryDark]];} .title {color:[[ColorPalette::SecondaryDark]];} .subtitle {color:[[ColorPalette::TertiaryDark]];} .toolbar {color:[[ColorPalette::PrimaryMid]];} .toolbar a {color:[[ColorPalette::TertiaryLight]];} .selected .toolbar a {color:[[ColorPalette::TertiaryMid]];} .selected .toolbar a:hover {color:[[ColorPalette::Foreground]];} .tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];} .selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];} .tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];} .tagging .button, .tagged .button {border:none;} .footer {color:[[ColorPalette::TertiaryLight]];} .selected .footer {color:[[ColorPalette::TertiaryMid]];} .sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;} .sparktick {background:[[ColorPalette::PrimaryDark]];} .error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];} .warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];} .lowlight {background:[[ColorPalette::TertiaryLight]];} .zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];} .imageLink, #displayArea .imageLink {background:transparent;} .annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];} .viewer .listTitle {list-style-type:none; margin-left:-2em;} .viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];} .viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];} .viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];} .viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];} .viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];} .viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];} .viewer code {color:[[ColorPalette::SecondaryDark]];} .viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];} .highlight, .marked {background:[[ColorPalette::SecondaryLight]];} .editor input {border:1px solid [[ColorPalette::PrimaryMid]];} .editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;} .editorFooter {color:[[ColorPalette::TertiaryMid]];} .readOnly {background:[[ColorPalette::TertiaryPale]];} #backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];} #backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;} #backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; } #backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];} #backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;} #backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;} #backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];} .backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];} .backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];} #backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity=60)';} /*}}}*/
/*{{{*/ * html .tiddler {height:1%;} body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;} h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;} h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;} h4,h5,h6 {margin-top:1em;} h1 {font-size:1.35em;} h2 {font-size:1.25em;} h3 {font-size:1.1em;} h4 {font-size:1em;} h5 {font-size:.9em;} hr {height:1px;} a {text-decoration:none;} dt {font-weight:bold;} ol {list-style-type:decimal;} ol ol {list-style-type:lower-alpha;} ol ol ol {list-style-type:lower-roman;} ol ol ol ol {list-style-type:decimal;} ol ol ol ol ol {list-style-type:lower-alpha;} ol ol ol ol ol ol {list-style-type:lower-roman;} ol ol ol ol ol ol ol {list-style-type:decimal;} .txtOptionInput {width:11em;} #contentWrapper .chkOptionInput {border:0;} .externalLink {text-decoration:underline;} .indent {margin-left:3em;} .outdent {margin-left:3em; text-indent:-3em;} code.escaped {white-space:nowrap;} .tiddlyLinkExisting {font-weight:bold;} .tiddlyLinkNonExisting {font-style:italic;} /* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */ a.tiddlyLinkNonExisting.shadow {font-weight:bold;} #mainMenu .tiddlyLinkExisting, #mainMenu .tiddlyLinkNonExisting, #sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;} #sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;} .header {position:relative;} .header a:hover {background:transparent;} .headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;} .headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0px; top:0px;} .siteTitle {font-size:3em;} .siteSubtitle {font-size:1.2em;} #mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;} #sidebar {position:absolute; right:3px; width:16em; font-size:.9em;} #sidebarOptions {padding-top:0.3em;} #sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;} #sidebarOptions input {margin:0.4em 0.5em;} #sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;} #sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;} #sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;} #sidebarTabs .tabContents {width:15em; overflow:hidden;} .wizard {padding:0.1em 1em 0 2em;} .wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;} .wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;} .wizardStep {padding:1em 1em 1em 1em;} .wizard .button {margin:0.5em 0 0; font-size:1.2em;} .wizardFooter {padding:0.8em 0.4em 0.8em 0;} .wizardFooter .status {padding:0 0.4em; margin-left:1em;} .wizard .button {padding:0.1em 0.2em;} #messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;} .messageToolbar {display:block; text-align:right; padding:0.2em;} #messageArea a {text-decoration:underline;} .tiddlerPopupButton {padding:0.2em;} .popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;} .popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;} .popup .popupMessage {padding:0.4em;} .popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;} .popup li.disabled {padding:0.4em;} .popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;} .listBreak {font-size:1px; line-height:1px;} .listBreak div {margin:2px 0;} .tabset {padding:1em 0 0 0.5em;} .tab {margin:0 0 0 0.25em; padding:2px;} .tabContents {padding:0.5em;} .tabContents ul, .tabContents ol {margin:0; padding:0;} .txtMainTab .tabContents li {list-style:none;} .tabContents li.listLink { margin-left:.75em;} #contentWrapper {display:block;} #splashScreen {display:none;} #displayArea {margin:1em 17em 0 14em;} .toolbar {text-align:right; font-size:.9em;} .tiddler {padding:1em 1em 0;} .missing .viewer,.missing .title {font-style:italic;} .title {font-size:1.6em; font-weight:bold;} .missing .subtitle {display:none;} .subtitle {font-size:1.1em;} .tiddler .button {padding:0.2em 0.4em;} .tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;} .isTag .tagging {display:block;} .tagged {margin:0.5em; float:right;} .tagging, .tagged {font-size:0.9em; padding:0.25em;} .tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;} .tagClear {clear:both;} .footer {font-size:.9em;} .footer li {display:inline;} .annotation {padding:0.5em; margin:0.5em;} * html .viewer pre {width:99%; padding:0 0 1em 0;} .viewer {line-height:1.4em; padding-top:0.5em;} .viewer .button {margin:0 0.25em; padding:0 0.25em;} .viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;} .viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;} .viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;} .viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;} table.listView {font-size:0.85em; margin:0.8em 1.0em;} table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;} .viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;} .viewer code {font-size:1.2em; line-height:1.4em;} .editor {font-size:1.1em;} .editor input, .editor textarea {display:block; width:100%; font:inherit;} .editorFooter {padding:0.25em 0; font-size:.9em;} .editorFooter .button {padding-top:0px; padding-bottom:0px;} .fieldsetFix {border:0; padding:0; margin:1px 0px;} .sparkline {line-height:1em;} .sparktick {outline:0;} .zoomer {font-size:1.1em; position:absolute; overflow:hidden;} .zoomer div {padding:1em;} * html #backstage {width:99%;} * html #backstageArea {width:99%;} #backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;} #backstageToolbar {position:relative;} #backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;} #backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;} #backstageButton a {padding:0.1em 0.4em; margin:0.1em;} #backstage {position:relative; width:100%; z-index:50;} #backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;} .backstagePanelFooter {padding-top:0.2em; float:right;} .backstagePanelFooter a {padding:0.2em 0.4em;} #backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;} .whenBackstage {display:none;} .backstageVisible .whenBackstage {display:block;} /*}}}*/
/*** StyleSheet for use when a translation requires any css style changes. This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes. ***/ /*{{{*/ body {font-size:0.8em;} #sidebarOptions {font-size:1.05em;} #sidebarOptions a {font-style:normal;} #sidebarOptions .sliderPanel {font-size:0.95em;} .subtitle {font-size:0.8em;} .viewer table.listView {font-size:0.95em;} /*}}}*/
/*{{{*/ @media print { #mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;} #displayArea {margin: 1em 1em 0em;} noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */ } /*}}}*/
<!--{{{--> <div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'> <div class='headerShadow'> <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span> </div> <div class='headerForeground'> <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span> </div> </div> <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> <div id='sidebar'> <div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div> <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div> </div> <div id='displayArea'> <div id='messageArea'></div> <div id='tiddlerDisplay'></div> </div> <!--}}}-->
<!--{{{--> <div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div> <div class='title' macro='view title'></div> <div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div> <div class='tagging' macro='tagging'></div> <div class='tagged' macro='tags'></div> <div class='viewer' macro='view text wikified'></div> <div class='tagClear'></div> <!--}}}-->
<!--{{{--> <div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div> <div class='title' macro='view title'></div> <div class='editor' macro='edit title'></div> <div macro='annotations'></div> <div class='editor' macro='edit text'></div> <div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div> <!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers: * [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar) * [[MainMenu]]: The menu (usually on the left) * [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]]) <<option txtUserName>> <<option chkSaveBackups>> [[SaveBackups]] <<option chkAutoSave>> [[AutoSave]] <<option chkRegExpSearch>> [[RegExpSearch]] <<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]] <<option chkAnimate>> [[EnableAnimations]] ---- Also see [[AdvancedOptions]]
<<importTiddlers>>
[[Log]]
Aug 3 2011: ListIndex which will power sequences and table lookups is implemented and tested. Am now working on treeIndex, which will also be used - tomorrow it should be ready, and the day after tomorrow I should have the "database Index" ready, upon which I can start working on nodes and links Turns out that I was able to get a basic treeindex working in the time I had today, so databaseIndex is tomorrow! Aug 1 2011: Aight - the database is working. Tables are fully functional, now I am working on the indexes, so treeIndex and listIndex. listIndex will be used for sequences. Should not take too long, especially considering that both indexes are already implemented multiple times in prototypes/previous attempts. Tomorrow I expect to be ready for testing, and by the end of the week I should be ready to go to the next step: figuring out how learning will work! The database is so close to being "done"! July 20 2011: I have rebuilt the database from scratch once again. The log functions and all the gets and sets were adding way too much complexity, so I have eliminated both, replacing them with much simpler alternatives. Now I am creating the index hash for tables, which is the centerpiece of the searching algorithm for tables. Hopefully the hash I have created earlier will help in quickly creating a viable algorithm for this. I will create this as a separate file, because I am giving myself a 99% chance that I will want to copy it to a nicer format and integrate it with nDB. On with it! July 18 2011: Sequence structure and links along with basic node are done, along with sequence iteration. Now I am moving on to tables and the nodetree. When that is done, I will have a database - lol, I can make a very bad SQL database at that point - actually, it wouldn't be bad at all! It would be very fast at finding things! I daresay that it would be logarithmic without even trying! booyah! It will take much more room than a SQL database though. Also, once this part is done, I can actually try real life tests - see how the database works out under use. These searches will be very beneficial to the database! And once I have the structure for the whole thing and the beginnings of an algorithm, I can optimise by rewriting the code with what I learned. Onwards! Also, maybe for the next iteration, I can think of a better way to store data, since I think that this table idea is really good! I clearly have to add a "tabletype" structure to nodes - the only question is uint8_t or 16 - how many table types to allow? Maybe for now uint8_t is enough. July 11 2011: My ideas of the structure are still changing - each idea is so much better than the previous! Thankfully, I created the allocation filemap structure, so I can focus on the actual functionality. I think that the sequence struct is not really bound to change much, so I will start with that, along with links. The important part is that links are stationary objects, so instead of a link "ID", there is the link location, which is automatically unique for each link. Let us begin! July 9 2011: The new database core was just tested - I am officially at the same spot as before I had the allocator idea. Now, I have to figure out the best possible way to do linkstructs - since the linkcode done before is just the addressing part - in other words, it is banally easy. The problem I have now is how to align patterns optimally. So the linkstruct is truly the core of the linkbase - a node can bind to a linkstruct if it represents a certain pattern, but the main problem is - how to do variations in the pattern? Furthermore, how to allow either-or? Actually, maybe it can be... hold on. nodes can bind to patterns, as to simplify high levels of complexity, so let's say we have x original neurons nnnnnnnnnnnnnnnnn They fire in a sequence n-n-n-n-n-n-n-n-n-n-n-n-n-n-n The timing between fires is saved The algorithm analyses this "original sequence" and pulls possible patterns out of it - each pattern has a "sureness" level - the amount the pattern has proven itself to work, this is a signed int, meaning that if a pattern is followed, and is correct, then it gets plusses, if not then minuses. It also has a counter, telling how many times it got followed Then, the most popular patterns get their own nodes, which in turn are fired when the patterns are matched to be optimal - the problem then arises that multiple patterns can be present at the same time - and should react at the same time - actually, links can have a boolean - straight, or wavy - wavy means that just time difference is taken into account, and straight means that they have to follow straight in sequence - at different levels it would behave in very complex ways indeed. The whole link structure is actually NOT a straight tree - it can have backlinks, which means that infinite loops are theoretically possible for infinite search... I am starting to question the links I currently have planned for nodes - they do not fit the idea - searching for nodes is maybe easier with a bit of a different structure - as in, what if I made the tree upside down - each node have a sequence tree going up, so the 255 most common sequences involving a node + a recent one - making it basically a list sorted by closeness - so when a node is fired, it immediately checks the most common sequences - and in the node's linktree it would not only have the 256 most common ones including it, it would have a list of links to each place it shows up. Is there really no simpler way to attempt this? Also, the old linkarray allowed for quick expansion and pattern recognition based on density - which is really fast and really awesome, so f that. The problem remains, how to quickly - in real-time - have it recognize long-range patterns - it could use both methods - actually, why not? adding a sequence using timer as class would automatically make certain patterns show up, a modified old link-based node can stay, which would optionally include a frequency-based association list - so maybe it can use multiple methods to get patterns fast - very quick associations to get ratings on which patterns are most likely, and then a more thorough search through the patterns that are most likely. The thing is, the search has to be auto-expanding, giving the guess-results immediately, and as it is given time to "think" its search automatically encompasses larger areas and gives a more exact and detailed answer. That would mean that it could react immediately based on base association, without even matching patterns. BUT it has to be able to change ideas real time, which is a huge question-mark, since I don't yet know how the search algorithm will work. Jun 27 2011: This is amazing - the new simplicity of the database is astounding, I am in the middle of the address based linker for the database - quite awesome how it can do so much with so little code! The linkcode is starting to look like it will have amazing functionality - using a cursor, I can change the "root" directory, so searches within an address would go much faster! I have finished the searching for addresses - now I will implement switching around addresses. There comes the problem of how to align links. How should they be set up? Naturally, they should be ordered by number in sequence, but how to make it visible that the sequence in multiple address spaces is the same? As in, if it encounters a pattern, and then another pattern right away, how to make sure that the patterns are linked in sequence, but are not linked together.... wait - patterns are linked in sequence anyways. The base pattern is just the raw links, and upon those are built pattern structures. Patterns linking to each-other are simply recognized, and further up are called as patterns! Now the only problem left is memory - it will remember actions and reactions - so the memory will be there, but recognition of people, for example - it is not necessary! The code for pattern matching will react the same way as actual memory! And later, after this is done, I can create an automatic forgetter - once a pattern is not used, only higher level constructs are enough, then the pattern is deemed too much garbage and can be discarded - in that way, the patterns will keep getting simpler and simpler - right to the point where they are most efficient. here is a thought - what if multiple link searches could point to the same patterns? As in, if 2 patterns are taken in part from the same sequence, both could link to that sequence! So the link flavoring would in fact be 0 is the pattern, and 1-255 are subpatterns from which it was constructed - with relevance and impact decreasing as it goes from 1 to 255. the optimization and creation of subpatterns would be very slow, but it would lead to high efficiency! On the other hand, I also need to figure out a way for it to learn online - during runtime. Well, maybe there can be a temporary pattern buffer, which could hold the most recent sequences in the highest levels - or make a destabilization upon bad reaction, making it ignore certain tested patterns for situations The question now is what is the minimal information for the linkstruct to contain - during its creation, a link is sent to its nodes, and does not change location, so that does not need to be messed with. But a pattern needs to communicate with its nodes as to its level of advancement, so that the more advanced patterns get immediate processing. Also, since the links have their own nodeptrs, when deleting, they can find themselves, albeit slowly. Furthermore, nodes should have pattern links!! That would allow levels of complexity! So if a pattern is fired, its associated node can also fire, making advanced patterns available, and classing of reactions and patterns. Yeah, it looks like there will have to be a "workspace" in the file, where hits will be counted, and failures can be noted, so that optimization can work correctly - so a place where incorrectness, or closest patterns can be counted - after all, it must recognize patterns through many layers! There is only one problem that I foresee with the current link idea - if they are not in order, then it would not end well, and that perhaps its constituents are the ones that are supposed to be fired. Well, Jun 26 2011: The heapstruct was turning out way too complex - it is obvious that there needed to be one more level in-between the raw pages of the file and the actual structures stored in the database! The level needs to be a structure allocator, so something that abstracts away the limited page size to allow true structures! In the next version of the database, variable page sizes will fix this problem, allowing pages to be of any size, all structures will be automatically perfectly aligned, and instead of page numbers, there can be locations! Furthermore, the allocation structure will include page-linking of this database, so that it does not waste time on expensive copying data when appending - so minimum pagesize can be the current page size, and the database would expand to allocate the rest! This would actually use up less space than the current link-relink mumbo-jumbo, and would probably be much faster! Except how to solve the issue of caching? Also, how to solve the problem of huge struct-sizes? Furthermore, how to fix the problem of recycling and fragmentation? Well, perhaps the idea is that there WONT be a lot of recycling... Actually, recycling will just have to work without a trash - and during expensive optimizations sort structs from least memory to most memory and use largest free struct to create allocations. Now the problem of caching. I need a cache, and then a fast way (I am taking constant time here, bitches!) to find a location in cached pages - as in, I have the address of a page, how do I find if it is cached, if the structs are variable-size? I can't use any searching, since the programs running on top of the database will have enough problems themselves! Wow, if this works, I will have made a file-based memory! I can create the allocator in C, then create a C++ extension, where the memory locations in the allocator are treated as regular objects! LOL. No caching is necessary - the OS shall do it automatically, I just need to use MMAP as the file access method - no other way is satisfactory. Of course, this will make the database not have a commit mechanism, and automatically write back to file... But we can do private mapping for read-only files! The only problem is commit, but this database is made for a completely different reason than SQL databases, this one is made to sustain AI, not to make banks not lose money. A commit in an environment where changes are happening all the time is quite useless - since there is no clear-cut beginning or end to the information stream. Okay then - it looks like most of the code I wrote so far is to be scrapped! That is definitely not a bad thing, since the simpler the code, the less can mess up, the easier to read, and most importantly, the simpler code, the more brilliant a solution it is to create complex functionality! Unfortunately, it also means basically rewriting everything from scratch, including tests, since now there are to be no more pages to worry about! Also, I have broke my "promise" to work in StdC only. Oh well - it means that I will have to write system-specific code, but making it work on linux and windows should cover most portability concerns. Besides, mmap is supposedly faster than file operations, and it is, quite frankly exactly what I was trying to do with my fixed page sizes. The only annoying thing is that now I will have to write a VERY fast allocator, as well as some type of garbage collector for the new file memory! And I will have to rethink my whole structure, since without pages, there is no real need for identifiers, or other weird code. Haha, maybe ill even create a realloc! Wow. Who would have thought that to do this database I will have to create my own allocation routines optimized specifically for what I want to do! What's funny is that the trash structure will now probably become very useful! So since it will be exactly like a normal allocator, at memory 0 will be the header, which will contain all the information necessary to read the database. And mmap allows multiple processes to work on it at the same time, meaning that it can be cleaned while online! Ballin as fuck. anyways, tomorrow is the day when I set upon this new and fascinating new implementation, which will hopefully finally end up being the database! Last thought - since mmap uses virtual address space, in-memory databases only need to use one malloc for the whole database! Ha! and now the heap problem is automatically solved! If it works, it will be effing EPIC Haha, while I feel a bit sad that I have to scrap the code so far, I know that I can make the new version much more powerful - especially since it will be upon a new code base. Funny - since that would be a dream come true, an advanced program, yet created in such an astonishingly simple way! I should keep some form of VFS for allowing malloc and normal fread fwrite for this, since an OS which do not support mmap should not be left in the dust. Wow. that is exactly what I like - a completely different way of doing something makes the previous way's problems disappear - there will be no more getting pages, and locks will be allocation-based! So the most important part of this new database will be the allocator - and read/writer, which will provide a further abstraction? idk, all that is for the future. For now, I need sleep. Jun 21 2011: I wrote and compiled a preliminary offset-finder, hopefully it will work as advertised. I will next be breaking it apart into multiple methods to allow more powerful manipulation from within the reading and writing functions. Jun 20 2011: I am beginning to work on the allocator code. I already have a prototype in the form of the previous code that I will use. Allocator code is finished, awaiting testing. Both situations are fully coded, except for a possibility of a bug, which would require more code complexity, despite my belief that it will probably not even be noticed for most cases. I have inserted an assertion into the code, just in case a situation triggering it pops up in real-life usage. I can deal with it when - or IF it shows up. The next parts of the code will be the writing and reading routines. Hopefully they will be similar enough that most of their code can be copied with little modification. Jun 19, 2011: I have created the wiki file as my personal log and documentation of the creation of the new learning algorithm. Right now I have finished the basics of nDB up to the heapStruct - I am working on it now. It is proving to be very tedious to work out dynamic storage of data, especially since this system is more of an addon to the database than a necessity. It is there since I will probably end up needing a variable-size storage as the database progresses. While the database is the framework upon which all algorithms will work, I am getting annoyed at the intricacies necessary to correctly program it, I want to start the learning algorithms already! I already think that I will need to rewrite the database one more time after getting a working prototype this time, since every time I rewrite the parts that I have they get simpler and more efficient. Hopefully after finishing this nDB prototype I will be able to use the tests developed for it to speed up programming of an upgraded version. But for now, I have to create at least a prototype upon which I can construct n2's algorithms. Hopefully I can finish this summer, to be ready to create better and more advanced algorithms for n3. Hopefully after a couple n-s I can finally create a quickly learning entity - lal. I have decided to do a redo of the heap. For some reason doing something like that helps me concentrate and get it done. I am going to need to compile a list of deficiencies the current API exhibits so that the next database iteration can fix them. The first of them is the placement of multiple routines. Pager and ndb_pg should be probably merged together, and a better/more consistent naming scheme should be adopted for logs and functions, since right now come start with system, some with function, and it is a true mess. The new heap has a variable heapsize variable, allowing the maximum object size to easily be modified. The only really annoying part I see right now is that it looks like different navigation code is necessary for every routine in the heapstruct - which makes it a pain in the ass. I think that internal routines need to be made which will handle moving between pages and determining data.
[[Log]] [[nDB]] [[n2]] [[Lal]]
A different approach to computer intelligence
Project Nova
chkAutoSave:true chkInsertTabs:true txtUserName:Daniel
The database allowing access to large scale structures allowing learning algorithms to efficiently analyse large patterns and to quickly store/retrieve experiences and response patterns.