diff --git a/python_from_metta/fs.metta b/python_from_metta/fs.metta index 718444b..30e5065 100644 --- a/python_from_metta/fs.metta +++ b/python_from_metta/fs.metta @@ -40,8 +40,6 @@ (= (inspect $x) (getattr $x "__dict__")) - - (= (Popen) ( open ( Kwargs (args (shell-command)) (stdout (py-atom (PIPE))) @@ -79,7 +77,7 @@ !(import b'' as _stop) - +;; these type signatures don't do much, yet. (: _stop StopIteration) (: (read $n) (-> Number (IO Byte))) diff --git a/python_from_metta/requests.metta b/python_from_metta/requests.metta index 2590592..801c978 100644 --- a/python_from_metta/requests.metta +++ b/python_from_metta/requests.metta @@ -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)) @@ -38,7 +55,8 @@ (= (get_index $list $index) ((py-dot (py-atom $list) __getitem__) $index)) -;(: uni_get (-> JsonAtom (String Number) String)) + + ; ----------------------- @@ -58,7 +76,6 @@ (= (rget $dict (:: $x $xs)) (rget (get $dict $x) $xs)) - ; > python inspect function ; ------------------------- !(import getattr) @@ -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)?' diff --git a/python_from_metta/requirements.txt b/python_from_metta/requirements.txt new file mode 100644 index 0000000..d44fe44 --- /dev/null +++ b/python_from_metta/requirements.txt @@ -0,0 +1,2 @@ +requests +python-dotenv \ No newline at end of file