OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-rocks commits / bdfd13d

Modernize examples.
They got old and crufty
bdfd13de1174cc4bcd7bd6128aa17fde291bfa82
by Linas Vepstas <linasvepstas@gmail.com> · 2026-01-18T05:44:43.000Z

Changed files (4) +7 -7

examples/fetch-store.scm +3 -3
……@@ -25,7 +25,7 @@
2525(cog-set-value! (Concept "a") (Predicate "blo") (FloatValue 4 5 6))
2626
2727; Take a look at it:
28(cog-keys->alist (Concept "a"))
28(cog-keys (Concept "a"))
2929
3030; Save it:
3131(store-atom (Concept "a"))
……@@ -42,7 +42,7 @@
4242(fetch-value (Concept "a") (Predicate "blo"))
4343
4444; Take a look at it:
45(cog-keys->alist (Concept "a"))
45(cog-keys (Concept "a"))
4646
4747; Change the value (but don't store it)
4848(cog-set-value! (Concept "a") (Predicate "blo") (StringValue "a" "b" "c"))
……@@ -53,7 +53,7 @@
5353; Verify that all of the keys arrived. Notice that the "new" Value
5454; on (Predicate "blo") was clobbered by the one fetched from the
5555; database.
56(cog-keys->alist (Concept "a"))
56(cog-keys (Concept "a"))
5757
5858; Optionally close the connection.
5959; Not strictly required; cleanup happens anyway, on exit.
examples/multiple-databases.scm +1 -1
……@@ -33,7 +33,7 @@
3333; -------------
3434; Erase everything in the AtomSpace. Do this to avoid confusion in
3535; the next steps. Alternately, quit guile, and restart guile.
36(clear)
36(cog-atomspace-clear)
3737
3838; -------------
3939; Loading Atoms
examples/query-storage.scm +1 -1
……@@ -170,7 +170,7 @@
170170; the entire incoming set of (Concept "B"). More info about JoinLinks
171171; can be found on the wiki page https://wiki.opencog.org/w/JoinLink
172172
173(define b-holders (MaximalJoin (Present (Concept "B"))))
173(define b-holders (MaximalJoin (Concept "B")))
174174
175175; Just like before...
176176(fetch-query b-holders results-key)
examples/space-frames.scm +2 -2
……@@ -80,8 +80,8 @@
8080 (store-atom (Concept "bar"))
8181
8282 (cog-set-atomspace! mid2-space)
83 (cog-set-value! (ListLink (Concept "foo") (Concept "bar")
84 (Predicate "key") (FloatValue 1 0 5)))
83 (cog-set-value! (ListLink (Concept "foo") (Concept "bar"))
84 (Predicate "key") (FloatValue 1 0 5))
8585 (store-atom (ListLink (Concept "foo") (Concept "bar")))
8686
8787 ; Change the ctv on `foo`. This will hade the earlier value.