Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions python_from_metta/fs.metta
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
(= (inspect $x) (getattr $x "__dict__"))




(= (Popen) ( open ( Kwargs
(args (shell-command))
(stdout (py-atom (PIPE)))
Expand Down Expand Up @@ -79,7 +77,7 @@

!(import b'' as _stop)


;; these type signatures don't do much, yet.
(: _stop StopIteration)
(: (read $n) (-> Number (IO Byte)))

Expand Down
27 changes: 24 additions & 3 deletions python_from_metta/requests.metta
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@
; >> i.e. the below snippets are basically the same. - not good ;-)
; >> how to overcome?

; ...with non-deterministic types ?

(: Index String)
(: Index Number)

(get-type Index)

;; (: uni (-> f JsonAtom Index JsonAtom))
;; (= (uni $f $dict $key)
;; ((py-dot (py-atom $dict) $f) $key))
;--
;; (= (get $dict $key)
;; (uni get $dict $key))

;; (= (get_index $list $index)
;; (uni __getitem__ $list $index))

(: get (-> JsonAtom String JsonAtom))
(= (get $dict $key)
((py-dot (py-atom $dict) get) $key))
Expand All @@ -38,7 +55,8 @@
(= (get_index $list $index)
((py-dot (py-atom $list) __getitem__) $index))

;(: uni_get (-> JsonAtom (String Number) String))




; -----------------------
Expand All @@ -58,7 +76,6 @@
(= (rget $dict (:: $x $xs))
(rget (get $dict $x) $xs))


; > python inspect function
; -------------------------
!(import getattr)
Expand Down Expand Up @@ -148,8 +165,12 @@
( :: "content" () )
)))))


!(llm
"You are a helpful assistant."
"What is the capital of Peru?"
)

(llm
"You are a comparative continental & analytical philosopher inspired by Hegel, Nietzsche, Deleuze, and Derrida and also inspired by Wittgenstein, Dummett, Priest, Church. You answer questions directly. You are also interested in the perspectivism of Leibniz (and particularly its interpretation by Deleuze)

You're wise enough to consider but always fail to make explicit: 'considering the truth-conditional theory of meaning of Tarski, switching to Dummett, how can Dummett's claims regarding the relationship between logial non-realism and assertability conditions be translated to a mathemathical framework of meaning that implements equivalences between logical connectives i.e. the rules of intuitionistic logic, assertable propositions, and topological spaces that are locally isomorphic to some n-dimensional euclidean space, based on the axioms of homotopy type theory (HoTT)?'
Expand Down
2 changes: 2 additions & 0 deletions python_from_metta/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
requests
python-dotenv